ARCHIVED: Compile Fortran programs on Big Red II at IU
On this page:
Big Red II was retired from service on December 15, 2019; for more, see ARCHIVED: About Big Red II at Indiana University (Retired).
Overview
On Big Red II at Indiana University, Fortran code that will execute on the compute nodes should be compiled with the ftn
command. The command will indirectly invoke the Cray, Portland Group (PGI), or GNU (GCC) Fortran compiler depending on the programming environment you have loaded.
crayftn
), PGI (pgf95
), or GCC (gfortran
) Fortran compiler on Big Red II if your code is going to execute on the compute nodes. You can use them only for programs that will run on the login or service nodes.
Programming environments on Big Red II are controlled using the Modules user environment package. The following programming environment modules are available on Big Red II; information about using ftn
with each is provided below:
The only compiler switch common to each programming environment is
default64
, which promotes all integers and real numbers to a 64-bit default, and is compatible with the 64-bit MPI libraries.
Cray
The ftn
command will invoke the Cray Fortran compiler when the Cray programming environment module (PrgEnv-cray/4.1.40
) is loaded. To load the module, on the command line, enter:
module load PrgEnv-cray/4.1.40
The Cray compiler switches are heavily treed. The top-level switches contain most legacy switches, such as -o
(output file), -O
(optimization; default is -O2
),
-l
(library name), and -L
(library directory). Other switches, such as -e
(enable compiling options), -d
(disable compiling options), and
-h
(arguments), have multiple sub-options.
For details about Cray Fortran compiler switches and options, see the crayftn
manual page on Big Red II; on the command line, enter:
man crayftn
Portland Group (PGI)
The ftn
command will invoke the PGI Fortran compiler when the PrgEnv-pgi/4.1.40
programming environment module is loaded. To load the module, on the command line, enter:
module load PrgEnv-pgi/4.1.40
Although you'll use ftn
to indirectly invoke the PGI Fortran compiler, you'll use it with most of the normal
pgf95
compiler switches (except the
-Mprof=mpi
, -Mmpi
, and
-Mscalapack
switches, which are not supported on Cray XT systems).
For details about the available PGI Fortran compiler switches and options, see the pgf95
manual page on Big Red II; on the command line, enter:
man pgf95
GNU
The ftn
command will invoke the GNU Compiler Collection (GCC) Fortran compiler when the PrgEnv-gnu/4.1.40
programming environment module is loaded. To load the module, on the command line, enter:
module load PrgEnv-gnu/4.1.40
Although you'll use the ftn
command to indirectly invoke the GCC Fortran compiler, you'll use it with the normal set of
gfortran
compiler switches.
For details about GCC Fortran compiler switches and options, see the
gfortran
manual page on Big Red II; on the command line, enter:
man gfortran
This is document bdnm in the Knowledge Base.
Last modified on 2023-04-21 16:59:01.