sfilippone / psblas3

A library of parallel sparse linear algebra on high performance computer.
Other
56 stars 12 forks source link

configure cannot recognize mpich fortran #25

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago
checking for mpi.h... yes
checking for mpxlf2003_r... no
checking for mpxlf2003... no
checking for mpxlf95_r... no
checking for mpxlf90... no
checking for mpiifort... no
checking for mpf95... no
checking for mpf90... no
checking for mpifort... no
checking for mpif95... no
checking for mpif90... mpif90
checking for mpif90... (cached) mpif90
checking for mpif.h... no
configure: error: Cannot find any suitable MPI implementation for Fortran
Cirdans-Home commented 1 year ago

Hi,

Can you attach the config.log file? It should help us see what went wrong with the compiler lookup.

barracuda156 commented 1 year ago

@Cirdans-Home I apologize for a delay. Here are the logs: psblas3_main.log psblas3_config.log

sfilippone commented 1 year ago

@Cirdans-Home I apologize for a delay. Here are the logs: psblas3_main.log psblas3_config.log

The log is quite clear:

configure:5398: mpif90 -c -pipe -Os -m32  conftest.f >&5
--------------------------------------------------------------------------
Unfortunately, this installation of Open MPI was not compiled with
Fortran 90 support.  As such, the mpif90 compiler is non-functional.

--------------------------------------------------------------------------
configure:5398: $? = 1
configure: failed program was:
|       program main
|       include 'mpif.h'
|       end
configure:5403: result: no
configure:5415: error: Cannot find any suitable MPI implementation for Fortran

## ---------------- ##
## Cache variables. ##
## ---------------- ##

You should fix the MPI installation.
Also, you mentioned MPICH but the message says it is coming from OpenMPI, you may want to double check what exactly is installed on your system

Hope this helps.

sfilippone commented 1 year ago

As a further comment: maybe you have both OpenMPI and MPICH installed, you may want to set the environment variables MPIFC, FC, MPICC, CC, MPICXX, CXX to the exact values you want to use.

barracuda156 commented 1 year ago

@sfilippone Well, MPICH installation is fine and includes gfortran support, of course; it is being used by multiple ports. (While MPICH itself has some issues on PPC and macOS, those relate to hydra part, not compiler wrappers.)

But I do have MPICH and OpenMPI indeed. I will try forcing MPICH explicitly (usually Macports handles that correctly automatically via mpi PortGroup).

UPD. Apparently mpif.h is deprecated long back. Note here says it was not yet deprecated in MPICH 3.1 (we are at 4.1 now): https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node411.htm And then: https://github.com/mpi-forum/mpi-forum-historic/issues/233 So rather the configure test is broken and not MPICH installation.

sfilippone commented 1 year ago

@sfilippone Well, MPICH installation is fine and includes gfortran support, of course; it is being used by multiple ports. (While MPICH itself has some issues on PPC and macOS, those relate to hydra part, not compiler wrappers.)

But I do have MPICH and OpenMPI indeed. I will try forcing MPICH explicitly (usually Macports handles that correctly automatically via mpi PortGroup).

UPD. Apparently mpif.h is deprecated long back. Note here says it was not yet deprecated in MPICH 3.1 (we are at 4.1 now): https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node411.htm And then: mpi-forum/mpi-forum-historic#233 So rather the configure test is broken and not MPICH installation.

Not really: the configure test will prefer the MPI module if it is available.

Support for mpif.h will be dropped at some point (probably in the next version), and at that point we are going to switch to the MPIF08 module support. We already have an experimental version, but there have been some instances of MPI/compiler combinations that have run into trouble.

barracuda156 commented 1 year ago

Not really: the configure test will prefer the MPI module if it is available.

For whatever reason it does not, however: it finds MPICH fortran, but fails on the missing header, without trying to look for a module.

sfilippone commented 1 year ago

Is there a new log to look at? Thanks

barracuda156 commented 1 year ago

Is there a new log to look at? Thanks

@sfilippone I am sorry, I completely overlooked that configure was looking at the ancient system mpif (TBH, I did not know it is there at all – no one uses it) instead of Macports one. (And it suggests setting FC= which has no effect. What works is MPIFC=.)

I close the issue as solved.