From d5f50fa8bfdc2ced217fb544b80cd5ea91bacb46 Mon Sep 17 00:00:00 2001 From: Rafael Ravedutti <rafaelravedutti@gmail.com> Date: Tue, 28 Feb 2023 16:42:44 +0100 Subject: [PATCH] Set CUDA_PATH based on nvcc path Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com> --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d2f5783..31ae187 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,9 @@ PYCMD=python3 CC=mpicxx NVCC=nvcc -CUDA_PATH=/apps/SPACK/0.18.0/opt/linux-almalinux8-zen/gcc-8.5.0/cuda-11.6.2-mlkhyhqwqk7cyltlmvw7n4ofdui5ocup +NVCC_PATH = "$(shell which ${NVCC})" +CUDA_BIN_PATH = "$(shell dirname ${NVCC_PATH})" +CUDA_PATH:="$(shell dirname ${CUDA_BIN_PATH})" all: clean build lj_cpu lj_gpu @echo "Everything was done!" -- GitLab