(For information about installed compilers on Abisko, go to our page 'Abisko: Installed Compilers'.)
There are compilers available for Fortran 77, Fortran 90, Fortran 95, C, and C++. The compilers can produce both general-purpose code and architecture-specific optimized code to improve performance (loop-level optimizations, inter-procedural analysis and cache optimizations).
The way to access compilers on Kebnekaise is a bit different than on Abisko. They are arranged in 'Compiler toolchains', which are bundles of software making up a complete environment for compiling or using a specific prebuilt software. A toolchain usually includes a compiler suite, an MPI version, BLAS, LAPACK, ScaLapack, and FFTW. It may also be just a compiler, like GCC alone, or something in between.
If you do
when you have logged in, you will get a list of (mainly) the compiler toolchains and their respective versions. You should always specify the full version when loading a compiler or software package.
Currently available toolchains:
ml av <compiler toolchain>
to see which versions are available.
In order to be able to use compiler toolchain, you need to load it with
ml <compiler toolchain>
You can get more information/description about a toolchain with
ml spider <compiler toolchain>
For more information, go to our page about the module system on Kebnekaise.
Here you also now have access to the CUDA toolkit, including the CUDA compilers (nvcc).
Using a compiler toolchain by itself is possible but requires a fair bit of manual work, figuring out which paths to add to -I or -L for include files and libraries, and similar.
To make life as a software builder easier there is a special module available, buildenv, that can be loaded on top of any toolchain. If it is missing for some toolchain, send a mail to email@example.com and let us know.
This module defines a large number of environment variables with the relevant settings for the used toolchain. Among other things it sets CC, CXX, F90, FC, MPICC, MPICXX, MPIF90, CFLAGS, FFLAGS, and much more.
To see all of them do, after loading a toolchain
ml show buildenv
Depending on the software one can use these environment variables to set related makefile variables or cmake defines, or just use them for guidelines on what to use in makefiles etc.
How to use them exactly depends on the softwares build system.