Fortran at Livermore

Here are a few recollections on Fortran when it appeared at Livermore.

In 1955 IBM promised Fortran for their 704 computer. The 50 page manual was published in October 1956. It included expressions, formatted and binary IO, but no user defined subroutines. Livermore had had a good experience with their home grown Kompiler for the IBM 701. The Fortran language was more convenient in most ways and certainly a more complete language. We transcribed one large production program from Kompiler to Fortran in anticipation.

When the compiler arrived it compiled the test programs that we prepared and executed them well. Our large production job, about 3000 cards, took longer to compile, however, than the mean time between errors on the 704 which, we learned, was several hours. The compiler especially stressed the magnetic drums. We heard similar stories from other Fortran users regarding large programs. We manually transcribed the large Fortran code to assembler and proceeded with production.

Gradually developers of smaller programs who migrated to Fortran were well satisfied with it. Users would encounter occasional compiler bugs but most of these could be worked around. Periodically IBM would mail out patches in the form of decks of binary cards. Such a mailing might include 100 or 200 binary cards. The bugs receded as a practical matter and the compiler grew more efficient. The 704s became more reliable as well. The Fortran compiler was the most demanding application at most sites.

Fortran’s optimization was far ahead of its time. Indeed other much smaller and faster Fortrans were soon written for other machines, but I recall observing that it was about 10 years before any compiler optimized as well as the original.

Some months after the compiler was shipped, IBM released the “source” for the compiler in the form of micro-film images of assembler listings of the compiler, carefully hand annotated with the patches. A year or so later IBM shipped a clean assembly of the compiler with some of the less significant optimizations absent. The newer compiler was yet faster and more reliable and we were able finally to compile our large production code. The newer compiler still led the pack regarding optimization.

Compiler Structure

The compiler was read from magnetic tape into core. 4K words (36 bits) of core were required and an 8Kw random access drum. Several successive passes were read from tape and the drums supplied working storage during and between these passes. The Fortran source was read from cards or magnetic tape during the first pass. During the last pass an optional pseudo assembler listing for the newly compiled program was available on either tape or the printer. At the end of the compiler tape was an IBM supplied library of routines such as format conversion and mathematical functions. A relocatable loader of sorts would selectively include such subroutines. The compiled code and relocated library routines were punched on binary cards.

With some reverse engineering it was possible to write your own subroutines in assembler. We soon wrote simple display routines for the CRT that came with many 704s.

IBM had shipped the NYAP assembler program with the machine but the SHARE organization proposed adopting another simplified, yet improved assembler called FAP. FAP knew how to produce relocatable code. Roy Nutt, of Computer Sciences Corporation donated FAP, as well as some of the formatted IO routines for Fortran, to the world.

See the text on “transfer trapping” here. Here I compare programming the 701 and using the 704’s Fortran.

(2013) I recommend the Wikipedia Fortran article.