NVIDIA HPC SDK

Supported versions

To check which NVIDIA HPC SDK versions are currently supported on Discoverer, execute on the login node:

module load nvidia
module avail

and grep the output for “nvhpc”.

Loading

To obtain access to the latest NVIDIA HPC SDK load the environment module nvhpc/latest after loading nvidia:

module load nvidia
module load nvhpc/latest

LLVM compilers

Warning

NVIDIA HPC SDK provides LLVM compilers only!

nvc
nvc++
nnfortran

Note

Unless it is set by the developers of the source code to compile, do not employ nvcc compiler. Use nvc instead.

Compiler optimization flags for AMD Zen2 CPU

Note

The compute nodes of Discoverer HPC are equipped with AMD EPYC 7H12 64-Core processors, which implies AMD Zen2 CPU architecture.

The following compiler flags can be useful during the compile-time optimization of your binary code on AMD Zen2:

-tp zen2

For example:

nvc -tp zen2 ...
nvc++ -tp zen2 ...
nvfortran -tp zen2 ...

More on the supported compiler flags: NVIDIA HPC SDK Documentation

Interaction with CMake

It is recommended to specify the compiler executables when invoking cmake tool:

-DCMAKE_C_COMPILER=nvc
-DCMAKE_CXX_COMPILER=nvc++
-DCMAKE_Fortran_COMPILER=nvfortran

The corresponding optimization compiler flags can be passed to cmake as well:

-DCMAKE_C_FLAGS="-tp zen2"
-DCMAKE_CXX_FLAGS="-tp zen2"
-DCMAKE_Fortran_FLAGS="-tp zen2"

Getting help

See Getting help