coin-or-tools / ThirdParty-Mumps

COIN-OR autotools harness to build Mumps
Eclipse Public License 1.0
18 stars 13 forks source link

Compilation fails on Fedora 32 #4

Closed jbaayen closed 4 years ago

jbaayen commented 4 years ago

Trying to compile ThirdParty-Mumps produces MPI errors on Fedora 32:

MUMPS/src/dmumps_comm_buffer.F:2667:23:

 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
......
 2667 |         CALL MPI_PACK( LIST_SLAVES, NSLAVES, MPI_INTEGER,
      |                       1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
svigerske commented 4 years ago

I don't have a GCC 10 yet and don't know much of Fortran either.

Anyone has a patch that we could apply to the Mumps (4.10.0) source to work around this?

svigerske commented 4 years ago

I hear that adding the Fortran compiler flag -fallow-argument-mismatch (GCC >= 10 only) or -std=legacy (implies -fallow-argument-mismatch with GCC 10) may help to work around this (that is, it seems to help with a error on Mumps 5 source).

With the build system, use ADD_FCFLAGS=-fallow-argument-mismatch as argument to configure.

jbaayen commented 4 years ago

I can confirm that with FFLAGS=-fallow-argument-mismatch, the package compiles.

AllenShi666 commented 4 years ago

I can confirm that with FFLAGS=-fallow-argument-mismatch, the package compiles.

Hi, I am currently using Mingw64 for windows to compile Ipopt and experiencing the same issue with Mumps, this happens whenever I use the make command. I was wondering where exactly do I add the FFLAGS=-fallow-argument-mismatch ? Is it in the makefile? Thank you in advance.

svigerske commented 4 years ago

I would suggest to rather set ADD_FCFLAGS=-fallow-argument-mismatch. This can be given as argument to configure.

AllenShi666 commented 4 years ago

I would suggest to rather set ADD_FCFLAGS=-fallow-argument-mismatch. This can be given as argument to configure.

Hi, I tried to add this line ADD_FCFLAGS=-fallow-argument-mismatch into configure file using notepad++, that doesn't work for me. I also try ./configure ADD_FCFLAGS=-fallow-argument-mismatch on the command line, that doesn't work either. Am I doing it the correctly? If not, could you be more specific as to where to add/use this line ADD_FCFLAGS=-fallow-argument-mismatch. Thank you!

svigerske commented 4 years ago

Hmm, maybe try ./configure ADD_FCFLAGS=-std=legacy instead. And please provide some logs, etc, from calling make with V=1. This should show the compiler call, including all the flags that are used. In principal, you could also edit Makefile after configure finished and add the flags into there somewhere.

AllenShi666 commented 4 years ago

Thanks for your advice. The error was gone by adding FFLAGS=-fallow-argument-mismatchto the configure file.

Ishanki commented 4 years ago

Hi, I can confirm this is an issue. I used the flag ADD_FCFLAGS=-fallow-argument-mismatch which worked, i.e. ./configure ADD_FCFLAGS=-fallow-argument-mismatch

svigerske commented 4 years ago

I would think that this should be fixed in the MUMPS source, but with the new MUMPS 5.3.3 they only added a note to use the same workaround to their INSTALL file:

* gfortran-10
  -----------

For MUMPS to compile with gfortran-10, the option '-fallow-argument-mismatch'
should be added to OPTF in your Makefile.inc