Fortran Compilers for Use with Source-Code GEMPACK

A suitable Fortran compiler is required for use with all Source-code versions of GEMPACK. For PCs running Windows we support these compilers:

Compiler Performance

The different compilers vary both in compile time, and in the run time of the EXE that is produced. Results are quite model-dependent. See the speed comparison table at the bottom of this page. In some cases the Intel compiler is better, but we anticipate that most users will choose GFortran.

I have Lahey already -- should I switch to GFortran?

If you have GEMPACK 11.2 or later, the answer may well be yes. If you have GEMPACK 11.0 or 11.1, the question is harder. However, this page explains how you can set up your GEMPACK to use either Lahey or GFortran -- so you can experiment to find your own preference.

Purchasing your compiler

Intel sell their Fortran compiler through various resellers and Lahey also sell through distributors and dealers. Both Lahey and Intel offer academic and multi-user pricing, and both are distributed by leading Fortran vendor Polyhedron, or, in Australia, by Devin Trussell of Computer Transition Systems. For GFortran, the free download is here.

32-bit or 64-bit?

Most PCs are running a 64-bit version of Windows; 32-bit Windows is disappearing. GEMPACK runs well on both. Both Intel Fortran and GFortran can be configured to produce either 32-bit or 64-bit EXEs. You need to make the choice at GEMPACK install time. Which should you choose ?

See also this GEMPACK-oriented comparison of 32-bit and 64-bit Windows.

Installing your Fortran

Some Releases of GEMPACK only work with specific versions of the Fortran compilers. See these pages for compiler-specific details:

You need to install and test your Fortran before you install source-code GEMPACK. See the above pages for compiler-specific instructions. In each case, we ask that you download, compile, and run a small "Hello World" program to verify your Fortran installation before installing GEMPACK.

Switching back and forth between Fortran versions with GEMPACK

Advanced users who need to do this could study these suggestions.

Non-Windows PCs

A Fortran compiler usually comes with Unix, or is an optional extra. A few users have compiled GEMPACK under Linux using the open-source GFortran compiler. See also these notes.

Compiler Performance

The following table, prepared February 2016 using GEMPACK release 11.4, compares LTG (=compile) times, and TG-program and GEMSIM run times with 4 large models. The tests were run a desktop PC running Windows 7 64-bit with a quad-core Intel i7-4770 CPU, 32 GB memory and 512 GB SSD hard drive. Compilers were: GFortran 4.8.1, Intel Fortran 14.0, Intel Fortran 16.0 and Lahey/Fujitsu Fortran 7.2 professional. Times are in seconds. The results reflect in part the various optimization settings used by GEMPACK for different compilers.

All table columns give performace of Source-code GEMPACK used with a particular compiler. The IF32 14.0 column corresponds to the distributed Executable-image version of GEMPACK, that is to say we use 32-bit Intel Fortran 14.0 to produce Executable-image GEMPACK.

GEMPACK 11.4 LTG compile times and model runtimes with various compilers

  GF32 4.8 GF64 4.8 IF32 14.0 IF32 16.0 IF64 14.0 IF64 16.0 lf95 7.2
  GP11.4 GP11.4 GP11.4 GP11.4 GP11.4 GP11.4 GP11.4
gtap4040              
LTG 21 25 17 24 20 27 14
TG-program 89 86 55 63 48 57 159
GEMSIM 97 92 60 74 55 63 167
mmrf4              
LTG 85 96 53 71 63 82 95
TG-program 40 35 46 68 40 55 130
GEMSIM 1461 1252 1314 1396 1094 1155 2153
monusaoct03              
LTG 25 28 21 28 25 31 23
TG-program 60 54 43 44 40 40 90
GEMSIM 904 805 586 615 500 521 1707
term              
LTG 16 17 13 17 16 21 22
TG-program 51 47 51 51 46 47 122
GEMSIM 87 77 82 85 71 74 169
  green: row best   red: row worst

Most users will be primarily concerned with the the TG-program or GEMSIM results since they report simulation times. For Source-code users LTG compile time can be important especially during the model development cycle, however since the introduction of parallel compilation with GEMPACK 11.4, the variation in compile times is less significant than for earlier releases of GEMPACK.

Rankings are very model-dependent, but in general Intel produces faster-running EXEs. However the GF64 MMRF4 Tablo-generated program is a clear row winner while there is no significant difference between GFortran and Intel Fortran for the TERM Tablo-generated program.

See also
GFortran compiler
Intel Fortran compiler
Lahey Fortran compiler