[Ipopt] missing -lmpi pkg-config with mumps

Andreas Waechter awaechter.iems at gmail.com
Sun Feb 26 15:01:24 EST 2012


Hi Ashutosh,


On 02/26/2012 01:24 PM, Ashutosh Mahajan wrote:
>
> Sorry, my bad, I didn't read nm output correctly. There was some other library
> that needed mpi. Thanks for the prompt clarification.

I believe you have to be careful if you want to link MUMPS code in a 
program that uses MPI - at least that was true when I was involved in a 
project a few years ago where this was the case....

The problem is that MUMPS actually wants MPI, but only for the parallel 
version (which we do not use in Ipopt).  However, to make this work, the 
MUMPS package includes a dummy version of some of the MPI calls, and 
when you compile Ipopt, those will be linked to.  If you have Ipopt in a 
parallel program that uses MPI, you would want to use the true MPI 
functions, though, and not the dummy versions.  On the other hand, MUMPS 
will not work with the true MPI functions.

So, what you might have to do is to replace all MPI_* called in the 
MUMPS code with MYMPI_* (or whatever you want) and make the same changes 
to the code in MUMPS' libseq subdirectory...

To know about this potential pitfall might save you a few days of 
frustrating debugging...

Regards,

Andreas




More information about the Ipopt mailing list