npb: fix mpi rank mismatch errors (#46075)

MPI variant has several rank mismatch errors, which are silently
ignored. This downgrades the errors to warnings.
This commit is contained in:
Fernando Ayats 2024-09-05 20:27:15 +02:00 committed by GitHub
parent 636843f330
commit 4d36b0a5ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -122,6 +122,10 @@ def edit(self, spec, prefix):
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 @@ def edit(self, spec, prefix):
"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,