Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 123 additions & 2 deletions docs/software/prgenv/prgenv-gnu.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,126 @@
[](){#ref-uenv-prgenv-gnu}
# prgenv-gnu

!!! todo
write some docs
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`][ref-uenv-prgenv-nvfortran] is for applications that require the NVIDIA Fortran compiler - typically because they need to use OpenACC or CUDA Fortran.

The [`linalg`][ref-uenv-linalg] environment is similar to prgenv-gnu, with additional linear algebra and mesh partitioning algorithms.

## 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 |
|-----------|-----------|--------|
| 24.7 | gh200, zen2 | daint, eiger, todi |
| 24.11 | a100, gh200, zen2 | daint, eiger, santis, clariden, bristen |

=== "24.11"

The key updates in version 24.11 were:

* upgrading the versions of gcc@13 and [email protected]
* upgrading cray-mpich to version 8.1.30
* adding kokkos
* adding gsl

A complete list of packages exposed via the `default` and `modules` views is:

* [[email protected]_1.9.2](https://packages.spack.io/package.html?name=aws-ofi-nccl)
* [[email protected]](https://packages.spack.io/package.html?name=boost)
* [[email protected]](https://packages.spack.io/package.html?name=cmake)
* [[email protected]](https://packages.spack.io/package.html?name=cray-mpich)
* [[email protected]](https://packages.spack.io/package.html?name=cuda)
* in the `gh200` and `a100` images
* [[email protected]](https://packages.spack.io/package.html?name=fftw)
* [[email protected]](https://packages.spack.io/package.html?name=fmt)
* [[email protected]](https://packages.spack.io/package.html?name=gcc)
* [[email protected]](https://packages.spack.io/package.html?name=gsl)
* [[email protected]](https://packages.spack.io/package.html?name=hdf5)
* [[email protected]](https://packages.spack.io/package.html?name=kokkos-kernels)
* [kokkos-tools@develop](https://packages.spack.io/package.html?name=kokkos-tools)
* [[email protected]](https://packages.spack.io/package.html?name=kokkos)
* [[email protected]](https://packages.spack.io/package.html?name=libtree)
* [[email protected]](https://packages.spack.io/package.html?name=lua)
* [[email protected]](https://packages.spack.io/package.html?name=lz4)
* [[email protected]](https://packages.spack.io/package.html?name=meson)
* [[email protected]](https://packages.spack.io/package.html?name=nccl-tests)
* [[email protected]](https://packages.spack.io/package.html?name=nccl)
* [[email protected]](https://packages.spack.io/package.html?name=netlib-scalapack)
* [[email protected]](https://packages.spack.io/package.html?name=ninja)
* [[email protected]](https://packages.spack.io/package.html?name=openblas)
* built with the OpenMP threading back end
* [[email protected]](https://packages.spack.io/package.html?name=osu-micro-benchmarks)
* [[email protected]](https://packages.spack.io/package.html?name=papi)
* [[email protected]](https://packages.spack.io/package.html?name=python)
* [[email protected]](https://packages.spack.io/package.html?name=superlu)
* [[email protected]](https://packages.spack.io/package.html?name=zlib-ng)

## How to use

The environment is designed as a fairly minimal set of

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

=== "the default view"

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.

!!! example "test mpi compilers and python provided by prgenv-gnu/24.11"
```bash
# start using the default view
> uenv start --view=default prgenv-gnu/24.11:v1

# 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.12.5

# the mpi compiler wrappers are also available
> which mpicc
/user-environment/env/default/bin/mpicc
> mpicc --version
gcc (Spack GCC) 13.3.0
> gcc --version # the compiler wrapper uses the gcc provided by the uenv
gcc (Spack GCC) 13.3.0
```

=== "modules"

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`.

!!! example "starting prgenv-gnu and listing the provided modules"
```bash
> uenv start prgenv-gnu/24.11:v1 --view=modules
> module avail
---------------------------- /user-environment/modules ----------------------------
aws-ofi-nccl/git.v1.9.2-aws_1.9.2 lua/5.4.6
boost/1.86.0 lz4/1.10.0
cmake/3.30.5 meson/1.5.1
cray-mpich/8.1.30 nccl-tests/2.13.6
cuda/12.6.2 nccl/2.22.3-1
fftw/3.3.10 netlib-scalapack/2.2.0
fmt/11.0.2 ninja/1.12.1
gcc/13.3.0 openblas/0.3.28
gsl/2.8 osu-micro-benchmarks/5.9
hdf5/1.14.5 papi/7.1.0
kokkos-kernels/4.4.01 python/3.12.5
kokkos-tools/develop superlu/5.3.0
kokkos/4.4.01 zlib-ng/2.2.1
libtree/3.1.1
```

=== "Spack"

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][ref-building-uenv-spack].

108 changes: 106 additions & 2 deletions docs/software/prgenv/prgenv-nvfortran.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,109 @@
[](){#ref-uenv-prgenv-nvfortran}
# prgenv-nvfortran

!!! todo
write some docs
The `prgenv-nvfortran` uenv provides a set of tools and libraries for building applications that need the NVIDIA Fortran compiler
Specifically, it is intended for building and running applications that **require** one of the following:
* OpenACC for GPU acceleration;
* CUDA Fortran for GPU acceleration.

!!! note
By default, use the `prgenv-gnu` toolchain for a generic environment for building GPU applications.
It provides CUDA and libraries with GPU support enabled for the Grace-Hopper nodes, the gnu compiler toolchain that it provides has better C and C++ standards complianace, and it also provides more libraries and tools than this `nvfortran` uenv.

## Versioning

The naming scheme is `prgenv-nvfortran/<version>:v<i>`, where `<version>` matches the version of the NVIDIA HPC SDK.

* the SDK is released every two months, and is numbered in the `YY.M[M]` format, e.g. `24.1` and `24.11`.
* the `prgenv-nvfortran` will be released three times a year (every second NVHPC release).

The currently supported versions are:

| `prgennv-nvhpc` | NVHPC |
| -------------- | ----- |
| 24.11 | 24.11 |

=== "24.11"

Version 24.11 provides the following software:

* [[email protected]](https://packages.spack.io/package.html?name=cmake)
* [[email protected]](https://packages.spack.io/package.html?name=cray-mpich)
* [[email protected]](https://packages.spack.io/package.html?name=cuda)
* [[email protected]](https://packages.spack.io/package.html?name=fftw)
* [[email protected]](https://packages.spack.io/package.html?name=fmt)
* [[email protected]](https://packages.spack.io/package.html?name=gcc)
* [[email protected]](https://packages.spack.io/package.html?name=hdf5)
* [[email protected]](https://packages.spack.io/package.html?name=libtree)
* [[email protected]](https://packages.spack.io/package.html?name=lua)
* [[email protected]](https://packages.spack.io/package.html?name=lz4)
* [[email protected]](https://packages.spack.io/package.html?name=meson)
* [[email protected]](https://packages.spack.io/package.html?name=netcdf-c)
* [[email protected]](https://packages.spack.io/package.html?name=netcdf-fortran)
* [[email protected]](https://packages.spack.io/package.html?name=ninja)
* [[email protected]](https://packages.spack.io/package.html?name=nvhpc)
* [[email protected]](https://packages.spack.io/package.html?name=nvpl-blas)
* [[email protected]](https://packages.spack.io/package.html?name=nvpl-lapack)
* [[email protected]](https://packages.spack.io/package.html?name=osu-micro-benchmarks)
* [[email protected]](https://packages.spack.io/package.html?name=python)
* [[email protected]](https://packages.spack.io/package.html?name=zlib-ng)

??? note "I need a different version"
If you need a version of the NVHPC SDK that is not provided, e.g. the 25.1 version that falls between 24.11 and 25.4, make a request on the [CSCS service desk](https://jira.cscs.ch/plugins/servlet/desk).

## How to use

The image is only provided on Alps systems that have NVIDIA GPUs.
To see which versions have been installed on a system:

```bash
# search for uenv on the current system
uenv image find prgenv-nvfortran

# search for uenv on all systems
uenv image find prgenv-nvfortran@*

# pull a version
uenv image find prgenv-nvfortran/24.11:v1
```

=== "the nvfort view"

The nvfort view loads all of the packages into your environment (equivalent to loading all the modules at once):

```bash
uenv start prgenv-nvfortran/24.11:v1 --view=nvfort
mpif90 --version
```

The above example shows that the MPI compiler wrappers are using the underlying NVIDIA compiler.
The following wrappers are available:

* `mpif77`
* `mpif90`
* `mpifort`

And the following C/C++ wrapers are available:

* `mpicc`
* `mpicxx`

=== "the modules view"

The modules view will start the uenv, and make a set of modules available:

```
> uenv start prgenv-nvfortran/24.11:v1 --view=nvfort,modules
> module avail
---------------------------- /user-environment/modules ----------------------------
aws-ofi-nccl/master libtree/3.1.1 ninja/1.12.1
cmake/3.30.5 lua/5.4.6 nvhpc/24.11
cray-mpich/8.1.30 lz4/1.10.0 nvpl-blas/0.3.0
cuda/12.6.0 meson/1.5.1 nvpl-lapack/0.2.3.1
fftw/3.3.10 nccl-tests/2.13.6 osu-micro-benchmarks/5.9
fmt/11.0.2 nccl/2.22.3-1 python/3.12.5
gcc/13.2.0 netcdf-c/4.9.2 zlib-ng/2.2.1
hdf5/1.14.5 netcdf-fortran/4.6.1
```

None of the modules are loaded by default, so you will have to load the required modules