Skip to content

Instantly share code, notes, and snippets.

@scivision
Last active October 30, 2024 13:50
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 seems to work best with GCC 12, especially for <filesystem>
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