From f8d6ca3aad454a10b14ba1681a5e113b81589e26 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 10 Apr 2020 18:55:47 +0200 Subject: [PATCH 1/2] Cray linker workaround for CLE7.0.UP01.PS09 --- cscs-checks/compile/libsci_resolve.py | 6 ++++++ cscs-checks/libraries/io/hdf5_compile_run.py | 9 +++------ cscs-checks/libraries/io/netcdf_compile_run.py | 9 +++------ cscs-checks/libraries/math/scalapack_compile_run.py | 9 +++------ cscs-checks/mch/automatic_arrays_acc.py | 8 ++++++++ cscs-checks/mch/gpu_direct_acc.py | 8 ++++++++ cscs-checks/microbenchmarks/stream/stream.py | 8 ++++++++ cscs-checks/prgenv/helloworld.py | 9 +++------ cscs-checks/prgenv/mpi_t.py | 6 ++++++ cscs-checks/prgenv/openacc_checks.py | 6 ++++++ cscs-checks/tools/profiling_and_debugging/ipm_mpi_omp.py | 5 +++++ cscs-checks/tools/profiling_and_debugging/notool.py | 5 +++++ 12 files changed, 64 insertions(+), 24 deletions(-) diff --git a/cscs-checks/compile/libsci_resolve.py b/cscs-checks/compile/libsci_resolve.py index cae13d291f..2d1ca400c3 100644 --- a/cscs-checks/compile/libsci_resolve.py +++ b/cscs-checks/compile/libsci_resolve.py @@ -76,6 +76,12 @@ def set_sanity(self): sn.extractsingle(regex, self.stdout, 'version'), mod_name) ]) + @rfm.run_before('compile') + def cray_linker_workaround(self): + 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..c9721f0420 100644 --- a/cscs-checks/libraries/io/hdf5_compile_run.py +++ b/cscs-checks/libraries/io/hdf5_compile_run.py @@ -85,9 +85,6 @@ def __init__(self, lang, linkage): 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'} + 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..a74a4acb7e 100644 --- a/cscs-checks/libraries/io/netcdf_compile_run.py +++ b/cscs-checks/libraries/io/netcdf_compile_run.py @@ -113,9 +113,6 @@ def setflags(self): 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'} + 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..51ad0f67c8 100644 --- a/cscs-checks/libraries/math/scalapack_compile_run.py +++ b/cscs-checks/libraries/math/scalapack_compile_run.py @@ -37,12 +37,9 @@ def __init__(self, linkage): 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' + 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..d91e5abcb3 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): + # FIXME: static compilation yields a link error in case of + # PrgEnv-cray(Cray Bug #255707) + 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..49e35c4883 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): + # FIXME: static compilation yields a link error in case of + # PrgEnv-cray(Cray Bug #255707) + 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..d84af1f5af 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): + # FIXME: static compilation yields a link error in case of + # PrgEnv-cray(Cray Bug #255707) + 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..0db1a9f2d3 100644 --- a/cscs-checks/prgenv/helloworld.py +++ b/cscs-checks/prgenv/helloworld.py @@ -108,12 +108,9 @@ def compile_timer_end(self): 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' + 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..4ee955e7ab 100644 --- a/cscs-checks/prgenv/mpi_t.py +++ b/cscs-checks/prgenv/mpi_t.py @@ -24,6 +24,12 @@ def __init__(self): self.maintainers = ['JG'] self.tags = {'production', 'craype', 'maintenance'} + @rfm.run_before('compile') + def cray_linker_workaround(self): + 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..6f67b249e2 100644 --- a/cscs-checks/prgenv/openacc_checks.py +++ b/cscs-checks/prgenv/openacc_checks.py @@ -66,3 +66,9 @@ 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): + 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..bc2c789e17 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,8 @@ 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): + if 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..e45b46fafe 100644 --- a/cscs-checks/tools/profiling_and_debugging/notool.py +++ b/cscs-checks/tools/profiling_and_debugging/notool.py @@ -96,3 +96,8 @@ 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): + if self.current_environ.name.startswith('PrgEnv-cray'): + self.variables['LINKER_X86_64'] = '/usr/bin/ld' From 02bba3585bc01469ba982580d6ddf39d85d393c2 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Mon, 20 Apr 2020 18:45:08 +0200 Subject: [PATCH 2/2] Add proper note about the Cray linker workaround --- cscs-checks/compile/libsci_resolve.py | 2 ++ cscs-checks/libraries/io/hdf5_compile_run.py | 4 ++-- cscs-checks/libraries/io/netcdf_compile_run.py | 4 ++-- cscs-checks/libraries/math/scalapack_compile_run.py | 4 ++-- cscs-checks/mch/automatic_arrays_acc.py | 4 ++-- cscs-checks/mch/gpu_direct_acc.py | 4 ++-- cscs-checks/microbenchmarks/stream/stream.py | 4 ++-- cscs-checks/prgenv/helloworld.py | 4 ++-- cscs-checks/prgenv/mpi_t.py | 2 ++ cscs-checks/prgenv/openacc_checks.py | 2 ++ cscs-checks/tools/profiling_and_debugging/ipm_mpi_omp.py | 5 ++++- cscs-checks/tools/profiling_and_debugging/notool.py | 5 ++++- 12 files changed, 28 insertions(+), 16 deletions(-) diff --git a/cscs-checks/compile/libsci_resolve.py b/cscs-checks/compile/libsci_resolve.py index 2d1ca400c3..4e5350fcee 100644 --- a/cscs-checks/compile/libsci_resolve.py +++ b/cscs-checks/compile/libsci_resolve.py @@ -78,6 +78,8 @@ def set_sanity(self): @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' diff --git a/cscs-checks/libraries/io/hdf5_compile_run.py b/cscs-checks/libraries/io/hdf5_compile_run.py index c9721f0420..889dbcf516 100644 --- a/cscs-checks/libraries/io/hdf5_compile_run.py +++ b/cscs-checks/libraries/io/hdf5_compile_run.py @@ -83,8 +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) + # 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 a74a4acb7e..72f80d6eb9 100644 --- a/cscs-checks/libraries/io/netcdf_compile_run.py +++ b/cscs-checks/libraries/io/netcdf_compile_run.py @@ -111,8 +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) + # 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 51ad0f67c8..471e2ca61f 100644 --- a/cscs-checks/libraries/math/scalapack_compile_run.py +++ b/cscs-checks/libraries/math/scalapack_compile_run.py @@ -35,8 +35,8 @@ 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) + # 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/automatic_arrays_acc.py b/cscs-checks/mch/automatic_arrays_acc.py index d91e5abcb3..00aa2e5685 100644 --- a/cscs-checks/mch/automatic_arrays_acc.py +++ b/cscs-checks/mch/automatic_arrays_acc.py @@ -79,8 +79,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) + # 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 49e35c4883..584436a818 100644 --- a/cscs-checks/mch/gpu_direct_acc.py +++ b/cscs-checks/mch/gpu_direct_acc.py @@ -75,8 +75,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) + # 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 d84af1f5af..1806db6579 100644 --- a/cscs-checks/microbenchmarks/stream/stream.py +++ b/cscs-checks/microbenchmarks/stream/stream.py @@ -129,8 +129,8 @@ def prepare_test(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) + # 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 0db1a9f2d3..263631fffc 100644 --- a/cscs-checks/prgenv/helloworld.py +++ b/cscs-checks/prgenv/helloworld.py @@ -106,8 +106,8 @@ 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) + # 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/prgenv/mpi_t.py b/cscs-checks/prgenv/mpi_t.py index 4ee955e7ab..a9e7be42c3 100644 --- a/cscs-checks/prgenv/mpi_t.py +++ b/cscs-checks/prgenv/mpi_t.py @@ -26,6 +26,8 @@ def __init__(self): @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/prgenv/openacc_checks.py b/cscs-checks/prgenv/openacc_checks.py index 6f67b249e2..dc67641a7b 100644 --- a/cscs-checks/prgenv/openacc_checks.py +++ b/cscs-checks/prgenv/openacc_checks.py @@ -69,6 +69,8 @@ def setflags(self): @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 bc2c789e17..7ea705afcc 100644 --- a/cscs-checks/tools/profiling_and_debugging/ipm_mpi_omp.py +++ b/cscs-checks/tools/profiling_and_debugging/ipm_mpi_omp.py @@ -94,5 +94,8 @@ def setup(self, partition, environ, **job_opts): @rfm.run_before('compile') def cray_linker_workaround(self): - if self.current_environ.name.startswith('PrgEnv-cray'): + # 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 e45b46fafe..1365375607 100644 --- a/cscs-checks/tools/profiling_and_debugging/notool.py +++ b/cscs-checks/tools/profiling_and_debugging/notool.py @@ -99,5 +99,8 @@ def setup(self, partition, environ, **job_opts): @rfm.run_before('compile') def cray_linker_workaround(self): - if self.current_environ.name.startswith('PrgEnv-cray'): + # 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'