Skip to content

Commit 15c9a8c

Browse files
author
Theofilos Manitaras
committed
Resolve conflicts
2 parents 8fcdb41 + 2f3cfcb commit 15c9a8c

File tree

10 files changed

+77
-81
lines changed

10 files changed

+77
-81
lines changed

cscs-checks/libraries/io/hdf5_compile_run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, lang, linkage):
2020
'PrgEnv-intel', 'PrgEnv-pgi']
2121
self.modules = ['cray-hdf5']
2222
self.keep_files = ['h5dump_out.txt']
23+
2324
# C and Fortran write transposed matrix
2425
if lang == 'c':
2526
self.sanity_patterns = sn.all([

cscs-checks/libraries/io/netcdf_compile_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def __init__(self, lang, linkage):
4141
self.maintainers = ['AJ', 'SO']
4242
self.tags = {'production', 'craype', 'external-resources'}
4343

44-
@rfm.run_after('setup')
45-
def set_flags(self):
44+
@rfm.run_before('compile')
45+
def setflags(self):
4646
# FIXME: static compilation yields a link error in case of
4747
# PrgEnv-cray(Cray Bug #255707)
4848
if (self.linkage == 'static' and

cscs-checks/libraries/math/scalapack_compile_run.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def __init__(self, linkage):
1616
self.num_tasks = 16
1717
self.num_tasks_per_node = 8
1818
self.variables = {'CRAYPE_LINK_TYPE': linkage}
19-
2019
if self.current_system.name == 'kesch':
2120
self.exclusive_access = True
2221
self.valid_prog_environs = ['PrgEnv-cray']
@@ -29,7 +28,7 @@ def __init__(self, linkage):
2928
self.maintainers = ['CB', 'LM']
3029
self.tags = {'production', 'external-resources'}
3130

32-
@rfm.run_after('setup')
31+
@rfm.run_before('compile')
3332
def set_linker_variables(self):
3433
# FIXME: static compilation yields a link error in case of
3534
# PrgEnv-cray(Cray Bug #255707)

cscs-checks/libraries/math/trilinos_compile_run.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
@rfm.parameterized_test(['static'], ['dynamic'])
77
class TrilinosTest(rfm.RegressionTest):
88
def __init__(self, linkage):
9-
super().__init__()
109
self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc',
1110
'tiger:gpu']
1211
# NOTE: PrgEnv-cray in dynamic does not work because of CrayBug/809265
@@ -38,7 +37,7 @@ def __init__(self, linkage):
3837
self.maintainers = ['AJ', 'CB']
3938
self.tags = {'production', 'craype'}
4039

41-
def setup(self, partition, environ, **job_opts):
42-
prgenv_flags = self.prgenv_flags[environ.name]
43-
self.build_system.cxxflags = prgenv_flags
44-
super().setup(partition, environ, **job_opts)
40+
@rfm.run_before('compile')
41+
def set_cxxflags(self):
42+
flags = self.prgenv_flags[self.current_environ.name]
43+
self.build_system.cxxflags = flags

cscs-checks/libraries/petsc/petsc_helloworld.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@
55
@rfm.required_version('>=2.14')
66
@rfm.parameterized_test(['dynamic'], ['static'])
77
class PetscPoisson2DCheck(rfm.RegressionTest):
8-
def __init__(self, variant):
9-
super().__init__()
8+
def __init__(self, linkage):
109
self.descr = ('Compile/run PETSc 2D Poisson example with cray-petsc '
11-
'(%s linking)') % variant
10+
'(%s linking)') % linkage
1211
self.valid_systems = ['daint:gpu', 'daint:mc',
1312
'dom:gpu', 'dom:mc', 'tiger:gpu']
14-
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu',
15-
'PrgEnv-intel']
13+
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu']
14+
if linkage == 'dynamic':
15+
# FIXME: static compilation yields a link error in case of
16+
# PrgEnv-intel (Cray Bug #255701)
17+
self.valid_prog_environs += ['PrgEnv-intel']
18+
1619
self.sourcepath = 'poisson2d.c'
1720
self.modules = ['cray-petsc']
1821
self.num_tasks = 16
1922
self.num_tasks_per_node = 8
2023
self.build_system = 'SingleSource'
21-
if variant == 'dynamic':
22-
self.build_system.cflags = ['-dynamic']
23-
24+
self.variables = {'CRAYPE_LINK_TYPE': linkage}
2425
self.executable_opts = ['-da_grid_x 4', '-da_grid_y 4', '-ksp_monitor']
2526

2627
# Check the final residual norm for convergence
2728
norm = sn.extractsingle(r'\s+\d+\s+KSP Residual norm\s+(?P<norm>\S+)',
2829
self.stdout, 'norm', float, -1)
2930
self.sanity_patterns = sn.assert_lt(norm, 1.0e-5)
30-
3131
self.tags = {'production', 'craype'}
3232
self.maintainers = ['AJ', 'CB']

cscs-checks/mch/g2g_meteoswiss_check.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
@rfm.parameterized_test([1], [2])
66
class G2GMeteoswissTest(rfm.RegressionTest):
77
def __init__(self, g2g):
8-
super().__init__()
98
self.descr = 'G2G Meteoswiss check with G2G=%s' % g2g
109
self.strict_check = False
1110
self.valid_systems = ['kesch:cn']
12-
13-
# FIXME: temporary workaround until the mvapich module is fixed;
14-
# 'PrgEnv-gnu-c2sm-gpu' will be added later
1511
self.valid_prog_environs = ['PrgEnv-gnu']
1612
self.exclusive_access = True
1713
self.modules = ['cmake']

cscs-checks/mch/gpu_direct_cuda.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
@rfm.simple_test
77
class GpuDirectCudaCheck(rfm.RegressionTest):
88
def __init__(self):
9-
super().__init__()
109
self.descr = 'tests gpu-direct for CUDA'
1110
self.valid_systems = ['daint:gpu', 'dom:gpu', 'kesch:cn', 'tiger:gpu']
12-
# FIXME: temporary workaround until the mvapich module is fixed
13-
# 'PrgEnv-gnu-c2sm-gpu' will be added later
1411
self.valid_prog_environs = ['PrgEnv-gnu']
1512
self.sourcepath = 'gpu_direct_cuda.cu'
1613
self.build_system = 'SingleSource'

cscs-checks/prgenv/helloworld.py

Lines changed: 56 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -32,82 +32,89 @@ def __init__(self, variant, lang, linkage):
3232
self.valid_prog_environs = []
3333

3434
self.compilation_time_seconds = None
35-
self.maintainers = ['VH', 'EK']
36-
self.tags = {'production', 'craype'}
37-
38-
def compile(self):
39-
self.compilation_time_seconds = datetime.now()
40-
super().compile()
41-
self.compilation_time_seconds = (
42-
datetime.now() - self.compilation_time_seconds).total_seconds()
43-
44-
@rfm.run_after('setup')
45-
def set_flags(self):
46-
# FIXME: static compilation yields a link error in case of
47-
# PrgEnv-cray(Cray Bug #255707)
48-
if (self.linkage == 'static' and
49-
self.current_system.name == 'dom' and
50-
self.current_environ.name.startswith('PrgEnv-cray')):
51-
self.variables = {'LINKER_X86_64': '/usr/bin/ld',
52-
'LINKER_AARCH64': '=/usr/bin/ld'}
5335

5436
result = sn.findall(r'Hello World from thread \s*(\d+) out '
5537
r'of \s*(\d+) from process \s*(\d+) out of '
5638
r'\s*(\d+)', self.stdout)
5739

40+
num_tasks = sn.getattr(self, 'num_tasks')
41+
num_cpus_per_task = sn.getattr(self, 'num_cpus_per_task')
42+
43+
def tid(match):
44+
return int(match.group(1))
45+
46+
def num_threads(match):
47+
return int(match.group(2))
48+
49+
def rank(match):
50+
return int(match.group(3))
51+
52+
def num_ranks(match):
53+
return int(match.group(4))
54+
5855
self.sanity_patterns = sn.all(
59-
sn.chain([sn.assert_eq(sn.count(result), self.num_tasks *
60-
self.num_cpus_per_task)],
61-
sn.map(
62-
lambda x: sn.assert_lt(int(x.group(1)),
63-
int(x.group(2))),
64-
result),
65-
sn.map(
66-
lambda x: sn.assert_lt(int(x.group(3)),
67-
int(x.group(4))),
68-
result),
69-
sn.map(
70-
lambda x: sn.assert_lt(int(x.group(1)),
71-
self.num_cpus_per_task),
72-
result),
73-
sn.map(
74-
lambda x: sn.assert_eq(int(x.group(2)),
75-
self.num_cpus_per_task),
76-
result),
77-
sn.map(
78-
lambda x: sn.assert_lt(int(x.group(3)),
79-
self.num_tasks),
80-
result),
81-
sn.map(
82-
lambda x: sn.assert_eq(int(x.group(4)),
83-
self.num_tasks),
84-
result),
85-
)
56+
sn.chain(
57+
[sn.assert_eq(sn.count(result), num_tasks*num_cpus_per_task)],
58+
sn.map(lambda x: sn.assert_lt(tid(x), num_threads(x)), result),
59+
sn.map(lambda x: sn.assert_lt(rank(x), num_ranks(x)), result),
60+
sn.map(
61+
lambda x: sn.assert_lt(tid(x), num_cpus_per_task), result
62+
),
63+
sn.map(
64+
lambda x: sn.assert_eq(num_threads(x), num_cpus_per_task),
65+
result
66+
),
67+
sn.map(lambda x: sn.assert_lt(rank(x), num_tasks), result),
68+
sn.map(
69+
lambda x: sn.assert_eq(num_ranks(x), num_tasks), result
70+
),
71+
)
8672
)
87-
8873
self.perf_patterns = {
8974
'compilation_time': sn.getattr(self, 'compilation_time_seconds')
9075
}
9176
self.reference = {
9277
'*': {
93-
'compilation_time': (60, None, 0.1)
78+
'compilation_time': (60, None, 0.1, 's')
9479
}
9580
}
9681

82+
self.maintainers = ['VH', 'EK']
83+
self.tags = {'production', 'craype'}
84+
85+
@rfm.run_before('compile')
86+
def setflags(self):
87+
# FIXME: static compilation yields a link error in case of
88+
# PrgEnv-cray(Cray Bug #255707)
89+
if (self.linkage == 'static' and
90+
self.current_system.name == 'dom' and
91+
self.current_environ.name.startswith('PrgEnv-cray')):
92+
self.variables = {'LINKER_X86_64': '/usr/bin/ld',
93+
'LINKER_AARCH64': '=/usr/bin/ld'}
94+
9795
envname = self.current_environ.name.replace('-nompi', '')
9896
prgenv_flags = self.prgenv_flags[envname]
9997
self.build_system.cflags = prgenv_flags
10098
self.build_system.cxxflags = prgenv_flags
10199
self.build_system.fflags = prgenv_flags
102100

101+
@rfm.run_before('compile')
102+
def compile_timer_start(self):
103+
self.compilation_time_seconds = datetime.now()
104+
105+
@rfm.run_after('compile')
106+
def compile_timer_end(self):
107+
elapsed = datetime.now() - self.compilation_time_seconds
108+
self.compilation_time_seconds = elapsed.total_seconds()
109+
103110

104111
@rfm.required_version('>=2.14')
105112
@rfm.parameterized_test(*([lang, linkage]
106113
for lang in ['cpp', 'c', 'f90']
107114
for linkage in ['dynamic', 'static']))
108115
class HelloWorldTestSerial(HelloWorldBaseTest):
109-
def __init__(self, lang, linkage, **kwargs):
110-
super().__init__('serial', lang, linkage, **kwargs)
116+
def __init__(self, lang, linkage):
117+
super().__init__('serial', lang, linkage)
111118
self.valid_systems += ['kesch:pn']
112119
self.sourcepath += '_serial.' + lang
113120
self.descr += ' Serial ' + linkage.capitalize()

cscs-checks/tools/profiling_and_debugging/perftools.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def __init__(self, lang):
2929
self.modules += ['craype-accel-nvidia60']
3030

3131
self.build_system = 'Make'
32-
# NOTE: Restrict concurrency to allow creation of Fortran modules
3332
if lang == 'F90':
33+
# NOTE: Restrict concurrency to allow creation of Fortran modules
3434
self.build_system.max_concurrency = 1
3535

3636
self.prgenv_flags = {
@@ -50,10 +50,6 @@ def __init__(self, lang):
5050
'LIB=-lstdc++']
5151

5252
self.executable = 'jacobi'
53-
# NOTE: Reduce time limit because for PrgEnv-pgi even if the output
54-
# is correct, the batch job uses all the time.
55-
self.time_limit = (0, 5, 0)
56-
5753
self.num_tasks = 3
5854
self.num_tasks_per_node = 3
5955
self.num_cpus_per_task = 4
@@ -94,8 +90,8 @@ def __init__(self, lang):
9490
self.maintainers = ['JG', 'MKr']
9591
self.tags = {'production', 'craype'}
9692

97-
def setup(self, environ, partition, **job_opts):
98-
super().setup(environ, partition, **job_opts)
93+
@rfm.run_before('compile')
94+
def setflags(self):
9995
flags = self.prgenv_flags[self.current_environ.name]
10096
self.build_system.cflags = flags
10197
self.build_system.cxxflags = flags

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ You can always find the latest release `here <https://github.com/eth-cscs/refram
3131
Publications
3232
============
3333

34+
* Slides [`pdf <https://drive.google.com/open?id=1W7R5lfRkXvBpVDSZ7dVBadk_d3K4dFrS>`__] @ `5th EasyBuild User Meeting 2020 <https://github.com/easybuilders/easybuild/wiki/5th-EasyBuild-User-Meeting>`__.
3435
* Slides [`pdf <https://drive.google.com/open?id=1Z3faPh9OSSXvlLHL07co3MRRn443dYsY>`__] @ `HPC System Testing BoF <https://sc19.supercomputing.org/session/?sess=sess324>`__, SC'19.
3536
* Slides [`pdf <https://drive.google.com/open?id=1JOFqY3ejbR1X5kTn_IZyp1GlCd2ZZS58>`__] @ `HUST 2019 <https://sc19.supercomputing.org/session/?sess=sess116>`__, SC'19.
3637
* Slides [`pdf <https://drive.google.com/open?id=1iwg1I48LVaWhhZCZIYPJSi3hdFLRcuhi>`__] @ `HPC Knowledge Meeting '19 <https://hpckp.org/>`__.

0 commit comments

Comments
 (0)