From a07afa6e1a88019f8ec0bdbba3de20ad84499fd0 Mon Sep 17 00:00:00 2001 From: Paul Kuberry Date: Tue, 8 Aug 2023 05:10:27 -0400 Subject: [PATCH] OpenMPI: require compilers for F77 and "modern" Fortran (#39266) --- var/spack/repos/builtin/packages/openmpi/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index f520568f737..89222270481 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -897,7 +897,7 @@ def die_without_fortran(self): # Until we can pass variants such as +fortran through virtual # dependencies depends_on('mpi'), require Fortran compiler to # avoid delayed build errors in dependents. - if (self.compiler.f77 is None) or (self.compiler.fc is None): + if (self.compiler.f77 is None) and (self.compiler.fc is None): raise InstallError("OpenMPI requires both C and Fortran compilers!") @when("@main")