Skip to content

Commit

Permalink
Allow CUDA compilation on Perlmutter if only PrgEnv-nvidia is loaded (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
maxpkatz authored Dec 31, 2021
1 parent bcdb6ca commit 7c606b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tools/GNUMake/sites/Make.nersc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ ifeq ($(which_computer),$(filter $(which_computer),perlmutter))
else ifneq ($(CUDA_PATH),)
SYSTEM_CUDA_PATH := $(CUDA_PATH)
COMPILE_CUDA_PATH := $(CUDA_PATH)
else ifneq ($(NVIDIA_PATH),)
SYSTEM_CUDA_PATH := $(NVIDIA_PATH)/cuda
COMPILE_CUDA_PATH := $(NVIDIA_PATH)/cuda
else
$(error No CUDA_ROOT nor CUDA_HOME nor CUDA_PATH found. Please load a cuda module.)
endif
Expand Down

0 comments on commit 7c606b8

Please sign in to comment.