Select HPC compilers with modules

Linux modules are often used by HPC systems allow using more current versions of software than are in the default system repositories. A typical approach is to create an .sh file for a particular job type. For example, to use gfortran, create and before building do source Likewise for Intel compilers source before the build. To avoid unexpected conflicts or hidden state, load only the modules necessary for a particular project.

These examples assume Bash shell. Determine the shell in use by

echo $0

GCC / Gfortran

To load recent GCC versions, upon login do


with containing:

module load cmake

module load gcc
export CC=gcc CXX=g++ FC=gfortran

module load openmpi



where contains something like:

module load cmake
module load intel

export FC=ifort CXX=icpc CC=icc

export MKLROOT=$SCC_MKL_LIB/../..

. $MKLROOT/bin/ intel64 lp64
. $MKLROOT/../bin/ -arch intel64
. $MKLROOT/../../../compilers_and_libraries/linux/mpi/bin64/


The current recommended method in general (for laptop or HPC) to use Julia is to download generic Julia Linux binary.