Skip to content

Commit

Permalink
Prgenv nvfortran (#167)
Browse files Browse the repository at this point in the history
Add `prgenv-nvfortran` that provides the nvhpc SDK for the OpenACC and CUDA Fortran compilers.
  • Loading branch information
bcumming authored Dec 13, 2024
1 parent fe690e9 commit a09a602
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ uenvs:
todi: [gh200]
bristen: [a100]
develop: True
prgenv-nvfortran:
"24.11":
recipes:
gh200: 24.11/gh200
deploy:
todi: [gh200]
quantumespresso:
"v7.1":
recipes:
Expand Down
35 changes: 35 additions & 0 deletions docs/uenv-prgenv-fortran.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# prgenv-nvfortran uenv

Provides a small set of tools and libraries for building applications that need the NVIDIA Fortran compiler:

* applications that use OpenACC for GPU acceleration
* applications that use CUDA Fortran for GPU acceleration

It provides the NVHPC compilers, MPI (cray-mpich), Python, cuda (on systems with NVIDIA GPUs).

## Using the uenv

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

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

To use the uenv, we recommend using the uenv view `--view=nvfort`:

```
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`
45 changes: 45 additions & 0 deletions docs/uenv-prgenv-nvfortran.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# prgenv-nvfortran uenv

Provides a small set of tools and libraries for building applications that need the NVIDIA Fortran compiler:

* applications that use OpenACC for GPU acceleration;
* applications that use CUDA Fortran for GPU acceleration.

It provides the NVHPC compilers, MPI (cray-mpich), Python, cuda

The naming scheme is `prgenv-nvidia/<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.MM` format, e.g. `24.1` and `24.11`.
* the `prgenv-nvfortran` will be released three times a year (every second NVHPC release).

## Using the uenv

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

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

To use the uenv, we recommend using the uenv view `--view=nvfort`:

```
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`
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ nav:
- 'linaro-forge': uenv-linaro-forge.md
- 'namd': uenv-namd.md
- 'prgenv-gnu': uenv-prgenv-gnu.md
- 'prgenv-nvfortran': uenv-prgenv-nvfortran.md
- 'quantumespresso': uenv-qe.md
- 'vasp': uenv-vasp.md
- 'developers':
Expand Down
9 changes: 9 additions & 0 deletions recipes/prgenv-nvfortran/24.11/gh200/compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
bootstrap:
spec: [email protected]
gcc:
specs:
- [email protected]
llvm:
requires: gcc@13
specs:
- [email protected]
6 changes: 6 additions & 0 deletions recipes/prgenv-nvfortran/24.11/gh200/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: prgenv-nvfortran
spack:
commit: releases/v0.22
repo: https://github.com/spack/spack.git
store: /user-environment
description: NVIDIA compiler toolchain (nvhpc) with cray-mpich, Python, CMake and other development tools.
42 changes: 42 additions & 0 deletions recipes/prgenv-nvfortran/24.11/gh200/environments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
gcc-env:
compiler:
- toolchain: gcc
spec: gcc
- toolchain: llvm
spec: nvhpc
mpi:
spec: [email protected]%nvhpc
gpu: cuda
unify: true
specs:
- aws-ofi-nccl@master
- cmake
- [email protected]
- fftw%nvhpc +openmp
- fmt
- hdf5+hl+mpi
- libtree
- lua
- libtree
- lz4
- meson
#- netlib-scalapack%nvhpc
- nccl
- nccl-tests
- ninja
- nvpl-blas threads=openmp
- nvpl-lapack threads=openmp
#- openblas%nvhpc
- [email protected]%nvhpc
- [email protected]
- zlib-ng
variants:
- +mpi
- +cuda
- cuda_arch=90
views:
nvfort:
link: roots
uenv:
prefix_paths:
LD_LIBRARY_PATH: [lib, lib64]
11 changes: 11 additions & 0 deletions recipes/prgenv-nvfortran/24.11/gh200/extra/reframe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
default:
features:
- cuda
- mpi
- osu-micro-benchmarks
- openmp
- serial
cc: mpicc
cxx: mpic++
ftn: mpifort
activation: /user-environment/env/default/activate.sh
23 changes: 23 additions & 0 deletions recipes/prgenv-nvfortran/24.11/gh200/modules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
modules:
# Paths to check when creating modules for all module sets
prefix_inspections:
bin:
- PATH
lib:
- LD_LIBRARY_PATH
lib64:
- LD_LIBRARY_PATH

default:
arch_folder: false
# Where to install modules
roots:
tcl: /user-environment/modules
tcl:
all:
autoload: none
hash_length: 0
exclude_implicits: true
exclude: ['%[email protected]', 'gcc %[email protected]']
projections:
all: '{name}/{version}'

0 comments on commit a09a602

Please sign in to comment.