summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2021-04-16 16:34:48 +0200
committerGitHub <noreply@github.com>2021-04-16 16:34:48 +0200
commit06ca7f4f3e98217998a183959b4ccd7d61227ab8 (patch)
tree9616639a41be861312544a9982bc520fa273c9f4
parente6de04d149f27e1ac1004087f9865f522d780ddd (diff)
downloadspack-06ca7f4f3e98217998a183959b4ccd7d61227ab8.tar.gz
spack-06ca7f4f3e98217998a183959b4ccd7d61227ab8.tar.bz2
spack-06ca7f4f3e98217998a183959b4ccd7d61227ab8.tar.xz
spack-06ca7f4f3e98217998a183959b4ccd7d61227ab8.zip
numactl: enable building with pgi@20: (#23026)
-rw-r--r--var/spack/repos/builtin/packages/numactl/package.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/numactl/package.py b/var/spack/repos/builtin/packages/numactl/package.py
index f6c82f5522..05f5bf4bd1 100644
--- a/var/spack/repos/builtin/packages/numactl/package.py
+++ b/var/spack/repos/builtin/packages/numactl/package.py
@@ -32,14 +32,21 @@ class Numactl(AutotoolsPackage):
bash = which('bash')
bash('./autogen.sh')
+ @when('%nvhpc')
def patch(self):
+ self._nvhpc_patch()
+
+ @when('%pgi@20:')
+ def patch(self):
+ self._nvhpc_patch()
+
+ def _nvhpc_patch(self):
# Remove flags not recognized by the NVIDIA compiler
- if self.spec.satisfies('%nvhpc'):
- filter_file('-ffast-math -funroll-loops', '', 'Makefile.am')
- filter_file('-std=gnu99', '-c99', 'Makefile.am')
+ filter_file('-ffast-math -funroll-loops', '', 'Makefile.am')
+ filter_file('-std=gnu99', '-c99', 'Makefile.am')
# Avoid undefined reference errors
- if self.spec.satisfies('@2.0.14 %nvhpc'):
+ if self.spec.satisfies('@2.0.14'):
filter_file('numa_sched_setaffinity_v1_int',
'numa_sched_setaffinity_v1', 'libnuma.c')
filter_file('numa_sched_setaffinity_v2_int',