Fortran Version

Hello,

I have this old code I need to recompile. Not sure what Fortran version it is and what compiler would work. All I remember is that it worked on a VAX computer about 35 years ago. Here are a few lines. Any ideas?

Thanks

  PROGRAM SYNT2(INPUT=100,OUTPUT=100,TAPE1=650,TAPE2=650,TAPE3=650,
 KTAPE4=650,TAPE5=650,TAPE6=650,TAPE8=650,TAPE10=650)
  DIMENSION XC(621),YC(621)
  DIMENSION A(621),B(621),KOT(5)
  DIMENSION RE(105),AA(621),ROX(621)
  COMMON/MRB/DT(6)
  COMMON/PLO/NUG(33),MP(2),IOP(4)
  COMMON/GEN/LALA,LAKI,NOP
  COMMON/G11/NONU,TAB(2,33),C(1500),D(10000),XXX,YYY,XY 
  COMMON/G12/TUKI1,TUKI2,TUKI3
  COMMON/F12/JR,NT
  COMMON/F11/TOL,ERROR,TOL1
  COMMON/F1/FF0,A,B,L,TR,AA,ROX,XK
  COMMON/FF/RRRR0
  COMMON/PAR/INDEX,RAD,PI,TP,FREQ,WL,RK
  COMMON/TAKO/THETAR
  COMMON/F2/AM,BM,AG,BG,XLAM,D0
  COMMON/F3/T01,T02,DT0,AN(621),PAT(621)
  COMMON/F4/NN,HPBWR
  EXTERNAL RO1,PATTERN,ET 
  CHARACTER BIBI*10

Depends on how many extensions they used. The standard-conforming parts may be obsolescent but for the most part will still work. The only non-standard part that jumps out is the PROGRAM
header which many vendors extended to provide to open files as pre-assigned from arguments given on the command line.So the PROGRAM card needs changed and you will have to use some other method to assign files to your input and output files.

Other than that there are utilities like fpt and spag othat can update codes (they are commercial offerings that are free for Open Source projects) or the compilers themselves. First just try compiling it and see what kind of errors you get. Once you eliminate those turn on all the warning flags the compiler has and see what additional errors you get. If it ran on a VAX starting with the intell compiler whose history and developers were intertwined with DEC is the best place to start, as it is likely to have the most compatible extensions. Otherwise look for a compiler switch like --vax or --dec that indicates it allows for some DEC extensions. If you are lucky the code may use very few extensions and still work. But unless the programmer was unusually careful or the code had to run on many platforms the odds of that are low!

Thank you! this is useful information.

Except for the CHARACTER declaration, this looks like pre-f77 code. The only nonstandard thing that stands out is the way the external file names are associated with internal unit numbers in the program statement. I think this is the way several CDC and CRAY systems worked before f77. Maybe VAX supported this as an extension, but I don’t remember that. So if you replace those with standard open statements, it should work pretty much without change on a modern compiler.

It looks like several internal units (TAPE1, TAPE2, etc.) are all connected to the same external file. Presumably the program logic is consistent with that usage. The external file would have been something like FTN650 by default, but that could have been overridden elsewhere in the job control, so the actual external file names could have been anything.

The code uses default implicit typing, which was a common programming style before f90. If it is a CDC or CRAY code, then the real and integer storage size would have been 60 or 64 bits, so you might need to add or modify the declarations if your computer defaults to 32-bit real and integers. The other gotcha with old code like this is to watch out for different declarations of the common blocks in different subroutines, using storage sequence aliasing.

Just CDC, not Cray. IIRC, the Cray compilers accepted the stuff inside the parenthesis, but ignored it. CDC continued to use it as a method for pre-connecting units in FTN5 (Fortran 77), and likewise the U of Minnesota M77 compiler.

I think the CTSS fortran compilers at Livermore for their Cray computers accepted this notation. By the mid 1980s, they also accepted f77 style open statements, which is what I mostly used thereafter. I always assumed this was a CDC legacy feature, but I don’t know how common it was with other Cray compiler+OS combinations then.

The LRLTRAN compiler for CTSS/LTSS was called CIVIC. Not sure off the top of my head how it supported the PROGRAM statement. Certainly possible as they tried to keep it as compatible with whatever they did on the 6600/7600 as much as possible. I have docs on it buried somewhere in my “archives”. (Yet more stuff my wife wishes would go in the dumpster…) So I could go look.

The official Cray compilers, namely cft, cft77, cft90, and so on didn’t support doing unit/file preconnection via the PROGRAM statement like CDC did.

2 Likes

Back to the original post: Based on the CDC-style PROGRAM statement, and the final CHARACTER declarations, it certainly would have seen the 60-bit CDC FTN5 (and/or U of Minnesota M77) compiler, running on CDC’s NOS, NOS/BE, and SCOPE2 operating systems. M77 ran on KRONOS (the predecessor to NOS) as well. The 64-bit CYBER-205, and later NOS/VE machines are also a possibility.

LRLTRAN/CIVIC on CTSS/LTSS is still a good question. But SWMBO has errands for me to run…

@RonShepard - I found the CIVIC document. It mentions very early on in a list of statements that it supports “PROGRAM name”, but no parenthesis. Amusingly, PROGRAM is never mentioned again in the entire 273 page document. Lots of other wild and crazy stuff in that compiler for its time though.

1 Like

I would really like to see the CIVIC document, if you have a digital copy.

1 Like

It’s a hard copy, and 273 pages - plus front matter, indexes, and such. Also have a STACKLIB doc printout and several others. It was in the box that also had some CDC NOS 1.4 and NOS 2 Release Bulletins…

One of these days I need to get together with Al Kossow, and see what I have that he could scan and put on bitsavers.

1 Like