diff --git a/cscs-checks/cuda/cuda_checks.py b/cscs-checks/cuda/cuda_checks.py index 1059db3ba2..34c3fcb906 100644 --- a/cscs-checks/cuda/cuda_checks.py +++ b/cscs-checks/cuda/cuda_checks.py @@ -38,8 +38,9 @@ def __init__(self): self.descr = 'Implements matrix multiplication using CUBLAS' self.sourcepath = 'matrixmulcublas.cu' self.build_system = 'SingleSource' - self.build_system.cxxflags = ['-I.', '-ccbin g++ -m64 -lcublas', + self.build_system.cxxflags = ['-I.', '-ccbin g++', '-m64', '-arch=sm_%s' % self.nvidia_sm] + self.build_system.ldflags = ['-lcublas'] self.sanity_patterns = sn.assert_found( r'Comparing CUBLAS Matrix Multiply with CPU results: PASS', self.stdout) @@ -53,7 +54,7 @@ def __init__(self): self.descr = 'Queries the properties of the CUDA devices' self.sourcepath = 'devicequery.cu' self.build_system = 'SingleSource' - self.build_system.cxxflags = ['-I.', '-ccbin g++ -m64 -lcublas', + self.build_system.cxxflags = ['-I.', '-ccbin g++', '-m64', '-arch=sm_%s' % self.nvidia_sm] self.sanity_patterns = sn.assert_found(r'Result = PASS', self.stdout) @@ -66,8 +67,9 @@ def __init__(self): self.descr = 'Use of streams for concurrent execution' self.sourcepath = 'concurrentkernels.cu' self.build_system = 'SingleSource' - self.build_system.cxxflags = ['-I.', '-ccbin g++ -m64 -lcublas', + self.build_system.cxxflags = ['-I.', '-ccbin g++', '-m64', '-arch=sm_%s' % self.nvidia_sm] + self.build_system.ldflags = ['-lcublas'] self.sanity_patterns = sn.assert_found(r'Test passed', self.stdout) @@ -91,5 +93,6 @@ def __init__(self): self.variables = {'CRAY_CUDA_MPS': '1'} self.build_system = 'Make' - self.build_system.cxxflags = ['-I.', '-ccbin g++ -m64 -lcublas', + self.build_system.cxxflags = ['-I.', '-ccbin g++', '-m64', '-arch=sm_%s' % self.nvidia_sm] + self.build_system.ldflags = ['-lcublas']