On the SCC, there are currently three families of compilers: GNU, Portland Group Inc. (PGI), and Intel. They are used for compiling C, C++, and Fortran codes. The system default is 64-bit compilation, while 32-bit compilation is also available.

The GNU and PGI compilers are automatically available after logging onto the SCC. To switch to the Intel compiler, use the module command:


scc1% module load intel/2016    <-- load the Intel compiler

The commands for the three compilers are listed in the following table:

Language Developer Command MPI1 OpenMP
Fortran 77 GNU gfortran mpif77 gfortran -fopenmp
Fortran 90/95/03 GNU gfortran mpif90 gfortran -fopenmp
C GNU gcc (cc)2 mpicc gcc -fopenmp
C++ GNU g++ (c++)2 mpicxx (mpic++, mpiCC)4 g++ -fopenmp
Fortran 77 PGI pgfortran (pgf77)3 mpif77 pgfortran -mp
Fortran 90/95/03 PGI pgfortran (pgf90, pgf95)3 mpif90 pgfortran -mp
C PGI pgcc mpicc pgcc -mp
C++ PGI pgc++ mpicxx (mpic++, mpiCC)4 pgc++ -mp
Fortran 77/90/95/03 Intel ifort mpifort (mpif90, mpif77)5 ifort -openmp
C Intel icc mpicc icc -openmp
C++ Intel icpc mpicxx (mpic++, mpiCC)4 icpc -openmp

1 To facilitate ease of use, the individual wrapper (mpif77, mpif90, mpicc, and mpicxx) combines the respective compiler with its corresponding header file and MPI library.
Note: The MPI commands point to the GNU compiler by default (e.g., mpicc points to the gcc). See Compile An MPI Program for how to switch to the PGI or Intel compilers.
2 cc is an alias for gcc; c++ is an alias for g++.
3 pgfortran works for Fortran 77/90/95/03 codes.
4 mpicxx, mpic++, and mpiCC work the same, no matter which compiler is in use.
5 mpifort, mpif90, and mpif77 work the same when the Intel compiler is in use.

GNU compilers

Here are some examples of commonly used flags applicable to gcc, g++, and gfortran compilers:

scc1% man gcc                 <-- gfortran manual (help) page
scc1% gcc --help              <-- concise options help file
scc1% gcc -o file-name ...    <-- executable name
scc1% gcc -On ...             <-- code optimization; n=0,1,2,3; recommends 3
scc1% gcc -g ...              <-- debug mode
scc1% gcc -Warray-bounds ...  <-- arrays bound checking
scc1% gcc -pg ...             <-- profiling
scc1% gcc -m32 ...            <-- 32-bit compilation

See Multiprocessor Programming for how to compile OpenMP and MPI codes.

Please read Portland Group Compilers Usage Notes for how PGI compilers impact job performance.

PGI compilers

Here are some examples of commonly used flags applicable to pgcc, pgc++, pgfortran compilers:


scc1% man pgcc              <-- pgfortran manual (help) page
scc1% pgcc -help            <-- concise options help file
scc1% pgcc -o file-name ... <-- executable name
scc1% pgcc -On ...          <-- code optimization; n=0,1,2,3,4,fast; recommends 3
scc1% pgcc -g ...           <-- debug mode
scc1% pgcc -pg ...          <-- profiling
scc1% pgcc -m32 ...         <-- 32-bit compilation

Go to the Multiprocessor Programming page on how to compile OpenMP and MPI codes.

Intel compilers

Here are some examples of commonly used flags applicable to icc, icpc, ifort compilers:


scc1% man icc              <-- icc manual page
scc1% icc -help            <-- concise options help file
scc1% icc -o file-name ... <-- executable name
scc1% icc -On ...          <-- code optimization; n=0,1,2,3,4,fast; recommends 3
scc1% icc -fast ...        <-- accelerate the program (recommended)
scc1% icc -g ...           <-- debug mode
scc1% icc -p ...           <-- profiling (-pg is also valid)
scc1% icc -m32 ...         <-- 32-bit compilation

Go to the Multiprocessor Programming page on how to compile OpenMP and MPI codes.