From c0b383b3e1df88ee9fd52a1f7bf2c9babec4118a Mon Sep 17 00:00:00 2001 From: Lorién López Villellas <31626586+LorienLV@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:11:04 +0200 Subject: 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 * Filtered every occurrence of "!$OMP SIMD SAFELEN(LVEC2)" when compiling with nvhcp to avoid a compilation error. Co-authored-by: Haz99 * Line with more than 80 characters split into multiple lines. Co-authored-by: Haz99 --- var/spack/repos/builtin/packages/picsar/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'var') 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): -- cgit v1.2.3-60-g2f50