# prgenv-gnu

Provides a set of tools and libraries built around the GNU compiler toolchain. It is the go to programming environment on all systems and target node types, that is it is the first that you should try out when starting to compile an application or create a python virtual environment.

> [!NOTE]
>
> **alternatives to prgenv-gnu**
>
> The [`prgenv-nvfortran`](<https://docs.cscs.ch/software/prgenv/prgenv-nvfortran/index.md#prgenv-nvfortran>) is for applications that require the NVIDIA Fortran compiler - typically because they need to use OpenACC or CUDA Fortran.
>
> The [`linalg`](<https://docs.cscs.ch/software/prgenv/linalg/index.md#linalg>) environment is similar to prgenv-gnu, with additional linear algebra and mesh partitioning algorithms.
>
> The [`prgenv-gnu-openmpi`](<https://docs.cscs.ch/software/prgenv/prgenv-gnu-openmpi/index.md#prgenv-gnu-openmpi>) is otherwise similar to `prgenv-gnu`, but provides OpenMPI instead of Cray MPICH.
>
> The [`prgenv-intel`](<https://docs.cscs.ch/software/prgenv/prgenv-intel/index.md#prgenv-intel>) is similar to `prgenv-gnu`, but provides the intel OneAPI compiler. Only available on [Eiger](<https://docs.cscs.ch/clusters/eiger/index.md#eiger>), and provides fewer general libraries than the full GNU environment.

## Versioning

The naming scheme is `prgenv-gnu/<version>`, where `<version>` has the `YY.M[M]` format, for example November 2024 is `24.11`, and January 2025 would be `25.1`.

The release schedule is not fixed, with new versions will be released roughly every 3-6 months, when there is a compelling reason to update.

| version | node types | system |
| --- | --- | --- |
| 26.9 | gh200, zen2 | daint, eiger, santis, clariden |
| 26.3 | gh200, zen2 | daint, eiger, santis, clariden |
| 25.11 | gh200, zen2 | daint, eiger, santis, clariden |
| 25.6 | gh200, zen2 | daint, eiger, santis, clariden |

> [!NOTE]
>
> **Removed versions**
>
> The following versions have been removed:
>
> | version | Removal date |
> | --- | --- |
> | 24.11 | April 2026 |
> | 24.7 | April 2026 |

### Deprecation policy

We will provide full support for 12 months after the uenv image is released, and remove the images when they are no longer being used or when system upgrades break their functionality on the system.

- It is recommended to document how you compiled and set up your workflow using `prgenv-gnu` so that you can recreate it with future versions.

### Versions

The key updates in version 26.9 compared to 26.3 are:

- upgrading GCC to version 16.2 and CUDA to version 13.4
- upgrading Cray MPICH to version 9.2.1 and libfabric to version 2.6.0
- adding [cuFFTMp](<https://docs.nvidia.com/hpc-sdk/cufftmp/>) and [NVSHMEM](<https://docs.cscs.ch/software/communication/nvshmem/index.md#nvshmem>)

v2 of the uenv upgrades Kokkos and Kokkos Kernels from version 4.7.04 to 5.2.2.

> [!NOTE]
>
> **all packages exposed via the `default` and `modules` views in `v2`**
>
> - [aws-ofi-nccl@1.19.0](<https://packages.spack.io/package.html?name=aws-ofi-nccl>)
> - [boost@1.90.0](<https://packages.spack.io/package.html?name=boost>)
> - [cmake@3.31.12](<https://packages.spack.io/package.html?name=cmake>)
> - [cray-mpich@9.2.1](<https://packages.spack.io/package.html?name=cray-mpich>)
> - [cuda@13.4.1](<https://packages.spack.io/package.html?name=cuda>)
> - [cufftmp@11.4.0.6](<https://packages.spack.io/package.html?name=cufftmp>)
> - [fftw@3.3.11](<https://packages.spack.io/package.html?name=fftw>)
> - [fmt@12.2.0](<https://packages.spack.io/package.html?name=fmt>)
> - [gcc@16.2.0](<https://packages.spack.io/package.html?name=gcc>)
> - [gmp@6.3.0](<https://packages.spack.io/package.html?name=gmp>)
> - [gsl@2.8](<https://packages.spack.io/package.html?name=gsl>)
> - [hdf5@1.14.6](<https://packages.spack.io/package.html?name=hdf5>)
> - [kokkos@5.2.2](<https://packages.spack.io/package.html?name=kokkos>)
> - [kokkos-kernels@5.2.2](<https://packages.spack.io/package.html?name=kokkos-kernels>)
> - [kokkos-tools@5.2.0](<https://packages.spack.io/package.html?name=kokkos-tools>)
> - [libfabric@2.6.0](<https://packages.spack.io/package.html?name=libfabric>)
> - [libtree@3.1.1](<https://packages.spack.io/package.html?name=libtree>)
> - [lua@5.4.8](<https://packages.spack.io/package.html?name=lua>)
> - [lz4@1.10.0](<https://packages.spack.io/package.html?name=lz4>)
> - [meson@1.12.0](<https://packages.spack.io/package.html?name=meson>)
> - [nccl@2.29.7-1](<https://packages.spack.io/package.html?name=nccl>)
> - [nccl-tests@2.17.6](<https://packages.spack.io/package.html?name=nccl-tests>)
> - [netcdf-c@4.10.0](<https://packages.spack.io/package.html?name=netcdf-c>)
> - [netcdf-cxx@4.2](<https://packages.spack.io/package.html?name=netcdf-cxx>)
> - [netcdf-cxx4@4.3.1](<https://packages.spack.io/package.html?name=netcdf-cxx4>)
> - [netcdf-fortran@4.6.4](<https://packages.spack.io/package.html?name=netcdf-fortran>)
> - [netlib-scalapack@2.2.3](<https://packages.spack.io/package.html?name=netlib-scalapack>)
> - [ninja@1.13.2](<https://packages.spack.io/package.html?name=ninja>)
> - [nvshmem@3.8.0-0](<https://packages.spack.io/package.html?name=nvshmem>)
> - [openblas@0.3.34](<https://packages.spack.io/package.html?name=openblas>)
> - [osu-micro-benchmarks@7.5.2](<https://packages.spack.io/package.html?name=osu-micro-benchmarks>)
> - [papi@7.2.0](<https://packages.spack.io/package.html?name=papi>)
> - [python@3.14.5](<https://packages.spack.io/package.html?name=python>)
> - [superlu@7.0.1](<https://packages.spack.io/package.html?name=superlu>)
> - [xcb-util-cursor@0.1.6](<https://packages.spack.io/package.html?name=xcb-util-cursor>)
> - [zlib-ng@2.3.3](<https://packages.spack.io/package.html?name=zlib-ng>)

The key updates in version 26.3 compared to 25.11 are upgrading CUDA to version 13.1 and Cray MPICH to 9.1.0.

> [!NOTE]
>
> **all packages exposed via the `default` and `modules` views in `v1`**
>
> - [aws-ofi-nccl@1.17.2](<https://packages.spack.io/package.html?name=aws-ofi-nccl>)
> - [boost@1.89.0](<https://packages.spack.io/package.html?name=boost>)
> - [cmake@3.31.11](<https://packages.spack.io/package.html?name=cmake>)
> - [cray-mpich@9.1.0](<https://packages.spack.io/package.html?name=cray-mpich>)
> - [cuda@13.1.1](<https://packages.spack.io/package.html?name=cuda>)
> - [fftw@3.3.10](<https://packages.spack.io/package.html?name=fftw>)
> - [fmt@12.1.0](<https://packages.spack.io/package.html?name=fmt>)
> - [gcc@14.3.0](<https://packages.spack.io/package.html?name=gcc>)
> - [gmp@6.3.0](<https://packages.spack.io/package.html?name=gmp>)
> - [gsl@2.8](<https://packages.spack.io/package.html?name=gsl>)
> - [hdf5@1.14.6](<https://packages.spack.io/package.html?name=hdf5>)
> - [kokkos@4.7.02](<https://packages.spack.io/package.html?name=kokkos>)
> - [kokkos-kernels@4.7.02](<https://packages.spack.io/package.html?name=kokkos-kernels>)
> - [kokkos-tools@develop](<https://packages.spack.io/package.html?name=kokkos-tools>)
> - [libfabric@2.4.0](<https://packages.spack.io/package.html?name=libfabric>)
> - [libtree@3.1.1](<https://packages.spack.io/package.html?name=libtree>)
> - [lua@5.4.8](<https://packages.spack.io/package.html?name=lua>)
> - [lz4@1.10.0](<https://packages.spack.io/package.html?name=lz4>)
> - [meson@1.10.1](<https://packages.spack.io/package.html?name=meson>)
> - [nccl@2.29.2-1](<https://packages.spack.io/package.html?name=nccl>)
> - [nccl-tests@2.17.6](<https://packages.spack.io/package.html?name=nccl-tests>)
> - [netcdf-c@4.9.3](<https://packages.spack.io/package.html?name=netcdf-c>)
> - [netcdf-cxx@4.2](<https://packages.spack.io/package.html?name=netcdf-cxx>)
> - [netcdf-cxx4@4.3.1](<https://packages.spack.io/package.html?name=netcdf-cxx4>)
> - [netcdf-fortran@4.6.2](<https://packages.spack.io/package.html?name=netcdf-fortran>)
> - [netlib-scalapack@2.2.2](<https://packages.spack.io/package.html?name=netlib-scalapack>)
> - [ninja@1.13.2](<https://packages.spack.io/package.html?name=ninja>)
> - [openblas@0.3.30](<https://packages.spack.io/package.html?name=openblas>)
> - [osu-micro-benchmarks@7.5.2](<https://packages.spack.io/package.html?name=osu-micro-benchmarks>)
> - [papi@7.2.0](<https://packages.spack.io/package.html?name=papi>)
> - [python@3.14.3](<https://packages.spack.io/package.html?name=python>)
> - [superlu@7.0.1](<https://packages.spack.io/package.html?name=superlu>)
> - [xcb-util-cursor@0.1.5](<https://packages.spack.io/package.html?name=xcb-util-cursor>)
> - [zlib-ng@2.3.3](<https://packages.spack.io/package.html?name=zlib-ng>)

The key update in version 25.11 compared to 25.6 is that libfabric was updated from the system-provided version 1.22 to a a newer version 2.3.1 built from [source](<https://github.com/ofiwg/libfabric>). This newer version brings stability and performance improvements, in particular to NCCL workloads.

`netcdf-cxx4` also was added to the uenv, alongside the other NetCDF packages `netcdf-c`, `netcdf-cxx`, and `netcdf-fortran`.

> [!NOTE]
>
> **all packages exposed via the `default` and `modules` views in `v1`**
>
> - [aws-ofi-nccl@1.16.3](<https://packages.spack.io/package.html?name=aws-ofi-nccl>)
> - [boost@1.88.0](<https://packages.spack.io/package.html?name=boost>)
> - [cmake@3.31.9](<https://packages.spack.io/package.html?name=cmake>)
> - [cray-mpich@8.1.32](<https://packages.spack.io/package.html?name=cray-mpich>)
> - [cuda@12.9.0](<https://packages.spack.io/package.html?name=cuda>)
> - [fftw@3.3.10](<https://packages.spack.io/package.html?name=fftw>)
> - [fmt@12.0.0](<https://packages.spack.io/package.html?name=fmt>)
> - [gcc@14.2.0](<https://packages.spack.io/package.html?name=gcc>)
> - [gsl@2.8](<https://packages.spack.io/package.html?name=gsl>)
> - [hdf5@1.14.6](<https://packages.spack.io/package.html?name=hdf5>)
> - [kokkos@4.7.01](<https://packages.spack.io/package.html?name=kokkos>)
> - [kokkos-kernels@4.7.01](<https://packages.spack.io/package.html?name=kokkos-kernels>)
> - [kokkos-tools@develop](<https://packages.spack.io/package.html?name=kokkos-tools>)
> - [libfabric@2.3.1](<https://packages.spack.io/package.html?name=libfabric>)
> - [libtree@3.1.1](<https://packages.spack.io/package.html?name=libtree>)
> - [lua@5.4.6](<https://packages.spack.io/package.html?name=lua>)
> - [lz4@1.10.0](<https://packages.spack.io/package.html?name=lz4>)
> - [meson@1.8.5](<https://packages.spack.io/package.html?name=meson>)
> - [nccl@2.28.3-1](<https://packages.spack.io/package.html?name=nccl>)
> - [nccl-tests@2.16.3](<https://packages.spack.io/package.html?name=nccl-tests>)
> - [netcdf-c@4.9.3](<https://packages.spack.io/package.html?name=netcdf-c>)
> - [netcdf-cxx@4.2](<https://packages.spack.io/package.html?name=netcdf-cxx>)
> - [netcdf-cxx4@4.3.1](<https://packages.spack.io/package.html?name=netcdf-cxx4>)
> - [netcdf-fortran@4.6.2](<https://packages.spack.io/package.html?name=netcdf-fortran>)
> - [netlib-scalapack@2.2.2](<https://packages.spack.io/package.html?name=netlib-scalapack>)
> - [ninja@1.13.0](<https://packages.spack.io/package.html?name=ninja>)
> - [openblas@0.3.30](<https://packages.spack.io/package.html?name=openblas>)
> - [osu-micro-benchmarks@7.5.1](<https://packages.spack.io/package.html?name=osu-micro-benchmarks>)
> - [papi@7.2.0](<https://packages.spack.io/package.html?name=papi>)
> - [python@3.14.0](<https://packages.spack.io/package.html?name=python>)
> - [superlu@7.0.0](<https://packages.spack.io/package.html?name=superlu>)
> - [xcb-util-cursor@0.1.5](<https://packages.spack.io/package.html?name=xcb-util-cursor>)
> - [zlib-ng@2.2.4](<https://packages.spack.io/package.html?name=zlib-ng>)

The key updates in version 25.6 compared to 24.11 are:

- upgrading GCC to version 14 and CUDA to version 12.9
- upgrading cray-mpich to version 8.1.32
- adding xcb-util-cursor to the default view to allow the [NVIDIA Nsight UIs](<https://docs.cscs.ch/software/devtools/nvidia-nsight/index.md#nvidia-nsight>) to be used without manual workarounds

The spack version used to build the packages was also upgraded to 1.0.

v2 of the uenv fixes the `modules` view, where `gcc` was missing in v1.

> [!NOTE]
>
> **all packages exposed via the `default` and `modules` views in `v1`**
>
> - [aws-ofi-nccl@1.16.0](<https://packages.spack.io/package.html?name=aws-ofi-nccl>)
> - [boost@1.88.0](<https://packages.spack.io/package.html?name=boost>)
> - [cmake@3.31.8](<https://packages.spack.io/package.html?name=cmake>)
> - [cray-mpich@8.1.32](<https://packages.spack.io/package.html?name=cray-mpich>)
> - [cuda@12.9.0](<https://packages.spack.io/package.html?name=cuda>)
> - [fftw@3.3.10](<https://packages.spack.io/package.html?name=fftw>)
> - [fmt@11.2.0](<https://packages.spack.io/package.html?name=fmt>)
> - [gcc@14.2.0](<https://packages.spack.io/package.html?name=gcc>)
> - [gsl@2.8](<https://packages.spack.io/package.html?name=gsl>)
> - [hdf5@1.14.6](<https://packages.spack.io/package.html?name=hdf5>)
> - [kokkos@4.6.01](<https://packages.spack.io/package.html?name=kokkos>)
> - [kokkos-kernels@4.6.01](<https://packages.spack.io/package.html?name=kokkos-kernels>)
> - [kokkos-tools@develop](<https://packages.spack.io/package.html?name=kokkos-tools>)
> - [libtree@3.1.1](<https://packages.spack.io/package.html?name=libtree>)
> - [lua@5.4.6](<https://packages.spack.io/package.html?name=lua>)
> - [lz4@1.10.0](<https://packages.spack.io/package.html?name=lz4>)
> - [meson@1.7.0](<https://packages.spack.io/package.html?name=meson>)
> - [nccl@2.27.5-1](<https://packages.spack.io/package.html?name=nccl>)
> - [nccl-tests@2.16.3](<https://packages.spack.io/package.html?name=nccl-tests>)
> - [netcdf-c@4.9.2](<https://packages.spack.io/package.html?name=netcdf-c>)
> - [netcdf-cxx@4.2](<https://packages.spack.io/package.html?name=netcdf-cxx>)
> - [netcdf-fortran@4.6.1](<https://packages.spack.io/package.html?name=netcdf-fortran>)
> - [netlib-scalapack@2.2.2](<https://packages.spack.io/package.html?name=netlib-scalapack>)
> - [ninja@1.12.1](<https://packages.spack.io/package.html?name=ninja>)
> - [openblas@0.3.29](<https://packages.spack.io/package.html?name=openblas>)
> - [osu-micro-benchmarks@7.5](<https://packages.spack.io/package.html?name=osu-micro-benchmarks>)
> - [papi@7.1.0](<https://packages.spack.io/package.html?name=papi>)
> - [python@3.13.5](<https://packages.spack.io/package.html?name=python>)
> - [superlu@7.0.0](<https://packages.spack.io/package.html?name=superlu>)
> - [xcb-util-cursor@0.1.5](<https://packages.spack.io/package.html?name=xcb-util-cursor>)
> - [zlib-ng@2.2.4](<https://packages.spack.io/package.html?name=zlib-ng>)

## How to use

The environment provides a set of tools and libraries based on the GNU compiler toolchain for building scientific applications.

There are three ways to access the software provided by prgenv-gnu, once it has been started.

The simplest way to get started is to use the `default` file system view, which automatically loads all of the packages when the uenv is started.

> [!NOTE]
>
> **test mpi compilers and python provided by prgenv-gnu/26.9**
>
> ```console
> # start using the default view
> $ uenv start --view=default prgenv-gnu/26.9:v2
>
> # the python executable provided by the uenv is the default, and is a recent version
> $ which python
> /user-environment/env/default/bin/python
> $ python --version 
> Python 3.14.5
>
> # the mpi compiler wrappers are also available
> $ which mpicc
> /user-environment/env/default/bin/mpicc
> $ mpicc --version
> gcc (Spack GCC) 16.2.0
> $ gcc --version # the compiler wrapper uses the gcc provided by the uenv
> gcc (Spack GCC) 16.2.0
> ```

The uenv provides modules for all of the software packages, which can be made available by using the `modules` view in No modules are loaded when a uenv starts, and have to be loaded individually using `module load`.

> [!NOTE]
>
> **starting prgenv-gnu and listing the provided modules**
>
> ```console
> $ uenv start prgenv-gnu/26.9:v2 --view=modules
> $ module avail
>     ---------------------------- /user-environment/modules ----------------------------
>        aws-ofi-nccl/1.19.0      lz4/1.10.0
>        boost/1.90.0             meson/1.12.0
>        cmake/3.31.12            nccl-tests/2.17.6
>        cray-mpich/9.2.1         nccl/2.29.7-1
>        cuda/13.4.1              netcdf-c/4.10.0
>        cufftmp/11.4.0.6         netcdf-cxx/4.2
>        fftw/3.3.11              netcdf-cxx4/4.3.1
>        fmt/12.2.0               netcdf-fortran/4.6.4
>        gcc/16.2.0               netlib-scalapack/2.2.3
>        gmp/6.3.0                ninja/1.13.2
>        gsl/2.8                  nvshmem/3.8.0-0
>        hdf5/1.14.6              openblas/0.3.34
>        kokkos-kernels/5.2.2     osu-micro-benchmarks/7.5.2
>        kokkos-tools/5.2.0       papi/7.2.0
>        kokkos/5.2.2             python/3.14.5
>        libfabric/2.6.0          superlu/7.0.1
>        libtree/3.1.1            xcb-util-cursor/0.1.6
>        lua/5.4.8                zlib-ng/2.3.3
> ```

The gnu programming environment is a very good base for building software with Spack, because it provides compilers, MPI, Python and common packages like hdf5.

[Check out the guide for using Spack with uenv](<https://docs.cscs.ch/build-install/uenv/index.md#building-software-using-spack> "Building software using Spack").
