diff --git a/cscs-checks/mch/automatic_arrays_acc.py b/cscs-checks/mch/automatic_arrays_acc.py index 00aa2e5685..91adf8db44 100644 --- a/cscs-checks/mch/automatic_arrays_acc.py +++ b/cscs-checks/mch/automatic_arrays_acc.py @@ -84,3 +84,9 @@ def cray_linker_workaround(self): if (self.current_system.name == 'dom' and self.current_environ.name == 'PrgEnv-cray'): self.variables['LINKER_X86_64'] = '/usr/bin/ld' + + @rfm.run_before('compile') + def cdt2006_pgi_workaround(self): + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-pgi'): + self.variables.update({'CUDA_HOME': '$CUDATOOLKIT_HOME'}) diff --git a/cscs-checks/mch/gpu_direct_acc.py b/cscs-checks/mch/gpu_direct_acc.py index 7ca0f6a7d9..b72644b3f2 100644 --- a/cscs-checks/mch/gpu_direct_acc.py +++ b/cscs-checks/mch/gpu_direct_acc.py @@ -80,3 +80,9 @@ def cray_linker_workaround(self): if (self.current_system.name == 'dom' and self.current_environ.name == 'PrgEnv-cray'): self.variables['LINKER_X86_64'] = '/usr/bin/ld' + + @rfm.run_before('compile') + def cdt2006_pgi_workaround(self): + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-pgi'): + self.variables['CUDA_HOME'] = '$CUDATOOLKIT_HOME' diff --git a/cscs-checks/mch/openacc_cuda_mpi_cppstd.py b/cscs-checks/mch/openacc_cuda_mpi_cppstd.py index aa8a239f90..d8b9f5b368 100644 --- a/cscs-checks/mch/openacc_cuda_mpi_cppstd.py +++ b/cscs-checks/mch/openacc_cuda_mpi_cppstd.py @@ -90,3 +90,9 @@ def setflags(self): self.build_system.ldflags += [ '-L$EBROOTCUDA/lib64', '-lcublas', '-lcudart' ] + + @rfm.run_before('compile') + def cdt2006_pgi_workaround(self): + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-pgi'): + self.variables.update({'CUDA_HOME': '$CUDATOOLKIT_HOME'}) diff --git a/cscs-checks/prgenv/openacc_checks.py b/cscs-checks/prgenv/openacc_checks.py index dc67641a7b..9062ed5d35 100644 --- a/cscs-checks/prgenv/openacc_checks.py +++ b/cscs-checks/prgenv/openacc_checks.py @@ -74,3 +74,9 @@ def cray_linker_workaround(self): if (self.current_system.name == 'dom' and self.current_environ.name.startswith('PrgEnv-cray')): self.variables['LINKER_X86_64'] = '/usr/bin/ld' + + @rfm.run_before('compile') + def cdt2006_pgi_workaround(self): + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-pgi'): + self.variables.update({'CUDA_HOME': '$CUDATOOLKIT_HOME'}) diff --git a/cscs-checks/prgenv/opencl_check.py b/cscs-checks/prgenv/opencl_check.py index 8ede331925..6a3080f7e4 100644 --- a/cscs-checks/prgenv/opencl_check.py +++ b/cscs-checks/prgenv/opencl_check.py @@ -28,3 +28,9 @@ def __init__(self): def setflags(self): if self.current_environ.name == 'PrgEnv-pgi': self.build_system.cflags = ['-mmmx'] + + @rfm.run_before('compile') + def cdt2006_pgi_workaround(self): + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-pgi'): + self.variables.update({'CUDA_HOME': '$CUDATOOLKIT_HOME'})