Does anyone know a compiler for Fortran 77 available as a free download?
I have pre-written 77 code from a source published in the early 90's that I just need to compile, build, and run. But I don't know enough about Fortran to update it myself.
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It only takes a minute to sign up.
Sign up to join this communityDoes anyone know a compiler for Fortran 77 available as a free download?
I have pre-written 77 code from a source published in the early 90's that I just need to compile, build, and run. But I don't know enough about Fortran to update it myself.
While not as free or available as GFortran that Bill mentions, the Intel Fortran Compiler also works F77 (or atleast works for the legacy code I work with). I am just putting this here to give an alternative, I would still recomment GFortran for most use cases simply due to the cost of ifort.
G95 is another alternative free fortran compiler, available for quite a few platforms. I think it is a bit easier to install on Windows compared to Gfortran (the OP did not mention what platform they were interested in).
G95 has seen less updating and maintenance compared to Gfortran (whihch is part of the main GCC distribution since 4.0), but if you just need F77, G95 should work great. Gfortran actually began as a fork of G95.
Disclaimer: I'm about to make statements based on my own experience, so it may not necessarily be true for your situation.
In my experience, gFortran is a strict compiler when it comes to fortran 77. If the code is written according to the F77 language standard, then everything should work out. This doesn't seem to be the case very often in code obtained from textbooks and other sources, especially in my field (mechanical engineering, fluid structure interaction, dynamics, FEM, CFD). There were many situations where code obtained verbatim from these sources would either not compile, or result in confusing error messages at runtime. Switching to PGFortran or Ifort always seemed to solve the problem.
This has happened to me with code from:
To summarize, if for some reason gFortran doesn't work out, don't hesitate to try other fortran compilers as well. Alternatively, you can try the various flags to make gFortran a bit less strict.