I have paid some good money to buy the "Intel Parallel Studio XE Composer Edition for Fortran OS X" – The problem is that, whenever the OS changes (i.e., from Lion to Mountain Lion to Mavericks to Yosemite), the compiler needs update, and purchase of a new version. (Unless you buy a maintenance, approx. $300/yr). Also, sometimes a new version is required even when Xcode is updated!
Two questions:
-
Is there some free FORTRAN compiler or a non-free, which works after updates of Xcode or/and OS?
-
Is there a way to make it work, even if is was destined for say Mavericks?
Best Answer
re free Fortran compilers
gfortran is part of gcc (gcc stands for GNU Compiler Collection not just the name of GNU's c++ compiler)
Xcode now does not install gcc (even via command line tools) gcc is a link or wrapper to clang
As to installation my first attempt would be via a package manager like Macports or Homebrew or fink.
For macports (others will be similar) install will be
sudo port install gcc5
sudo port install gcc_select
sudo port select --set gcc mp-gcc5
gfortran is now in /opt/local/bin
Macports should download readymade binaries for this so no wait for a long compile of gcc
If you upgrade the OS Macports will need a complete reinstallation (OK it might work but support and test is only done on a complete reinstallation, previous OS upgrades have definitely needed one the last 1-2 might have worked)
Homebrew instructions are included in this article which also includes other free Fortran compilers and other useful Fortran info.