From 81054d8b193bfc876b747a1efd364e8fc8bc3e08 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Fri, 12 Jul 2019 10:20:08 +0200 Subject: [PATCH 1/3] Workaround for netcdf test with PrgEnv-pgi dynamic --- cscs-checks/libraries/io/netcdf_compile_run.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cscs-checks/libraries/io/netcdf_compile_run.py b/cscs-checks/libraries/io/netcdf_compile_run.py index dec444fa72..dd8a55e88d 100644 --- a/cscs-checks/libraries/io/netcdf_compile_run.py +++ b/cscs-checks/libraries/io/netcdf_compile_run.py @@ -66,11 +66,15 @@ def setup(self, partition, environ, **job_opts): self.build_system.ldflags = ['-B' + self.linkage] else: self.build_system.ldflags = ['-%s' % self.linkage] - if (environ.name == 'PrgEnv-pgi' and + self.build_system.ldflags += ['-lstdc++'] + if environ.name == 'PrgEnv-pgi' and self.lang == 'cpp': # NOTE: Workaround to fix static linking for C++ with # PrgEnv-pgi - self.lang == 'cpp' and - self.linkage == 'static'): - self.build_system.ldflags += ['-lstdc++'] + if self.linkage == 'static': + self.build_system.ldflags += ['-lstdc++'] + # NOTE: Workaround to fix dynamic linking for C++ with + # PrgEnv-pgi + else: + self.build_system.cppflags = ['-D_GLIBCXX_USE_CXX11_ABI=0'] super().setup(partition, environ, **job_opts) From a3d0d7d69648167348e90fff193d34db646df96a Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Fri, 12 Jul 2019 10:42:10 +0200 Subject: [PATCH 2/3] Apply fix for PrgEnv-pgi dynamic/static linking --- cscs-checks/libraries/io/netcdf_compile_run.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/cscs-checks/libraries/io/netcdf_compile_run.py b/cscs-checks/libraries/io/netcdf_compile_run.py index dd8a55e88d..6cdb388a6c 100644 --- a/cscs-checks/libraries/io/netcdf_compile_run.py +++ b/cscs-checks/libraries/io/netcdf_compile_run.py @@ -66,15 +66,8 @@ def setup(self, partition, environ, **job_opts): self.build_system.ldflags = ['-B' + self.linkage] else: self.build_system.ldflags = ['-%s' % self.linkage] - self.build_system.ldflags += ['-lstdc++'] if environ.name == 'PrgEnv-pgi' and self.lang == 'cpp': - # NOTE: Workaround to fix static linking for C++ with - # PrgEnv-pgi - if self.linkage == 'static': - self.build_system.ldflags += ['-lstdc++'] - # NOTE: Workaround to fix dynamic linking for C++ with - # PrgEnv-pgi - else: - self.build_system.cppflags = ['-D_GLIBCXX_USE_CXX11_ABI=0'] + # NOTE: Workaround to fix compiling for PrgEnv-pgi + self.build_system.cppflags = ['-D_GLIBCXX_USE_CXX11_ABI=0'] super().setup(partition, environ, **job_opts) From 7a8f0720ec44c5fa850b2f28d4840f79fab2af4a Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Mon, 15 Jul 2019 10:47:26 +0200 Subject: [PATCH 3/3] Address PR comments --- cscs-checks/libraries/io/netcdf_compile_run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cscs-checks/libraries/io/netcdf_compile_run.py b/cscs-checks/libraries/io/netcdf_compile_run.py index 6cdb388a6c..6160e32531 100644 --- a/cscs-checks/libraries/io/netcdf_compile_run.py +++ b/cscs-checks/libraries/io/netcdf_compile_run.py @@ -67,7 +67,8 @@ def setup(self, partition, environ, **job_opts): else: self.build_system.ldflags = ['-%s' % self.linkage] if environ.name == 'PrgEnv-pgi' and self.lang == 'cpp': - # NOTE: Workaround to fix compiling for PrgEnv-pgi + # FIXME: Workaround to fix compilation for PrgEnv-pgi + # Cray Case: #243751 self.build_system.cppflags = ['-D_GLIBCXX_USE_CXX11_ABI=0'] super().setup(partition, environ, **job_opts)