diff --git a/cscs-checks/libraries/io/hdf5_compile_run.py b/cscs-checks/libraries/io/hdf5_compile_run.py index 491c9868e6..76b0b46e84 100644 --- a/cscs-checks/libraries/io/hdf5_compile_run.py +++ b/cscs-checks/libraries/io/hdf5_compile_run.py @@ -11,6 +11,7 @@ def __init__(self, lang, linkage): 'c': 'C', 'f90': 'Fortran 90' } + self.linkage = linkage self.descr = lang_names[lang] + ' HDF5 ' + linkage.capitalize() self.sourcepath = 'h5ex_d_chunk.' + lang self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc', @@ -74,3 +75,14 @@ def __init__(self, lang, linkage): self.maintainers = ['SO', 'RS'] self.tags = {'production', 'craype'} + + @rfm.run_before('compile') + def cray_linker_workaround(self): + # FIXME: static compilation yields a link error in case of + # PrgEnv-cray(Cray Bug #255707) + if not (self.linkage == 'static' and + self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-cray'): + return + + self.variables = {'ALT_LINKER': '/usr/bin/ld'} diff --git a/cscs-checks/libraries/io/netcdf_compile_run.py b/cscs-checks/libraries/io/netcdf_compile_run.py index 9dcbbf297f..a6ded7da52 100644 --- a/cscs-checks/libraries/io/netcdf_compile_run.py +++ b/cscs-checks/libraries/io/netcdf_compile_run.py @@ -43,9 +43,8 @@ def __init__(self, lang, linkage): @rfm.run_before('compile') def setflags(self): - environ = self.current_environ if self.current_system.name == 'kesch': - if environ.name == 'PrgEnv-cray-nompi': + if self.current_environ.name == 'PrgEnv-cray-nompi': self.modules = ['netcdf/4.4.1.1-gmvolf-17.02', 'netcdf-c++/4.3.0-gmvolf-17.02', 'netcdf-fortran/4.4.4-gmvolf-17.02'] @@ -63,7 +62,7 @@ def setflags(self): '-L$EBROOTNETCDFMINFORTRAN/lib64', '-lnetcdf', '-lnetcdf_c++4', '-lnetcdff' ] - elif environ.name == 'PrgEnv-pgi-nompi': + elif self.current_environ.name == 'PrgEnv-pgi-nompi': self.modules = ['netcdf/4.6.1-pgi-18.5-gcc-5.4.0-2.26', 'netcdf-c++/4.3.0-pgi-18.5-gcc-5.4.0-2.26', 'netcdf-fortran/4.4.4-pgi-18.5-gcc-5.4.0-2.26'] @@ -84,3 +83,14 @@ def setflags(self): ] else: self.build_system.ldflags = ['-%s' % self.linkage] + + @rfm.run_before('compile') + def cray_linker_workaround(self): + # FIXME: static compilation yields a link error in case of + # PrgEnv-cray(Cray Bug #255707) + if not (self.linkage == 'static' and + self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-cray'): + return + + self.variables = {'ALT_LINKER': '/usr/bin/ld'} diff --git a/cscs-checks/libraries/math/scalapack_compile_run.py b/cscs-checks/libraries/math/scalapack_compile_run.py index 75ec4a33b6..4480f272e4 100644 --- a/cscs-checks/libraries/math/scalapack_compile_run.py +++ b/cscs-checks/libraries/math/scalapack_compile_run.py @@ -6,6 +6,7 @@ class ScaLAPACKTest(rfm.RegressionTest): def __init__(self, linkage): + self.linkage = linkage self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'scalapack') self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:mc', @@ -27,6 +28,17 @@ def __init__(self, linkage): self.maintainers = ['CB', 'LM'] self.tags = {'production', 'external-resources'} + @rfm.run_before('compile') + def cray_linker_workaround(self): + # FIXME: static compilation yields a link error in case of + # PrgEnv-cray(Cray Bug #255707) + if not (self.linkage == 'static' and + self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-cray'): + return + + self.variables['ALT_LINKER'] = '/usr/bin/ld' + @rfm.required_version('>=2.14') @rfm.parameterized_test(['static'], ['dynamic']) diff --git a/cscs-checks/prgenv/helloworld.py b/cscs-checks/prgenv/helloworld.py index 399ebbfb59..a06d4dae5e 100644 --- a/cscs-checks/prgenv/helloworld.py +++ b/cscs-checks/prgenv/helloworld.py @@ -6,6 +6,7 @@ class HelloWorldBaseTest(rfm.RegressionTest): def __init__(self, variant, lang, linkage): + self.linkage = linkage self.variables = {'CRAYPE_LINK_TYPE': linkage} self.prgenv_flags = {} self.lang_names = { @@ -32,9 +33,6 @@ def __init__(self, variant, lang, linkage): self.compilation_time_seconds = None - self.maintainers = ['VH', 'EK'] - self.tags = {'production', 'craype'} - result = sn.findall(r'Hello World from thread \s*(\d+) out ' r'of \s*(\d+) from process \s*(\d+) out of ' r'\s*(\d+)', self.stdout) @@ -81,6 +79,9 @@ def num_ranks(match): } } + self.maintainers = ['VH', 'EK'] + self.tags = {'production', 'craype'} + @rfm.run_before('compile') def setflags(self): envname = self.current_environ.name.replace('-nompi', '') @@ -98,6 +99,17 @@ def compile_timer_end(self): elapsed = datetime.now() - self.compilation_time_seconds self.compilation_time_seconds = elapsed.total_seconds() + @rfm.run_before('compile') + def cray_linker_workaround(self): + # FIXME: static compilation yields a link error in case of + # PrgEnv-cray(Cray Bug #255707) + if not (self.linkage == 'static' and + self.current_system.name == 'dom' and + self.current_environ.name.startswith('PrgEnv-cray')): + return + + self.variables['ALT_LINKER'] = '/usr/bin/ld' + @rfm.required_version('>=2.14') @rfm.parameterized_test(*([lang, linkage]