Skip to content

Commit 7c606b8

Browse files
authored
Allow CUDA compilation on Perlmutter if only PrgEnv-nvidia is loaded (#2553)
In this scenario, there is not a CUDA module loaded by default; nvcc is provided as part of the NVIDIA HPC SDK. In the Cray PE the environment variable defined pointing to the top level of the HPC SDK is `NVIDIA_PATH` so we can use this to indicate to the make system that we should have CUDA support.
1 parent bcdb6ca commit 7c606b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tools/GNUMake/sites/Make.nersc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ ifeq ($(which_computer),$(filter $(which_computer),perlmutter))
5959
else ifneq ($(CUDA_PATH),)
6060
SYSTEM_CUDA_PATH := $(CUDA_PATH)
6161
COMPILE_CUDA_PATH := $(CUDA_PATH)
62+
else ifneq ($(NVIDIA_PATH),)
63+
SYSTEM_CUDA_PATH := $(NVIDIA_PATH)/cuda
64+
COMPILE_CUDA_PATH := $(NVIDIA_PATH)/cuda
6265
else
6366
$(error No CUDA_ROOT nor CUDA_HOME nor CUDA_PATH found. Please load a cuda module.)
6467
endif

0 commit comments

Comments
 (0)