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

Language Developer Command MPI 1 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 mpiCC g++ -fopenmp
Fortran 77 PGI pgfortran3 mpif77 pgfortran -mp
Fortran 90/95/03 PGI pgfortran3 mpif90 pgfortran -mp
C PGI pgcc3 mpicc pgcc -mp
C++ PGI pgCC3 mpiCC pgCC -mp

1 To facilitate ease of use, the individual wrapper (mpif77, mpif90, mpicc, and mpiCC) combines respective compiler with corresponding header file and MPI library needed for compilation.
CAUTION: System defaults to the GNU family of compilers (e.g., mpicc points to the gcc compiler by default). To see how you can switch to PGI compilers, see compile with PGI compilers.
2 cc is an alias for gcc; c++ is an alias for g++.
3 Please read Portland Group Compilers Usage Notes on how PGI compilers impact job performance.

GNU compilers

  • Commonly used flags (applicable to gcc, g++, gfortran; see manpage for details)
    scc1% man gfortran            <-- gfortran manual (help) page
    scc1% g++ --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
    
  • Go to the Multiprocessor Programming page on how to compile OpenMP and MPI codes.

PGI compilers

  • Commonly used flags (applicable to pgcc, pgCC, pgfortran; see manpage for details)
    scc1% man pgfortran         <-- 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 -C ...           <-- array bounds checking
    scc1% pgcc -pg ...          <-- profiling
    scc1% pgcc -tp p7-32 ...    <-- 32-bit compilation
    
  • Go to the Multiprocessor Programming page on how to compile OpenMP and MPI codes.