Skip to content
NAISS Logo
Allocations Support Training Software naiss.se

The programming environments

Programming (or software build) environments on an HPC system like Arrhenius are a collection of HPC tools facilitating the development and building of (typically parallelized) scientific software, all the while making the most efficient use possible of the underlying hardware. The programming environments typically contain optimizing compilers, libraries, debuggers and profilers as well as various supporting software to improve quality of life on the machine for the working scientist. All build environments on Arrhenius contain the following base components

  • Compiler (e.g. GCC, Intel, NVHPC)
  • MPI implementation (e.g. OpenMPI, Cray-MPICH, Intel MPI)
  • Numerical libraries
    • BLAS/LAPACK implementation (e.g. Intel MKL, OpenBLAS, NVPL)
    • FFTW implementation (e.g. Intel MKL, FFTW, NVPL)
    • ScaLAPACK implementation (e.g. Intel MKL, NVPL)

The GPU specific build environments in addition contain a CUDA SDK, as well as some CUDA dependent numerical and communication libraries like NCCL, NVSHMEM and cuFFTmp.

Programming environments are mainly accessed via the module system on Arrhenius. One exception is the access to the Cray programming environments, which need an extra step due to them being encapsulated in software containers on Arrhenius. Inside of these containers is a module system which can be used like on the outside, only with different content native to that particular container.

There are two principal (but synonymous) names to programming environments on Arrhenius, buildenv- and PrgEnv-, where the latter is the name used to identify build/programming environments offered by HPE Cray, it is the name under which they offer their build and development environments. The former name indicate an environment provided by NAISS.

If you have no specific knowledge or requirements on what build environment you need, you are advised to choose buildenv-intel for the CPU partition and buildenv-nvhpc for the GPU partition. Use the latest version available. Otherwise choose a programming environment based on the particular needs of the software you are building. For instance:

  • If the software benefits from using a certain compiler, choose a buildenv containing it
  • If the software benefits from the use of an especially fast MPI implementation for the machine, choose Cray MPICH from a CPE container
  • If the software requires (or benefits highly from using) a special set of numerical libraries choose a buildenv containing that set.

A solid choice to get started is buildenv-intel on the CPU partition and buildenv-nvhpc on the GPU partition. The CPE choice is a very good choice on both partitions, but requires some extra steps to use.

The detailed content of the different build environments are listed in the NAISS Provided Build Environments and Cray Programming Environments sections below.

NAISS Provided Build Environments

The NAISS provided build environments are at the time of writing these

  • CPU partition
    • buildenv-intel/2023a-eb. Content predominantly from Intel oneAPI release 2023.1
      • Intel Classic compilers
      • Intel MPI 2021.9
      • Intel MKL for BLAS/LAPACK, FFT(W), ScaLAPACK
    • buildenv-intel/2025b-eb. Content predominantly from Intel oneAPI release 2025.2
      • Intel "modern" compilers
      • Intel MPI 2021.16
      • Intel MKL for BLAS/LAPACK, FFT(W), ScaLAPACK
    • buildenv-gcc/2025b-eb Content based on the foss25b EasyBuild toolchain
      • GCC 14.3.0
      • OpenMPI 5.0.8
      • FlexiBLAS, FFTW 3.3.10 and ScaLAPACK 2.2.2
    • buildenv-gcc/2026.03
      • GCC 14.3.0
      • MPICH 4.3.2
      • OpenBLAS 0.3.32, FFTW 3.3.11 and ScaLAPACK 2.2.3
  • GPU partition
    • GPU/buildenv-nvhpc/25.9-cu13.0
      • NVHPC 25.9
      • CUDA 13.0
      • OpenMPI 5.0.10
      • NCCL 2.27.7 (+ AWS ofi plugin 1.19.2)
      • NVSHMEM 3.4.5
      • NVPL for BLAS/LAPACK, ScaLAPACK and FFT
      • cuFFTMp 11.4.0
    • GPU/buildenv-gcccuda/2026.03-cu13.0
      • GCC 14.3.0
      • CUDA 13.0.3
      • MPICH 4.3.2
      • NCCL 2.29.7 (+ AWS ofi plugin 1.19.2)
      • NVSHMEM 3.4.5
      • OpenBLAS 0.3.32, FFTW 3.3.11 and ScaLAPACK 2.2.2
      • cuFFTMp 12.1.3

All of the above environments can be loaded (module load <env>) and used as you would expect on an HPC system. Applications built with them can be launched on the cluster using launchers mpprun, Slurm's srun and the MPI native launchers (mpiexec/mpirun et. al.).

Cray Programming Environments

The Cray programming environments (CPE) on Arrhenius are offered in containers, specifically using the apptainer/singularity container format and runtime, which is generally available without needing to load a module. As a consequence of using an apptainer when building applications, there is an initial step where you enter an interactive shell session in the container, which is initialized in a way compliant with the CPE requirements. The base operating system of the container is the same as that of the login and compute nodes ensuring compatibility.

Applications built with the CPE must also be executed on the cluster using the same CPE version used for the build, see the Running Applications Built in the Cray Programming Environment section. The mpprun launcher wrapper provided on Arrhenius simplifies the parallel launch process for applications built in the CPE container environments, in essence you launch your application with the command mpprun --container <container_name> <application>. However, note that Slurm is not functional on the inside of the containers, that is, srun, salloc and similar Slurm commands will not work when in a container shell.

For general documentation detailing the use of CPE, please see the official documentation at https://cpe.ext.hpe.com/docs/latest/index.html.

Building applications in the Cray programming environment

Using the CPEs on Arrhenius typically involves these steps

  1. Access a shell in the CPE container using the hpc_container_shell <container> command
  2. Load appropriate modules for your requirements in the container shell.
    • The programming environment loaded by default in the shell you enter is PrgEnv-cray.
    • Common other choices would be PrgEnv-gnu and on the GPU-nodes additionally PrgEnv-nvidia.
  3. Build your application and its requirements according to their documentation as you would do normally.
  4. Exit the container with exit or Ctrl-d as you would any shell.
  5. Run the CPE-built software.

To illustrate, first list the available Cray programming environments using the hpc_container_shell command

[<user>@arrhenius ~]$ hpc_container_shell

Usage: hpc_container_shell <container> [--reinit] [-m <module> [-m <module> ...]]

Arguments:
  <container> the name of the container to use (see below)
  --reinit    reinitialize module environment for program running inside the container (forgets PATH settings, etc.)
  -u          Don't clean environment
  -m          load modules inside the container (forces --reinit).
              To list available modules run: hpc_container_shell <container> --reinit bash -c 'module avail'

List of containers available in the current environment:

* cpe_25_09: Cray Programming Environment (CPE) v25.09

Loading one of the available CPEs listed will land you in a container having NAISS additions/enhancements added to the standard CPE experience allowing, among other things, simplified run-time launching of your applications built and an integrated EasyBuild system providing additional software titles and the opportunity for users to extend the software catalogue with their own titles.

[<user>@arrhenius ~]$ hpc_container_shell cpe_25_09
HPC_NOTE: hpc_container_shell running container cpe_25_09

APPTAINER[cpe_25_09] /home/exampleuser> module avail
HPC_NOTE: hpc_container_shell running container cpe_25_09

-------------------------------------------------------------------------------------- /software/sse2/el9_cpe_25_09/modules --------------------------------------------------------------------------------------
   Elk/recommendation              (D)    Python/recommendation (D)    buildenv-cpe_cray/recommendation (D)    buildtool-easybuild/5.2.1-hpca3ef7d197
   Elk/8.5.2-hpc1-cpeCray-20.09-eb        Python/3.14.2-hpc1           buildenv-cpe_cray/25.09-eb              testme/1.0

-------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/mpi/crayclang/20.0/ofi/1.0/cray-mpich/8.0 ---------------------------------------------------------------------
   cray-hdf5-parallel/1.14.3.7    cray-mpixlate/1.0.9    cray-parallel-netcdf/1.12.3.19

-------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/perftools/25.09.0 ---------------------------------------------------------------------------------
   perftools-lite-events    perftools-lite-gpu    perftools-lite-hbm    perftools-lite-loops    perftools-lite    perftools-preload    perftools

--------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0 ---------------------------------------------------------------------------------
   cray-fftw/3.3.10.11

-------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/comnet/crayclang/20.0/ofi/1.0 ---------------------------------------------------------------------------
   cray-mpich-abi/8.1.33    cray-mpich/8.1.33 (L)

----------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/net/ofi/1.0 ------------------------------------------------------------------------------------
   cray-openshmemx/11.8.0

----------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/compiler/crayclang/20.0 ------------------------------------------------------------------------------
   cray-hdf5/1.14.3.7    cray-libsci/25.09.0 (L)

---------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/mix_compilers -----------------------------------------------------------------------------------
   cce-mixed/20.0.0    gcc-native-mixed/14

------------------------------------------------------------------------------ /opt/cray/pe/lmod/modulefiles/craype-targets/default ------------------------------------------------------------------------------
   craype-accel-amd-gfx908    craype-accel-host         craype-accel-nvidia90    craype-hugepages32M         craype-network-ucx    craype-x86-rome    (L)    craype-x86-turin
   craype-accel-amd-gfx90a    craype-accel-intel-max    craype-arm-grace         craype-hugepages512M        craype-x86-genoa      craype-x86-spr-hbm
   craype-accel-amd-gfx940    craype-accel-nvidia70     craype-hugepages1G       craype-network-none         craype-x86-milan-x    craype-x86-spr
   craype-accel-amd-gfx942    craype-accel-nvidia80     craype-hugepages2M       craype-network-ofi   (L)    craype-x86-milan      craype-x86-trento

--------------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/core ---------------------------------------------------------------------------------------
   PrgEnv-cray/8.6.0 (L)    cce/20.0.0    (L)    cray-ccdb/5.0.7         cray-dyninst/12.3.6    cray-zmqnet/1.3.2        gdb4hpc/4.16.5                sanitizers4hpc/1.1.6
   PrgEnv-gnu/8.6.0         cpe/25.09_fix        cray-cti/2.20.0         cray-mrnet/5.1.6       craype/2.7.35     (L)    papi/7.2.0.2                  valgrind4hpc/2.13.6
   atp/3.15.7               cpe/25.09     (D)    cray-dsmml/0.3.1 (L)    cray-stat/4.12.6       gcc-native/14            perftools-base/25.09.0 (L)

------------------------------------------------------------------------------------ /opt/cray/pe/lmod/lmod/modulefiles/Core -------------------------------------------------------------------------------------
   StdEnv (L)    lmod    settarg

--------------------------------------------------------------------------------------------- /opt/cray/modulefiles ----------------------------------------------------------------------------------------------
   xpmem/1.0.1-1.4_gf67ddfb318d4 (L)

------------------------------------------------------------ This is a list of module extensions. Use "module --nx avail ..." to not show extensions. ------------------------------------------------------------
    flit_core (E)     packaging (E)     pip (E)     setuptools (E)     setuptools_scm (E)     tomli (E)     typing_extensions (E)     wheel (E)

The standard set of modules loaded can be seen using the module list command directly upon entering the container.

APPTAINER[cpe_25_09] /home/exampleuser> module list

Currently Loaded Modules:
  1) cce/20.0.0           3) craype/2.7.35      5) PrgEnv-cray/8.6.0   7) xpmem/1.0.1-1.4_gf67ddfb318d4   9) perftools-base/25.09.0  11) StdEnv               13) hpc/.1.14.2-12-gae4120e (H,S)
  2) craype-network-ofi   4) cray-dsmml/0.3.1   6) craype-x86-rome     8) cray-libsci/25.09.0            10) cray-mpich/8.1.33       12) hpc_sysenv/.1 (H,S)

  Where:
   S:  Module is Sticky, requires --force to unload or purge
   H:             Hidden Module

Running Applications Built in the Cray Programming Environment

The recommended way to run CPE built software in a Slurm allocation is by using the mpprun launcher wrapper with the --container <container_name> switch. The application is ultimately launched by something like srun <srun_switches> apptainer exec <apptainer_switches> <container> <your_application>, but mpprun keeps track of some metadata and switches needed to make the experience smooth. An example script for running a job via the batch queue can look like

#!/bin/bash
#SBATCH -p cpu
#SBATCH -t 10
#SBATCH -n 64
#SBATCH -c 8

mpprun --container cpe_25_09 osu_mbw_mr

Be aware that the container used at run time must be the same as the one used at build time.