From 294742ab7bbac6c7357fcdf851c1031f51d3aaa5 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 11 Apr 2024 23:50:59 -0400 Subject: openmpi: add MPIFC environment variable (#36669) --- var/spack/repos/builtin/packages/openmpi/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index abbf212857..5f2d194daa 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -842,6 +842,12 @@ class Openmpi(AutotoolsPackage, CudaPackage): env.set("MPICXX", join_path(self.prefix.bin, "mpic++")) env.set("MPIF77", join_path(self.prefix.bin, "mpif77")) env.set("MPIF90", join_path(self.prefix.bin, "mpif90")) + # Open MPI also has had mpifort since v1.7, so we can set MPIFC to that + # Note: that mpif77 and mpif90 are deprecated since v1.7, but careful + # testing would be needed to change the MPIF77 and MPIF90 above. For now + # we just *add* functionality + if self.spec.satisfies("@1.7:"): + env.set("MPIFC", join_path(self.prefix.bin, "mpifort")) def setup_dependent_build_environment(self, env, dependent_spec): # Use the spack compiler wrappers under MPI -- cgit v1.2.3-70-g09d2