Compilers and Build Tools
CARC has compilers and related build tools for installing software available.
Compilers
The following table describes the C/C++/Fortran/MPI/CUDA compilers available on CARC HPC clusters and how to load them:
Compiler family | Compilers | Modules |
---|---|---|
GCC | gcc, g++, gfortran | module load gcc |
LLVM | clang, clang++, flang | module load llvm |
AOCC | clang, clang++, flang | module load aocc |
Intel | dpcpp, icx, icpx, ifx, icc, icpc, ifort, mpiicc, mpiicpc, mpiifort | module load intel-oneapi |
OpenMPI | mpicc, mpicxx, mpifort | module load gcc/11.3.0 openmpi/4.1.4 |
MPICH | mpicc, mpicxx, mpifort | module load gcc/11.3.0 mpich/4.0.2 |
MVAPICH2 | mpicc, mpicxx, mpifort | module load gcc/11.3.0 mvapich2/2.3.7 |
NVIDIA | nvc, nvc++, nvfortran, nvcc | module load nvhpc |
NVIDIA/CUDA | nvcc | module load gcc/11.3.0 cuda/11.6.2 |
The latest version of a compiler family installed is loaded by default, but typically more than one version of a compiler family is available. Use the module spider
command to see all available versions (e.g., module spider gcc
).
All of these compilers provide optimization options that can be used to optimize programs, such as targeting specific CPU microarchitectures or GPU architectures. Consult the compiler documentation listed under Additional Resources at the bottom for more information.
Build tools
CARC offers a few popular tools that help build and test software: Make, Autotools, CMake, and Meson.
Make
To use GNU Make, load modules like the following:
module load gcc/11.3.0 gmake
Autotools
To use GNU Autotools, load modules like the following:
module load gcc/11.3.0 automake autoconf libtool m4 gmake
CMake
To use CMake, load modules like the following:
module load gcc/11.3.0 cmake gmake
If using Ninja instead of Make, replace gmake
with ninja
:
module load gcc/11.3.0 cmake ninja
For more deatiled information, see the CMake user guide.
Meson
To use Meson, typically with Ninja, load modules like the following:
module load gcc/11.3.0 meson ninja
Other tools
There are other tools available that are useful for building software and that you may wish to load, including git
, pkgconf
, and binutils
.
Package managers
If you want to build and manage an entire software stack from source code, there are two popular package managers: EasyBuild and Spack. Both are open-source, community supported package managers. To use them, install them in one of your directories and configure tham as needed.
EasyBuild is designed to make scientific software installation easier and can be used without much prior knowledge of compilers and program optimization.
Spack offers more flexibility and optimization options, but may have a steeper learning curve compared to EasyBuild. CARC uses Spack to build most of the software that is provided via software modules on our HPC clusters. CARC provides some template YAML files for creating Spack environments here.
Note: package build recipes may not exist for your software of interest, so you may need to create and contribute them yourself. Please see the official EasyBuild or Spack tutorials linked below for instructions on how to do this.
Additional resources
If you have questions about or need help with compilers or build tools, please submit a help ticket and we will assist you.
EasyBuild tutorials Spack tutorials OpenMP user guide MPI user guide GPU user guide Rust user guide