summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorién López Villellas <31626586+LorienLV@users.noreply.github.com>2021-10-03 16:11:04 +0200
committerGitHub <noreply@github.com>2021-10-03 10:11:04 -0400
commitc0b383b3e1df88ee9fd52a1f7bf2c9babec4118a (patch)
tree7962675183fb3a69f0fd5bcfdc4e80182da3b750
parent0d6a2381b27ba10568a5f2d9c1d0e50a23d368fd (diff)
downloadspack-c0b383b3e1df88ee9fd52a1f7bf2c9babec4118a.tar.gz
spack-c0b383b3e1df88ee9fd52a1f7bf2c9babec4118a.tar.bz2
spack-c0b383b3e1df88ee9fd52a1f7bf2c9babec4118a.tar.xz
spack-c0b383b3e1df88ee9fd52a1f7bf2c9babec4118a.zip
PICSAR: added support for GCC >10.0 and arm compiler (#24927)
* -fallow-argument-mismatch flag added when compiling with GCC to avoid a compilation error when using a GCC version > 10.0. Co-authored-by: Haz99 <jsalamerosanz@gmail.com> * Filtered every occurrence of "!$OMP SIMD SAFELEN(LVEC2)" when compiling with nvhcp to avoid a compilation error. Co-authored-by: Haz99 <jsalamerosanz@gmail.com> * Line with more than 80 characters split into multiple lines. Co-authored-by: Haz99 <jsalamerosanz@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/picsar/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/picsar/package.py b/var/spack/repos/builtin/packages/picsar/package.py
index b8d7ede7d9..55541b8c37 100644
--- a/var/spack/repos/builtin/packages/picsar/package.py
+++ b/var/spack/repos/builtin/packages/picsar/package.py
@@ -31,6 +31,10 @@ class Picsar(MakefilePackage):
parallel = False
+ def patch(self):
+ if '%arm' in self.spec:
+ filter_file(r'!\$OMP SIMD SAFELEN\(LVEC2\)', '', 'src/diags/diags.F90')
+
@property
def build_targets(self):
targets = []
@@ -65,6 +69,10 @@ class Picsar(MakefilePackage):
targets.append('SYS = default')
+ if '%gcc' in self.spec:
+ targets.append('FARGS=-g -fbounds-check -O3 -fopenmp '
+ '-JModules -fallow-argument-mismatch')
+
return targets
def install(self, spec, prefix):