[petsc-dev] mpi.mod --with-fortran-interfaces=0

Satish Balay balay at mcs.anl.gov
Wed Mar 24 09:10:18 CDT 2021


On Wed, 24 Mar 2021, Pierre Jolivet wrote:

> 
> 
> > On 24 Mar 2021, at 2:55 PM, Matthew Knepley <knepley at gmail.com> wrote:
> > 
> > On Wed, Mar 24, 2021 at 9:37 AM Pierre Jolivet <pierre at joliv.et <mailto:pierre at joliv.et>> wrote:
> > Hello,
> > It seems mpi.mod is now mandatory https://gitlab.com/petsc/petsc/-/commit/68bd534a466d12bdec28b4c298b715271ec2dd31 <https://gitlab.com/petsc/petsc/-/commit/68bd534a466d12bdec28b4c298b715271ec2dd31>.
> > mpi.mod is not shipped by MS-MPI.
> > I want to build MUMPS through PETSc and don’t really care about the Fortran PETSc interface on our Windows boxes (--with-fortran-interfaces=0).
> > 
> > I think you want --with-fc=0, which should turn off this check.
> 
> No, I have gfortran, I want to compile MUMPS with PETSc, that won’t work --with-fc=0.
> Also, the error message in the configure is wrong, it should read "PETSc Fortran bindings” (not “fortran interface”), and in my email, one should replace --with-fortran-interfaces by --with-fortran-bindings, sorry about that.
> I guess there is a missing check before raise RuntimeError('mpi.mod not found! PETSc fortran interface requires a working mpi.mod'), like if self.argDB['with-fortran-interfaces']
> But I don’t know if that makes sense.

I guess you mean:

diff --git a/config/BuildSystem/config/packages/MPI.py b/config/BuildSystem/config/packages/MPI.py
index 7ea2716cc5..5a1baff9f9 100644
--- a/config/BuildSystem/config/packages/MPI.py
+++ b/config/BuildSystem/config/packages/MPI.py
@@ -497,7 +497,7 @@ Unable to run hostname to check the network')
 
   def FortranMPICheck(self):
     '''Make sure fortran include [mpif.h] and library symbols are found'''
-    if not hasattr(self.compilers, 'FC'):
+    if not hasattr(self.compilers, 'FC') or not self.argDB['with-fortran-bindings']:
       return 0
     # Fortran compiler is being used - so make sure mpif.h exists
     self.libraries.pushLanguage('FC')

If MS-MPI is missing mpi.mod - I guess we'll have to revert this requirement. For some reason the tests in CI don't error out. I'll have to check.

I can add back mpif.h usage  [without the extra complex code we had for handling some corner cases - in this mode]

Satish

> 
> Thanks,
> Pierre
> 
> >   Thanks,
> > 
> >     Matt
> >  
> > Yet, I’m now hit by:
> > *******************************************************************************
> >          UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
> > -------------------------------------------------------------------------------
> > mpi.mod not found! PETSc fortran interface requires a working mpi.mod
> > *******************************************************************************
> > Could this be fixed somehow, please?
> > Thanks,
> > Pierre
> > 
> > 
> > -- 
> > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> > -- Norbert Wiener
> > 
> > https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
> 


More information about the petsc-dev mailing list