Skip to content

Commit c77497f

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into patch-1
2 parents c85c4b6 + f6111d7 commit c77497f

File tree

12 files changed

+98
-30
lines changed

12 files changed

+98
-30
lines changed

cscs-checks/libraries/io/netcdf_compile_run.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import os
77

88
import reframe as rfm
9+
import reframe.utility.os_ext as os_ext
910
import reframe.utility.sanity as sn
1011

1112

@@ -113,6 +114,14 @@ def setflags(self):
113114
def cray_linker_workaround(self):
114115
# NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above
115116
# See Patch Set README.txt for more details.
116-
if (self.current_system.name == 'dom' and
117-
self.current_environ.name == 'PrgEnv-cray'):
117+
cle = os_ext.cray_cle_info()
118+
if not cle:
119+
return
120+
121+
if (cle.release == '7.0.UP01' and cle.patchset >= '03'):
118122
self.variables['LINKER_X86_64'] = '/usr/bin/ld'
123+
124+
@rfm.run_before('run')
125+
def cdt2006_cpp_workaround(self):
126+
if (os_ext.cray_cdt_version() == '20.06' and self.lang == 'cpp'):
127+
self.modules += ['cray-hdf5/1.10.6.1']

cscs-checks/libraries/math/trilinos_compile_run.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55

6+
import os
7+
68
import reframe as rfm
9+
import reframe.utility.os_ext as os_ext
710
import reframe.utility.sanity as sn
811

912

@@ -18,6 +21,7 @@ def __init__(self, linkage):
1821
# NOTE: PrgEnv-cray_classic does not support trilinos
1922
if linkage == 'static':
2023
self.valid_prog_environs += ['PrgEnv-cray']
24+
self.linkage = linkage
2125

2226
self.build_system = 'SingleSource'
2327
self.build_system.ldflags = ['-%s' % linkage, '-lparmetis']
@@ -49,3 +53,28 @@ def __init__(self, linkage):
4953
def set_cxxflags(self):
5054
flags = self.prgenv_flags[self.current_environ.name]
5155
self.build_system.cxxflags = flags
56+
57+
@rfm.run_before('compile')
58+
def cdt2006_workaround_intel(self):
59+
if (self.current_environ.name == 'PrgEnv-intel' and
60+
os_ext.cray_cdt_version() == '20.06'):
61+
self.modules += ['cray-netcdf-hdf5parallel']
62+
self.prebuild_cmds = [
63+
'ln -s $CRAY_NETCDF_HDF5PARALLEL_PREFIX/lib/pkgconfig/'
64+
'netcdf-cxx4_parallel.pc netcdf_c++4_parallel.pc'
65+
]
66+
self.variables['PKG_CONFIG_PATH'] = '.:$PKG_CONFIG_PATH'
67+
68+
@rfm.run_before('compile')
69+
def cdt2006_workaround_dynamic(self):
70+
if (os_ext.cray_cdt_version() == '20.06' and
71+
self.linkage == 'dynamic' and
72+
self.current_environ.name == 'PrgEnv-gnu'):
73+
self.variables['PATH'] = (
74+
'/opt/cray/pe/cce/10.0.1/cce-clang/x86_64/bin:$PATH'
75+
)
76+
self.prgenv_flags[self.current_environ.name] += ['-fuse-ld=lld']
77+
78+
# GCC >= 9 is required for the above option; our CUDA-friendly CDT
79+
# uses GCC 8 as default.
80+
self.modules += ['gcc/9.3.0']

cscs-checks/mch/automatic_arrays_acc.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# SPDX-License-Identifier: BSD-3-Clause
55

66
import reframe as rfm
7+
import reframe.utility.os_ext as os_ext
78
import reframe.utility.sanity as sn
89

910

@@ -87,6 +88,9 @@ def cray_linker_workaround(self):
8788

8889
@rfm.run_before('compile')
8990
def cdt2006_pgi_workaround(self):
90-
if (self.current_system.name == 'dom' and
91-
self.current_environ.name == 'PrgEnv-pgi'):
91+
cdt = os_ext.cray_cdt_version()
92+
if not cdt:
93+
return
94+
95+
if (self.current_environ.name == 'PrgEnv-pgi' and cdt == '20.06'):
9296
self.variables.update({'CUDA_HOME': '$CUDATOOLKIT_HOME'})

cscs-checks/mch/gpu_direct_acc.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import os
77
import reframe as rfm
8+
import reframe.utility.os_ext as os_ext
89
import reframe.utility.sanity as sn
910

1011

@@ -83,6 +84,9 @@ def cray_linker_workaround(self):
8384

8485
@rfm.run_before('compile')
8586
def cdt2006_pgi_workaround(self):
86-
if (self.current_system.name == 'dom' and
87-
self.current_environ.name == 'PrgEnv-pgi'):
87+
cdt = os_ext.cray_cdt_version()
88+
if not cdt:
89+
return
90+
91+
if (self.current_environ.name == 'PrgEnv-pgi' and cdt == '20.06'):
8892
self.variables['CUDA_HOME'] = '$CUDATOOLKIT_HOME'

cscs-checks/mch/openacc_cuda_mpi_cppstd.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# SPDX-License-Identifier: BSD-3-Clause
55

66
import reframe as rfm
7+
import reframe.utility.os_ext as os_ext
78
import reframe.utility.sanity as sn
89

910

@@ -93,6 +94,9 @@ def setflags(self):
9394

9495
@rfm.run_before('compile')
9596
def cdt2006_pgi_workaround(self):
96-
if (self.current_system.name == 'dom' and
97-
self.current_environ.name == 'PrgEnv-pgi'):
97+
cdt = os_ext.cray_cdt_version()
98+
if not cdt:
99+
return
100+
101+
if (self.current_environ.name == 'PrgEnv-pgi' and cdt == '20.06'):
98102
self.variables.update({'CUDA_HOME': '$CUDATOOLKIT_HOME'})

cscs-checks/prgenv/openacc_checks.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# SPDX-License-Identifier: BSD-3-Clause
55

66
import reframe as rfm
7+
import reframe.utility.os_ext as os_ext
78
import reframe.utility.sanity as sn
89

910

@@ -77,6 +78,9 @@ def cray_linker_workaround(self):
7778

7879
@rfm.run_before('compile')
7980
def cdt2006_pgi_workaround(self):
80-
if (self.current_system.name == 'dom' and
81-
self.current_environ.name == 'PrgEnv-pgi'):
81+
cdt = os_ext.cray_cdt_version()
82+
if not cdt:
83+
return
84+
85+
if (self.current_environ.name == 'PrgEnv-pgi' and cdt == '20.06'):
8286
self.variables.update({'CUDA_HOME': '$CUDATOOLKIT_HOME'})

cscs-checks/prgenv/opencl_check.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import os
77

88
import reframe as rfm
9+
import reframe.utility.os_ext as os_ext
910
import reframe.utility.sanity as sn
1011

1112

@@ -31,6 +32,9 @@ def setflags(self):
3132

3233
@rfm.run_before('compile')
3334
def cdt2006_pgi_workaround(self):
34-
if (self.current_system.name == 'dom' and
35-
self.current_environ.name == 'PrgEnv-pgi'):
35+
cdt = os_ext.cray_cdt_version()
36+
if not cdt:
37+
return
38+
39+
if (self.current_environ.name == 'PrgEnv-pgi' and cdt == '20.06'):
3640
self.variables.update({'CUDA_HOME': '$CUDATOOLKIT_HOME'})

cscs-checks/system/slurm/slurm.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ def __init__(self):
100100
self.sanity_patterns = sn.assert_found(
101101
r'error: You have to specify, at least, what sort of node you '
102102
r'need: -C gpu for GPU enabled nodes, or -C mc for multicore '
103-
r'nodes.', self.stderr)
103+
r'nodes.|ERROR: you must specify -C with one of the following: '
104+
r'mc,gpu,storage', self.stderr)
104105

105106

106107
@rfm.simple_test
@@ -175,11 +176,8 @@ def __init__(self):
175176
@rfm.run_before('run')
176177
def set_slurm_constraint(self):
177178
cabinet = self.cabinets.get(self.current_partition.fullname)
178-
constraint = f'--constraint={self.current_partition.name}'
179179
if cabinet:
180-
constraint += f'&{cabinet}'
181-
182-
self.job.options += [constraint]
180+
self.job.options += [f'--constraint={cabinet}']
183181

184182

185183
@rfm.simple_test

docs/manpage.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,16 @@ Options controlling job submission
352352
Any job options specified with this command-line option will be emitted after any job options specified in the :js:attr:`access` system partition configuration parameter.
353353

354354
Especially for the Slurm backends, constraint options, such as ``-J constraint=value``, ``-J C=value``, ``-J --constraint=value`` or ``-J -C=value``, are going to be combined with any constraint options specified in the :js:attr:`access` system partition configuration parameter.
355-
For example, if ``-C x`` is specified in the :js:attr:`access` and ``-J C=y`` is passed to the command-line, ReFrame will pass ``-C x,y`` as a constraint to the scheduler.
355+
For example, if ``-C x`` is specified in the :js:attr:`access` and ``-J C=y`` is passed to the command-line, ReFrame will pass ``-C x&y`` as a constraint to the scheduler.
356356
Notice, however, that if constraint options are specified through multiple :option:`-J` options, only the last one will be considered.
357357
If you wish to completely overwrite any constraint options passed in :js:attr:`access`, you should consider passing explicitly the Slurm directive with ``-J '#SBATCH --constraint=new'``.
358358

359359
.. versionchanged:: 3.0
360360
This option has become more flexible.
361361

362+
.. versionchanged:: 3.1
363+
Use ``&`` to combine constraints.
364+
362365
------------------------
363366
Flexible node allocation
364367
------------------------

reframe/core/schedulers/slurm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def emit_preamble(self, job):
214214

215215
if constraints:
216216
preamble.append(
217-
self._format_option(','.join(constraints), '--constraint={0}')
217+
self._format_option('&'.join(constraints), '--constraint={0}')
218218
)
219219

220220
preamble.append(self._format_option(hint, '--hint={0}'))
@@ -326,7 +326,7 @@ def filternodes(self, job, nodes):
326326
'available nodes now: %s' % (partitions, len(nodes)))
327327

328328
if constraints:
329-
constraints = set(constraints.strip().split(','))
329+
constraints = set(constraints.strip().split('&'))
330330
nodes = {n for n in nodes if n.active_features >= constraints}
331331
getlogger().debug(
332332
'flex_alloc_nodes: filtering nodes by constraint(s) %s: '

0 commit comments

Comments
 (0)