Skip to content

Instantly share code, notes, and snippets.

@scivision
Last active December 17, 2024 01:40
Show Gist options
  • Save scivision/5339df6d9f0a1e2635f697cb6e3f3cbd to your computer and use it in GitHub Desktop.
Save scivision/5339df6d9f0a1e2635f697cb6e3f3cbd to your computer and use it in GitHub Desktop.
NVIDIA HPC SDK source script (incl. CUDA)
# when wanting to use NVIDIA HPC SDK, type in Terminal
# source ~/nvidia-hpc.sh
NVCOMPILERS=/opt/nvidia/hpc_sdk
export CXXFLAGS=--gcc-toolchain=/opt/rh/gcc-toolset-12/root/usr/
# NVHPC 24.9, 24.11 seems to work best with GCC 12, especially for <filesystem>
# determine this path on RHEL-like Linux distros like
# scl enable gcc-toolset-12 "which g++"
export MODULEPATH=$NVCOMPILERS/modulefiles:$MODULEPATH
# Debian-like distros e.g. Ubuntu may need "apt install environment-modules"
module load nvhpc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment