From: Terence on
I have been trying trying to help the brother of a hopeful fortran
using sister to get her earthquake processing software converted to
useable compilable code.
(Yes, they might have picked someone else, but,,,)
I am acting as moderator of an under-used Fortran forum and trying to
do my best.

The problems I saw were
1) The program was written for a CDC computer that used integer*4
words of at least 48 bits in width, because all text was stored in 2-D
arrays of 6 characters, initialised and manipulated as integers and
written out using A6 fomats.
2) calls to machine-dependent timing routines (possibly to allow
aborting if too much time was being taken,
3) output to text devices used as printers that used way above 132
character lines. A typical line would start with 60 spaces before
starting any line of a big table of text followed by several F15.2
values. Even longer output to a plotter.
4) use of routines with a multi-line list of parameters, but then with
internal named entry points.
5) All output mixed selected 6-character text integers or text blanks,
all with Format statments that only used A6 formats, with possinble 2-
character literals interpersed.
6) No opening or closing of any files (all assumied defined in JCL?)
7) heavy use of WRITE, PRINT, PUNCH with no unit device and therefore
unusual syntax.

Since I am still corresponding and feel I am not being very helpful,
my question is
"Is there any commercial or free Fortran compiler which will compile
this, more or less as-is (assuming removal of machine dependent
routines performed)"?

From: Richard Maine on
Terence <tbwright(a)cantv.net> wrote:

> 1) The program was written for a CDC computer that used integer*4
> words of at least 48 bits in width,

Odd. I didn't know there were any CDC compilers that supported integer*x
syntax for any value of x. The ones I used didn't support that. They did
have 60-bit integers, which could store 10 6-bit characters.

Or are you just saying integer*4 when you actually mean default integer
declared without any "*" syntax? I half suspect that, as there are
people who have gotten so used to considering integer*4 a synonym for
default integer that they forget it isn't - anyway not on machines like
that.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: Terence on
On Aug 6, 4:07 pm, nos...(a)see.signature (Richard Maine) wrote:
> Terence <tbwri...(a)cantv.net> wrote:
> > 1) The program was written for a CDC computer that used integer*4
> > words of at least 48 bits in width,
>
> Odd. I didn't know there were any CDC compilers that supported integer*x
> syntax for any value of x. The ones I used didn't support that. They did
> have 60-bit integers, which could store 10 6-bit characters.
>
> Or are you just saying integer*4 when you actually mean default integer
> declared without any "*" syntax? I half suspect that, as there are
> people who have gotten so used to considering integer*4 a synonym for
> default integer that they forget it isn't - anyway not on machines like
> that.
>
> --
> Richard Maine                    | Good judgment comes from experience;
> email: last name at domain . net | experience comes from bad judgment.
> domain: summertriangle           |  -- Mark Twain

Correct Richard,
Yes, my trusty compiler was reporting the extensive "errors" as
Integer*4 assignments, because there were lmst no actual definitions
of variables other than dimension statements, and the character arrays
all had names which default to integer. I saw about five definitions
of REAL and two or three actual definitions as INTEGER in a total of
31 subroutines over 3000+ lines.

This code was written for the CDC 6400 and dated 1978 (both
specified in the text preamble) and all character references (as
assignments and usage in Format statements), was restricted to blocks
of 6, so I had to assume the 6400 had a 48-bit word, and and not some
higher number like 60 since the authors could have efficiently such a
size.

My own (fairly dedicated) experience with Fortran IV was with IBM
7040's and the like, at IBM and Shell, pretty much world-wide, and
both tended to write their code with 4-character assignments.

So, is there any semi-automatic conversion program available, or do
we dafault to hard slog?
I DO have the TO-F90 program and have previous used in in less
exacing circumstances.

From: Nick Maclaren on
In article <7eb9d793-e6d2-48a4-998d-9ca3d2065e9e(a)x20g2000pro.googlegroups.com>,
Terence <tbwright(a)cantv.net> wrote:
>
>I have been trying trying to help the brother of a hopeful fortran
>using sister to get her earthquake processing software converted to
>useable compilable code.

[ Details snipped. ]

Grin :-) Good ol' Fortran II - for a CDC, no less! Your chances
of finding any Fortran compiler on any other system that wouldn't
vomit that straight out were negligible in the 1960s, and I don't
give you an earthly today.

The I/O and timing routines are easy to fix up, though simple edits
will be needed - I would use awk and sed.

The character problems are a real pain. If the program is clean,
and a single variable is used for either characters or integers,
then it's fixable with slightly trickier editing. I would use
Python for that.

All that sounds hard, but isn't. If, however, the code is an
ungodly mess, with no systematic variable use, a complete rewrite
is all that is feasible.

If she is happy to send that code to other people, I should be
interested to see it, to update my course on Fortran Archaeology.
I should be happy to comment whether I think conversion is feasible,
and describe how, but not to get involved.


Regards,
Nick Maclaren.
From: Dr Ivan D. Reid on
On Fri, 6 Aug 2010 00:19:40 -0700 (PDT), Terence <tbwright(a)cantv.net>
wrote in <0fdf3e9f-79f3-40c0-a675-58d7e2010606(a)u38g2000prh.googlegroups.com>:

> This code was written for the CDC 6400 and dated 1978 (both
> specified in the text preamble) and all character references (as
> assignments and usage in Format statements), was restricted to blocks
> of 6, so I had to assume the 6400 had a 48-bit word, and and not some
> higher number like 60 since the authors could have efficiently such a
> size.

My experience with a Cyber in 1978 was that it had a 60-bit word
but integer multiply/divide only worked up to 48 bits. To shift a 48-bit
integer to 60 bits to add a 5th 12-bit byte I had to use successive adds
(i=i+i). That was just one of the Procrustean methods I had to use to
force it to output 8-bit punched tape object files from a National SC/MP
cross-assembler.

--
Ivan Reid, School of Engineering & Design, _____________ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".