diff --git a/cscs-checks/prgenv/cuda-fortran/cuda_fortran_check.py b/cscs-checks/prgenv/cuda-fortran/cuda_fortran_check.py index ecca6260d1..1b9db6976b 100644 --- a/cscs-checks/prgenv/cuda-fortran/cuda_fortran_check.py +++ b/cscs-checks/prgenv/cuda-fortran/cuda_fortran_check.py @@ -13,9 +13,10 @@ class CUDAFortranCheck(rfm.RegressionTest): def __init__(self): self.valid_systems = ['daint:gpu', 'dom:gpu'] self.valid_prog_environs = ['PrgEnv-pgi'] - self.sourcepath = 'vecAdd_cuda.f90' + self.sourcepath = 'vecAdd_cuda.cuf' self.modules = ['craype-accel-nvidia60'] self.build_system = 'SingleSource' + self.build_system.fflags = ['-ta=tesla:cc60'] self.num_gpus_per_node = 1 result = sn.extractsingle(r'final result:\s+(?P\d+\.?\d*)', self.stdout, 'result', float) @@ -24,13 +25,15 @@ def __init__(self): self.tags = {'production', 'craype'} @rfm.run_before('compile') - def cdt2006_pgi_workaround(self): + def cdt_pgi_workaround(self): cdt = osext.cray_cdt_version() if not cdt: return - if (self.current_environ.name == 'PrgEnv-pgi' and cdt == '20.08'): - self.build_system.fflags = [ - 'CUDA_HOME=$CUDATOOLKIT_HOME', - '-ta=tesla:cc60', '-Mcuda=cuda10.2' + if cdt == '20.08': + self.build_system.fflags += [ + 'CUDA_HOME=$CUDATOOLKIT_HOME', '-Mcuda=cuda10.2' ] + else: + # FIXME: PGI 20.x does not support CUDA 11, see case #275674 + self.modules += ['cudatoolkit/10.2.89_3.29-7.0.2.1_3.5__g67354b4'] diff --git a/cscs-checks/prgenv/cuda-fortran/src/vecAdd_cuda.f90 b/cscs-checks/prgenv/cuda-fortran/src/vecAdd_cuda.cuf similarity index 100% rename from cscs-checks/prgenv/cuda-fortran/src/vecAdd_cuda.f90 rename to cscs-checks/prgenv/cuda-fortran/src/vecAdd_cuda.cuf diff --git a/reframe/core/buildsystems.py b/reframe/core/buildsystems.py index 3360398176..c1bbcd0ce5 100644 --- a/reframe/core/buildsystems.py +++ b/reframe/core/buildsystems.py @@ -448,7 +448,7 @@ def _guess_language(self, filename): if ext in ['.f', '.for', '.ftn', '.F', '.FOR', '.fpp', '.FPP', '.FTN', '.f90', '.f95', '.f03', '.f08', - '.F90', '.F95', '.F03', '.F08']: + '.F90', '.F95', '.F03', '.F08', '.cuf', '.CUF']: return 'Fortran' if ext in ['.cu']: