NVIDIA HPC SDK Setup¶
Set up the NVIDIA HPC SDK on Slurm compiler and compute nodes for GPU-accelerated HPC application development.
Overview¶
Omnia places an NVIDIA HPC SDK setup script
(/usr/local/bin/setup_nvhpc_sdk.sh) on login-compiler and Slurm compute
nodes during provisioning. The setup follows a two-step manual workflow:
- Run
--installon one login-compiler node for each architecture to install via DNF and publish to shared storage. - Run the script without arguments on each compute node to bind-mount the matching architecture from shared storage.
Architecture Support¶
The script detects the node architecture automatically:
| Architecture | Shared-storage subdirectory |
|---|---|
x86_64 |
Linux_x86_64 |
aarch64 |
Linux_aarch64 |
Both architecture subdirectories can coexist on the share. In a mixed-architecture cluster, however, complete the install step once on an x86_64 login-compiler node and once on an aarch64 login-compiler node before setting up the respective compute nodes.
Info
- Slurm with GPU -- GPU configuration for Slurm nodes
- Run HPC Benchmarks -- Validate cluster performance
- Set Up Slurm -- Slurm cluster setup guide
Prerequisites¶
- A catalog-defined login-compiler node and the target compute nodes are provisioned and running.
- The selected catalog contains the
nvhpcRPM for every target architecture, and Repository Manager synchronized thenvidia-hpc-sdkrepository. slurm_cluster.nfs_storage_namereferences shared storage defined instorage_config.yml. The optionalvast_storage_namecan select a separate VAST mount for/hpc_tools; when it is omitted or empty, provisioning uses thenfs_storage_nameentry./hpc_tools/nvidia_sdkmust be writable on the login-compiler node before the install step.- Run the script as
root; it installs RPMs and writes/etc/fstab,/etc/profile.d/nvhpc.sh, and/var/log/nvhpc_sdk_setup.log.
Note
The nvidia-hpc-sdk repository is included in the default
Repository Manager configuration
for both x86_64 and aarch64 architectures.
Procedure¶
Step 1 -- Install on the Compiler Node¶
On one login-compiler node for the architecture being published, run:
/usr/local/bin/setup_nvhpc_sdk.sh --install
Tip
You can also use -i as a shorthand: /usr/local/bin/setup_nvhpc_sdk.sh -i
This performs the following actions in sequence:
- Installs the
nvhpcpackage via DNF from the pre-configured NVIDIA repository. - Copies the installed SDK from
/opt/nvidia/hpc_sdkto the shared path/hpc_tools/nvidia_sdk/nvhpc. - Sets up a local bind mount:
/hpc_tools/nvidia_sdk/nvhpc→/opt/nvidia/nvhpc. - Writes environment configuration to
/etc/profile.d/nvhpc.sh.
To force the script to republish the locally installed SDK when the SDK is already present on shared storage:
/usr/local/bin/setup_nvhpc_sdk.sh --install --force
Note
If NVHPC is already present on shared storage, the script skips the DNF
check and copy, then proceeds directly to the bind mount and environment
setup. --force repeats the local-package check and copies the local SDK
to shared storage again; it does not reinstall an RPM that is already
installed locally.
For a mixed-architecture cluster, repeat this step on a login-compiler node of
the other architecture. The script merges that architecture's
Linux_<architecture> directory into the same shared SDK root.
Step 2 -- Set Up on Compute Nodes¶
On each Slurm compute node, run:
/usr/local/bin/setup_nvhpc_sdk.sh
This performs the following actions:
- Validates that the NVHPC SDK exists on shared storage at
/hpc_tools/nvidia_sdk/nvhpc. - Sets up a local bind mount:
/hpc_tools/nvidia_sdk/nvhpc→/opt/nvidia/nvhpc. - Writes environment configuration to
/etc/profile.d/nvhpc.sh.
Important
Step 2 must be run after Step 1 is complete for that compute node's
architecture. If the matching Linux_x86_64 or Linux_aarch64 directory
is not found on shared storage, the script exits with an error.
Environment Variables Configured¶
After setup, the following variables are available in all login shells on both the compiler node and compute nodes:
| Variable | Value |
|---|---|
NVCOMPILERS |
/opt/nvidia/nvhpc |
NVARCH |
Linux_x86_64 or Linux_aarch64 (auto-detected) |
NVHPC_VERSION |
Auto-detected from the installed SDK version |
PATH |
Prepended with compiler bin and MPI bin directories |
MANPATH |
Appended with compiler man and MPI man directories |
MODULEPATH |
Prepended with the nvhpc modulefiles directory |
Verification¶
After running the setup script, verify by sourcing the profile and checking the compilers:
source /etc/profile.d/nvhpc.sh
nvc --version
nvc++ --version
nvfortran --version
Logs¶
Setup output and errors are appended to /var/log/nvhpc_sdk_setup.log on each
node. Check this file if the setup script fails:
cat /var/log/nvhpc_sdk_setup.log
Next steps¶
- Run HPC Benchmarks -- Validate cluster performance using the NVHPC SDK.
- Slurm With GPU -- Configure GPU support for Slurm nodes.
Troubleshooting¶
- NVHPC compilers not found after setup: Verify that
/etc/profile.d/nvhpc.shexists and source it manually withsource /etc/profile.d/nvhpc.sh. - Shared path not accessible: Confirm that
/hpc_toolsis a mount point and/hpc_tools/nvidia_sdkis writable on the login-compiler node. Verify the requirednfs_storage_name; ifvast_storage_nameis set, verify that it selects the intended separate VAST entry. An emptyvast_storage_nameintentionally reusesnfs_storage_name. - Architecture is missing on a compute node: Run
--installon a login-compiler node with the same architecture, then rerun setup on the compute node.