Compiling Software

This section provides information about the available compilers on ALICE and SHARK.

Keep in mind that users do not have sudo permissions on the clusters.

If you need assistance with building software, please reach out to the support team for your cluster.

Available Compilers

On ALICE or SHARK, you can select from a number of different compilers and different versions thereof:


ALICE

ALICE provides GNU and Intel compilers for compiling your own software

Within the EasyBuild framework used by ALICE, these compilers are combined with other libraries into common toolchains. The available toolchains are called foss (“free and open source software”) and intel.

Making use of the toolchain instead of only the compiler can be helpful if you need access to other libraries such as OpenMPI (for foss).

The toolchains are available in different version, e.g. for foss

[me@nodelogin02 ~]$ module -r avail ^foss ----------------------------- /cm/shared/easybuild/modules/all ------------------------------ foss/2017a foss/2018b foss/2020a fosscuda/2019a foss/2017b foss/2019a foss/2020b fosscuda/2019b foss/2018a foss/2019b foss/2021a (D) fosscuda/2020b (D)

Toolchains from foss/2021a and later always require loading the CUDA module separately.

Of course, you can still load only the GCC module that you need for compiling software, e.g.,

[me@nodelogin02 ~]$ module -r avail ^GCC ----------------------------- /cm/shared/easybuild/modules/all ------------------------------ GCC/4.9.3-2.25 GCC/8.3.0 GCCcore/4.9.3 GCCcore/8.3.0 GCC/5.4.0-2.26 GCC/8.3.0-2.32 GCCcore/5.4.0 GCCcore/9.3.0 GCC/6.3.0-2.27 GCC/9.3.0 GCCcore/6.3.0 GCCcore/10.2.0 GCC/6.4.0-2.28 GCC/10.2.0 GCCcore/6.4.0 GCCcore/10.3.0 GCC/7.3.0-2.30 GCC/10.3.0 GCCcore/7.3.0 GCCcore/11.2.0 (D) GCC/8.2.0-2.31.1 GCC/11.2.0 (D) GCCcore/8.2.0

If you need to build your program with MPI support, you can load an available OpenMPI module

[me@nodelogin02 ~]$ module -r avail ^OpenMPI ------------------------------ /cm/shared/easybuild/modules/all ------------------------------- OpenMPI/2.0.2-GCC-6.3.0-2.27 OpenMPI/3.1.4-gcccuda-2019b OpenMPI/2.1.1-GCC-6.4.0-2.28 OpenMPI/4.0.1-GCC-8.3.0-2.32 OpenMPI/2.1.2-GCC-6.4.0-2.28 OpenMPI/4.0.3-GCC-9.3.0 (D) OpenMPI/3.1.1-GCC-7.3.0-2.30 OpenMPI/4.0.5-GCC-10.2.0 OpenMPI/3.1.3-GCC-8.2.0-2.31.1 OpenMPI/4.0.5-gcccuda-2020b OpenMPI/3.1.3-gcccuda-2019a OpenMPI/4.1.1-GCC-10.3.0 OpenMPI/3.1.4-GCC-8.3.0

If you then need another module, you can load the module matching the version of GCC that you want to use.

The Intel toolchain can be access using the intel module, e.g.,


SHARK

SHARK provides GNU compiles for compiling your software.

You can find them in the system branch of the module tree:

If you need compile your software with MPI support, you need to load the corresponding module of MPI:


This is a handy reference table for showing you which MPI compiler matches which language

Language

C

C++

Fortran77

Fortran90

Fortran95

Language

C

C++

Fortran77

Fortran90

Fortran95

Command

mpicc

mpiCC

mpif77

mpif90

mpif95

You can find a basic example for compiling a program with MPI support and run it on the cluster in the Tutorials section: Your first MPI job