@@ -47,19 +47,19 @@ class build_osu_benchmarks(rfm.CompileOnlyRegressionTest):
47
47
48
48
build_system = 'Autotools'
49
49
build_prefix = variable (str )
50
+ build_locally = False
50
51
51
52
#: The fixture object that retrieves the benchmarks
52
53
#:
53
54
#: :type: :class:`fetch_osu_benchmarks`
54
55
#: :scope: *session*
55
56
osu_benchmarks = fixture (fetch_osu_benchmarks , scope = 'session' )
56
57
57
- # FIXME: version of clang compiler and default gcc not compatible
58
- # with the default cudatoolkit (11.6)
58
+ # FIXME: version of clang compiler with the default cudatoolkit
59
59
@run_after ('setup' )
60
60
def skip_incompatible_envs_cuda (self ):
61
61
if self .build_type == 'cuda' :
62
- if self .current_environ .name in {'PrgEnv-cray' , 'PrgEnv-gnu' }:
62
+ if self .current_environ .name in {'PrgEnv-cray' }:
63
63
self .skip (
64
64
f'environ { self .current_environ .name !r} incompatible with'
65
65
f'default cudatoolkit' )
@@ -69,32 +69,37 @@ def setup_compilers(self):
69
69
if self .build_type == 'cuda' :
70
70
curr_part = self .current_partition
71
71
gpu_arch = curr_part .select_devices ('gpu' )[0 ].arch
72
-
73
-
74
- if self .current_environ .name != 'PrgEnv-nvhpc' :
75
- self .build_system .ldflags = [
76
- '${CRAY_CUDATOOLKIT_POST_LINK_OPTS}' ,
77
- '-L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_cuda'
78
- ]
72
+ environ_name = self .current_environ .name
73
+
74
+ if environ_name .startswith ('PrgEnv-' ):
75
+ if environ_name != 'PrgEnv-nvhpc' :
76
+ self .build_system .ldflags = [
77
+ '${CRAY_CUDATOOLKIT_POST_LINK_OPTS}' ,
78
+ '-L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_cuda'
79
+ ]
80
+ else :
81
+ self .build_system .ldflags = [
82
+ '-L${CRAY_NVIDIA_PREFIX}/cuda/lib64' ,
83
+ '-L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_cuda'
84
+ ]
79
85
else :
80
86
self .build_system .ldflags = [
81
- '-L${CRAY_NVIDIA_PREFIX}/cuda/lib64' ,
82
- '-L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_cuda'
87
+ '-L${CUDA_HOME}/lib64' ,
88
+ ]
89
+ self .build_system .cppflags = [
90
+ '-I${CUDA_HOME}/include' ,
83
91
]
84
92
85
93
# Remove the '^sm_' prefix from the arch, e.g sm_80 -> 80
86
94
if gpu_arch .startswith ('sm_' ):
87
95
accel_compute_capability = gpu_arch [len ('sm_' ):]
88
- else :
89
- accel_compute_capability = '80'
90
96
91
97
if self .current_environ .name in {'PrgEnv-cray' , 'PrgEnv-gnu' }:
92
98
self .modules = [
93
99
'cudatoolkit' ,
94
100
f'craype-accel-nvidia{ accel_compute_capability } '
95
101
]
96
102
97
-
98
103
@run_before ('compile' )
99
104
def prepare_build (self ):
100
105
tarball = f'osu-micro-benchmarks-{ self .osu_benchmarks .version } .tar.gz'
@@ -240,10 +245,10 @@ class osu_build_run(osu_benchmark):
240
245
def set_valid_systems_envs (self ):
241
246
build_type = self .osu_binaries .build_type
242
247
if build_type == 'cuda' :
243
- self .valid_systems = ['+remote +nvgpu -uenv ' ]
248
+ self .valid_systems = ['+remote +nvgpu' ]
244
249
self .valid_prog_environs = ['+mpi +cuda' ]
245
250
else :
246
- self .valid_systems = ['+remote -uenv ' ]
251
+ self .valid_systems = ['+remote' ]
247
252
self .valid_prog_environs = ['+mpi' ]
248
253
249
254
@run_before ('run' )
@@ -257,6 +262,21 @@ def set_environment(self):
257
262
# Use only the first CUDA GPU
258
263
'CUDA_VISIBLE_DEVICES' : 0 ,
259
264
}
265
+ curr_part = self .current_partition
266
+ gpu_arch = curr_part .select_devices ('gpu' )[0 ].arch
267
+
268
+ if gpu_arch .startswith ('sm_' ):
269
+ accel_compute_capability = gpu_arch [len ('sm_' ):]
270
+
271
+ if self .current_environ .name in {'PrgEnv-cray' , 'PrgEnv-gnu' }:
272
+ self .modules = [
273
+ 'cudatoolkit' ,
274
+ f'craype-accel-nvidia{ accel_compute_capability } '
275
+ ]
276
+ else :
277
+ self .env_vars = {
278
+ 'MPICH_GPU_SUPPORT_ENABLED' : 0
279
+ }
260
280
261
281
@run_before ('run' )
262
282
def prepend_build_prefix (self ):
@@ -272,6 +292,7 @@ class osu_pt2pt_check(osu_build_run):
272
292
('mpi.pt2pt.standard.osu_bw' , 'bandwidth' ),
273
293
('mpi.pt2pt.standard.osu_latency' , 'latency' )
274
294
], fmt = lambda x : x [0 ], loggable = True )
295
+
275
296
allref = {
276
297
'mpi.pt2pt.standard.osu_bw' : {
277
298
'cpu' : {
@@ -288,7 +309,7 @@ class osu_pt2pt_check(osu_build_run):
288
309
'mpi.pt2pt.standard.osu_latency' : {
289
310
'cpu' : {
290
311
'*' : {
291
- 'latency' : (2.0 , None , 0.15 , 'us' )
312
+ 'latency' : (3.8 , None , 0.15 , 'us' )
292
313
}
293
314
},
294
315
'cuda' : {
0 commit comments