Skip to main content
Skip to main content

Fortran

Affiliation OMNI Cluster
Billing

Free of charge

Documentation

Pre-installed on the cluster

9.3.0 recommended, but several versions available

Other

Year of publication: 1957 and the first high-level programming language ever actually realized.

General

There are two different Fortran compilers on the cluster: one is gfortran which is part of the Gnu Compiler Collection (GCC) and the other is the Intel Fortran Compiler.

 

There are other tools available for software development that are not listed on this page. For example, Totalview can be used for parallel debugging. Various Intel tools are available for performance measurement and optimization.


 

GCC Fortran compiler (gfortran)

 

The GCC compiler is installed in several versions. However, it is advisable to use version 9.3.0, which is installed as part of OpenHPC, but version 8.3.1 is also available from the operating system side. The former is also loaded by default as module gnu9 is loaded by default. Its documentation can be found here. Other versions may be available and can be listed with module avail or module spider gnu.

The command to call the Fortran compiler is gfortran.

In addition to the compiler, GCC also encompasses the Gnu Debugger (gdb) which is installed in the version 8.2.12 and can debug Fortran. The command for the debugger it is gdb.

Here is an example of the GCC module being loaded and the C compiler version being queried:

$ module load gnu9
$ gfortran --version
GNU Fortran (GCC) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 

Intel Fortran compiler

The software suite Intel Parallel Studio is installed on the cluster, it includes the Intel compiler version 19.1.3. Additionally, the older version 19.0.5 is installed. The intalled versions can be displayed with module spider intel.

The command for calling the Fortran compiler is ifort . Here is an example of the Intel module being loaded and the Fortran compiler version being queried:

$ module load intel
$ ifort --version
ifort (IFORT) 19.1.3.304 20200925
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

In this example, the module was loaded without specifying a version. In that case, the default setting for the module is used (it is marked with (D) on a module avail).