Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails on Fedora 32 #4

Closed
jbaayen opened this issue May 1, 2020 · 10 comments
Closed

Compilation fails on Fedora 32 #4

jbaayen opened this issue May 1, 2020 · 10 comments

Comments

@jbaayen
Copy link

jbaayen commented May 1, 2020

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
Copy link
Contributor

svigerske commented May 1, 2020

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
Copy link
Contributor

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
Copy link
Author

jbaayen commented May 4, 2020

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

@AllenShi666
Copy link

AllenShi666 commented Jun 1, 2020

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
Copy link
Contributor

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

@AllenShi666
Copy link

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
Copy link
Contributor

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
Copy link

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

@Ishanki
Copy link

Ishanki commented Jun 15, 2020

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
Copy link
Contributor

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

svigerske added a commit that referenced this issue Jun 16, 2020
- this should imply -fallow-argument-mismatch with GCC 10
cfe316 added a commit to cfe316/build_pyoptsparse that referenced this issue Mar 8, 2022
-fallow-argument-mismatch is added to address issues building with GCC
>= 10, as recommended in the thread here coin-or/coinbrew#47
and/or here: coin-or-tools/ThirdParty-Mumps#4
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants