views:

1838

answers:

12

What Fortran compilers are there in this day and age, and which would you recommend? Please list the version of Fortran it supports, the platform it works on (e.g. *nix / Windows), and whether it cost money.

(Standard OS one per answer etc.)

+6  A: 

GFortran - part of GCC is free and works wherever GCC does.

Bundled as the 'g77' binary
Brendan
@JB: gfortran suffers from a lack of f90 and beyond support. G95 is a much better option than gfortran. At least in my experience gfortran causes more problems than it solves.
sixlettervariables
I disagree, we switched compilers from absoft to gfortran for our F90 code and it worked wonderfully. It even solved a memory leak that the absoft compiler introduced. Its a tad slower, but most of the work is in libraries anyways.
Greg Rogers
Just a note as I stumbled across this answer recently: g77 and gfortran are completely different. g77 is the old implementation that only supports Fortran 77. gfortran is a new, re-written compiler, that supports Fortran 90 and even some of Fortran 2003. g77 has been deprecated since GCC 4.x, and gfortran is the default now.
Daniel Pryden
+1  A: 

Intel Fortran. Works on Windows and Linux. Not free for commercial applications.

David Dibben
+6  A: 

Intel Fortran Compiler - works on Linux, Windows and Mac. It costs money but the Linux version can be used for personal use for free. It produces the fastest code of any Fortran compiler in many circumstances and supports all versions of Fortran including much of the 2003 standard.

A great comparison between various Fortran Compilers has been done by Polyhedron software:

http://www.polyhedron.com/compare0html

MikeCroucher
+3  A: 

OpenWatcom costs nothing and compiles F77 on Win32, Win16, OS/2 and DOS.

(Just to give you a non mainstream option as well)

Nils Pipenbrinck
It has a neat IDE too!!
Vulcan Eager
Uh - My experience goes back to the time where it was still commercial. Back then the IDE was horrible. The Debugger however was and still is the best I've ever worked with.
Nils Pipenbrinck
+1  A: 

There is also the NAG Fortran Compiler - works on Linux, Windows and Mac. It's commercial but free trials are available. It adheres closely to the Fortran standards and comes highly recommended by many people I work with.

It covers Fortran 77,90,95 and most of the 2003 standard. The Linux and Mac OS versions are command line tools but the Windows version comes with a nice IDE.

MikeCroucher
+2  A: 

I have also come across some people who use the Silverfrost Fortran compiler. It covers Fortran 77,90 and 95 and is for Windows only. The website mentions .NET a lot. Never used it myself beyond compiling hello world - the free 'personal' version adds an annoying nag screen to your executables. I guess the commercial version offers a better experience but I couldn't possibly comment,

MikeCroucher
+1 I have just started to use the Silverfrost Fortran compiler with the Plato IDE and I am enjoying it so far. At first, I wanted to use G95 with Notepad++, but the G95 setup file blue-screens Windows 7 RC1.
Geoffrey Van Wyk
+2  A: 

There's also Lahey Fortran. They support 32- and 64-bit Windows and Linux. It costs money, but sometimes it's cheaper to buy a commercial product that has support than to spend 3 weeks to try to figure out some bug in the deep dark depths of an open source compiler. We've had more than a couple problems with g77 and gfortran, especially with optimization of low level memory operations, which are torture to debug. Not that I don't support open source, but for some things, commercial products are a more cost effective solution.

Scottie T
+1  A: 

g95 is another cross platform/ mutliple cpu arcitechture free Fortran compiler. I had success in the past using it and it seems to be updated fairly often. Supprts F77, F90 and some parts of the F2003

http://www.g95.org/

Navierstokes
+3  A: 

Fortran compilers which I have worked with and have found useful (ordered in terms of recommended usage):

  1. Intel Visual FORTRAN ($) Windows, Linux, MAC
  2. G95 (FREE) Windows (cygwin), Linux
  3. NAG Fortran Compiler ($) Windows, Linux, MAC
  4. Lahey Fortran ($) Windows, Linux

If you don't want to spend any money...use G95. At work we support IVF and G95.

sixlettervariables
+1  A: 

Intel Fortran is the best. It's heritage can be traced back to the 1960s. Intel bought it from HP and before that HP acquired it from Compaq who got it from Digital Equipment Corp. It was the old reliable Vax Fortran and prior to Vax was first developed on PDP-11 computers.

Gcc Gfortran also has a fork called G95, both are free of course. G95 also has an eclipse IDE called Photran. There's a discussion of the two here: http://www.megasolutions.net/fortran/g95-versus-gfortran-50009.aspx

SumoRunner
+3  A: 

The Portland Group Fortran compiler cost money and is available for Windows, Mac and Linux. I have personaly used it on Linux while writing several programs that used MPI to do parallel computing and never had any issues with it.

dlannoye
A: 

I just installed the latest release of Red Hat; it provides a broken gfortran, and broken gnu OpenMP. As with most compilers, it is quite important to install updates: gcc.gnu.org/wiki/GFortran I would be using SuSE for its better support of current gnu compilers, if I didn't have so much difficulty with video drivers.
On SuSE, Intel compilers tend to require you to check the "unsupported installation" box. This doesn't mean you can't get support, only that the combination hasn't been fully tested.