Skip to content

Commit 13b56b4

Browse files
author
Vasileios Karakasis
authored
Merge pull request #1151 from teojgo/bugfix/dom_static_linkage
[test] Introduce workaround for static linking tests on Dom
2 parents 4fac6b0 + 339d3d8 commit 13b56b4

File tree

4 files changed

+52
-6
lines changed

4 files changed

+52
-6
lines changed

cscs-checks/libraries/io/hdf5_compile_run.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def __init__(self, lang, linkage):
1111
'c': 'C',
1212
'f90': 'Fortran 90'
1313
}
14+
self.linkage = linkage
1415
self.descr = lang_names[lang] + ' HDF5 ' + linkage.capitalize()
1516
self.sourcepath = 'h5ex_d_chunk.' + lang
1617
self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc',
@@ -74,3 +75,14 @@ def __init__(self, lang, linkage):
7475

7576
self.maintainers = ['SO', 'RS']
7677
self.tags = {'production', 'craype'}
78+
79+
@rfm.run_before('compile')
80+
def cray_linker_workaround(self):
81+
# FIXME: static compilation yields a link error in case of
82+
# PrgEnv-cray(Cray Bug #255707)
83+
if not (self.linkage == 'static' and
84+
self.current_system.name == 'dom' and
85+
self.current_environ.name == 'PrgEnv-cray'):
86+
return
87+
88+
self.variables = {'ALT_LINKER': '/usr/bin/ld'}

cscs-checks/libraries/io/netcdf_compile_run.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ def __init__(self, lang, linkage):
4343

4444
@rfm.run_before('compile')
4545
def setflags(self):
46-
environ = self.current_environ
4746
if self.current_system.name == 'kesch':
48-
if environ.name == 'PrgEnv-cray-nompi':
47+
if self.current_environ.name == 'PrgEnv-cray-nompi':
4948
self.modules = ['netcdf/4.4.1.1-gmvolf-17.02',
5049
'netcdf-c++/4.3.0-gmvolf-17.02',
5150
'netcdf-fortran/4.4.4-gmvolf-17.02']
@@ -63,7 +62,7 @@ def setflags(self):
6362
'-L$EBROOTNETCDFMINFORTRAN/lib64',
6463
'-lnetcdf', '-lnetcdf_c++4', '-lnetcdff'
6564
]
66-
elif environ.name == 'PrgEnv-pgi-nompi':
65+
elif self.current_environ.name == 'PrgEnv-pgi-nompi':
6766
self.modules = ['netcdf/4.6.1-pgi-18.5-gcc-5.4.0-2.26',
6867
'netcdf-c++/4.3.0-pgi-18.5-gcc-5.4.0-2.26',
6968
'netcdf-fortran/4.4.4-pgi-18.5-gcc-5.4.0-2.26']
@@ -84,3 +83,14 @@ def setflags(self):
8483
]
8584
else:
8685
self.build_system.ldflags = ['-%s' % self.linkage]
86+
87+
@rfm.run_before('compile')
88+
def cray_linker_workaround(self):
89+
# FIXME: static compilation yields a link error in case of
90+
# PrgEnv-cray(Cray Bug #255707)
91+
if not (self.linkage == 'static' and
92+
self.current_system.name == 'dom' and
93+
self.current_environ.name == 'PrgEnv-cray'):
94+
return
95+
96+
self.variables = {'ALT_LINKER': '/usr/bin/ld'}

cscs-checks/libraries/math/scalapack_compile_run.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
class ScaLAPACKTest(rfm.RegressionTest):
88
def __init__(self, linkage):
9+
self.linkage = linkage
910
self.sourcesdir = os.path.join(self.current_system.resourcesdir,
1011
'scalapack')
1112
self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:mc',
@@ -27,6 +28,17 @@ def __init__(self, linkage):
2728
self.maintainers = ['CB', 'LM']
2829
self.tags = {'production', 'external-resources'}
2930

31+
@rfm.run_before('compile')
32+
def cray_linker_workaround(self):
33+
# FIXME: static compilation yields a link error in case of
34+
# PrgEnv-cray(Cray Bug #255707)
35+
if not (self.linkage == 'static' and
36+
self.current_system.name == 'dom' and
37+
self.current_environ.name == 'PrgEnv-cray'):
38+
return
39+
40+
self.variables['ALT_LINKER'] = '/usr/bin/ld'
41+
3042

3143
@rfm.required_version('>=2.14')
3244
@rfm.parameterized_test(['static'], ['dynamic'])

cscs-checks/prgenv/helloworld.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
class HelloWorldBaseTest(rfm.RegressionTest):
88
def __init__(self, variant, lang, linkage):
9+
self.linkage = linkage
910
self.variables = {'CRAYPE_LINK_TYPE': linkage}
1011
self.prgenv_flags = {}
1112
self.lang_names = {
@@ -32,9 +33,6 @@ def __init__(self, variant, lang, linkage):
3233

3334
self.compilation_time_seconds = None
3435

35-
self.maintainers = ['VH', 'EK']
36-
self.tags = {'production', 'craype'}
37-
3836
result = sn.findall(r'Hello World from thread \s*(\d+) out '
3937
r'of \s*(\d+) from process \s*(\d+) out of '
4038
r'\s*(\d+)', self.stdout)
@@ -81,6 +79,9 @@ def num_ranks(match):
8179
}
8280
}
8381

82+
self.maintainers = ['VH', 'EK']
83+
self.tags = {'production', 'craype'}
84+
8485
@rfm.run_before('compile')
8586
def setflags(self):
8687
envname = self.current_environ.name.replace('-nompi', '')
@@ -98,6 +99,17 @@ def compile_timer_end(self):
9899
elapsed = datetime.now() - self.compilation_time_seconds
99100
self.compilation_time_seconds = elapsed.total_seconds()
100101

102+
@rfm.run_before('compile')
103+
def cray_linker_workaround(self):
104+
# FIXME: static compilation yields a link error in case of
105+
# PrgEnv-cray(Cray Bug #255707)
106+
if not (self.linkage == 'static' and
107+
self.current_system.name == 'dom' and
108+
self.current_environ.name.startswith('PrgEnv-cray')):
109+
return
110+
111+
self.variables['ALT_LINKER'] = '/usr/bin/ld'
112+
101113

102114
@rfm.required_version('>=2.14')
103115
@rfm.parameterized_test(*([lang, linkage]

0 commit comments

Comments
 (0)