diff --git a/cscs-checks/compile/libsci_resolve.py b/cscs-checks/compile/libsci_resolve.py index cae13d291f..4e5350fcee 100644 --- a/cscs-checks/compile/libsci_resolve.py +++ b/cscs-checks/compile/libsci_resolve.py @@ -76,6 +76,14 @@ def set_sanity(self): sn.extractsingle(regex, self.stdout, 'version'), mod_name) ]) + @rfm.run_before('compile') + def cray_linker_workaround(self): + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_environ.name.startswith('PrgEnv-cray') and + self.current_system.name == 'dom'): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' + @rfm.required_version('>=2.14') @rfm.simple_test diff --git a/cscs-checks/libraries/io/hdf5_compile_run.py b/cscs-checks/libraries/io/hdf5_compile_run.py index 9718f944b9..889dbcf516 100644 --- a/cscs-checks/libraries/io/hdf5_compile_run.py +++ b/cscs-checks/libraries/io/hdf5_compile_run.py @@ -83,11 +83,8 @@ def __init__(self, lang, 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'} + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-cray'): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' diff --git a/cscs-checks/libraries/io/netcdf_compile_run.py b/cscs-checks/libraries/io/netcdf_compile_run.py index 73490b0891..72f80d6eb9 100644 --- a/cscs-checks/libraries/io/netcdf_compile_run.py +++ b/cscs-checks/libraries/io/netcdf_compile_run.py @@ -111,11 +111,8 @@ def setflags(self): @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'} + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-cray'): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' diff --git a/cscs-checks/libraries/math/scalapack_compile_run.py b/cscs-checks/libraries/math/scalapack_compile_run.py index 7cb496a929..471e2ca61f 100644 --- a/cscs-checks/libraries/math/scalapack_compile_run.py +++ b/cscs-checks/libraries/math/scalapack_compile_run.py @@ -35,14 +35,11 @@ def __init__(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' + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-cray'): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' @rfm.required_version('>=2.14') diff --git a/cscs-checks/mch/automatic_arrays_acc.py b/cscs-checks/mch/automatic_arrays_acc.py index 0c48c0f2e4..00aa2e5685 100644 --- a/cscs-checks/mch/automatic_arrays_acc.py +++ b/cscs-checks/mch/automatic_arrays_acc.py @@ -76,3 +76,11 @@ def setflags(self): envname = self.current_environ.name self.reference = self.arrays_reference[envname] + + @rfm.run_before('compile') + def cray_linker_workaround(self): + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-cray'): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' diff --git a/cscs-checks/mch/gpu_direct_acc.py b/cscs-checks/mch/gpu_direct_acc.py index 02f3c7ca4a..584436a818 100644 --- a/cscs-checks/mch/gpu_direct_acc.py +++ b/cscs-checks/mch/gpu_direct_acc.py @@ -72,3 +72,11 @@ def setflags(self): self.build_system.fflags += ['-ta=tesla:cc35'] elif self.current_system.name in ['arolla', 'tsa']: self.build_system.fflags += ['-ta=tesla:cc70'] + + @rfm.run_before('compile') + def cray_linker_workaround(self): + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-cray'): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' diff --git a/cscs-checks/microbenchmarks/stream/stream.py b/cscs-checks/microbenchmarks/stream/stream.py index 78c796683a..1806db6579 100644 --- a/cscs-checks/microbenchmarks/stream/stream.py +++ b/cscs-checks/microbenchmarks/stream/stream.py @@ -126,3 +126,11 @@ def prepare_test(self): self.reference = self.stream_bw_reference[envname] except KeyError: pass + + @rfm.run_before('compile') + def cray_linker_workaround(self): + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name == 'PrgEnv-cray_classic'): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' diff --git a/cscs-checks/prgenv/helloworld.py b/cscs-checks/prgenv/helloworld.py index 5286610cc2..263631fffc 100644 --- a/cscs-checks/prgenv/helloworld.py +++ b/cscs-checks/prgenv/helloworld.py @@ -106,14 +106,11 @@ def compile_timer_end(self): @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' + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name.startswith('PrgEnv-cray')): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' @rfm.required_version('>=2.14') diff --git a/cscs-checks/prgenv/mpi_t.py b/cscs-checks/prgenv/mpi_t.py index 4b7cc16df8..a9e7be42c3 100644 --- a/cscs-checks/prgenv/mpi_t.py +++ b/cscs-checks/prgenv/mpi_t.py @@ -24,6 +24,14 @@ def __init__(self): self.maintainers = ['JG'] self.tags = {'production', 'craype', 'maintenance'} + @rfm.run_before('compile') + def cray_linker_workaround(self): + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name.startswith('PrgEnv-cray')): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' + @rfm.run_before('sanity') def set_sanity(self): # 1/ MPI Control Variables: diff --git a/cscs-checks/prgenv/openacc_checks.py b/cscs-checks/prgenv/openacc_checks.py index 4bb0cdd53c..dc67641a7b 100644 --- a/cscs-checks/prgenv/openacc_checks.py +++ b/cscs-checks/prgenv/openacc_checks.py @@ -66,3 +66,11 @@ def setflags(self): self.build_system.fflags = ['-acc', '-ta=tesla:cc35'] elif self.current_system.name in ['arolla', 'tsa']: self.build_system.fflags = ['-acc', '-ta=tesla:cc70'] + + @rfm.run_before('compile') + def cray_linker_workaround(self): + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name.startswith('PrgEnv-cray')): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' diff --git a/cscs-checks/tools/profiling_and_debugging/ipm_mpi_omp.py b/cscs-checks/tools/profiling_and_debugging/ipm_mpi_omp.py index 2deac0f6e3..7ea705afcc 100644 --- a/cscs-checks/tools/profiling_and_debugging/ipm_mpi_omp.py +++ b/cscs-checks/tools/profiling_and_debugging/ipm_mpi_omp.py @@ -91,3 +91,11 @@ def setup(self, partition, environ, **job_opts): r'(?P\d+)', self.htmlrpt, 'totalmissesL1', float), 91159658, -0.1, 0.1), ]) + + @rfm.run_before('compile') + def cray_linker_workaround(self): + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name.startswith('PrgEnv-cray')): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' diff --git a/cscs-checks/tools/profiling_and_debugging/notool.py b/cscs-checks/tools/profiling_and_debugging/notool.py index 548262443a..1365375607 100644 --- a/cscs-checks/tools/profiling_and_debugging/notool.py +++ b/cscs-checks/tools/profiling_and_debugging/notool.py @@ -96,3 +96,11 @@ def setup(self, partition, environ, **job_opts): ]) if self.current_system.name in {'dom', 'daint'}: self.reference['*:elapsed_time'] = self.reference_lang + + @rfm.run_before('compile') + def cray_linker_workaround(self): + # NOTE: Workaround for using CCE < 9.1 in CLE7.UP01.PS03 and above + # See Patch Set README.txt for more details. + if (self.current_system.name == 'dom' and + self.current_environ.name.startswith('PrgEnv-cray')): + self.variables['LINKER_X86_64'] = '/usr/bin/ld'