From 4d36b0a5efe78c2f32aaadd1026bd52ab41096d1 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Thu, 5 Sep 2024 20:27:15 +0200 Subject: npb: fix mpi rank mismatch errors (#46075) MPI variant has several rank mismatch errors, which are silently ignored. This downgrades the errors to warnings. --- var/spack/repos/builtin/packages/npb/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/npb/package.py b/var/spack/repos/builtin/packages/npb/package.py index 439a09e45c..62d5b86d0e 100644 --- a/var/spack/repos/builtin/packages/npb/package.py +++ b/var/spack/repos/builtin/packages/npb/package.py @@ -122,6 +122,10 @@ class Npb(MakefilePackage): nprocs = spec.variants["nprocs"].value if "implementation=mpi" in spec: + fflags = fflags = ["-O3"] + if spec.satisfies("%gcc@10:"): + fflags.append("-fallow-argument-mismatch") + definitions = { # Parallel Fortran "MPIFC": spec["mpi"].mpifc, @@ -129,7 +133,7 @@ class Npb(MakefilePackage): "FLINK": spec["mpi"].mpif77, "FMPI_LIB": spec["mpi"].libs.ld_flags, "FMPI_INC": "-I" + spec["mpi"].prefix.include, - "FFLAGS": "-O3", + "FFLAGS": " ".join(fflags), "FLINKFLAGS": "-O3", # Parallel C "MPICC": spec["mpi"].mpicc, -- cgit v1.2.3-70-g09d2