[Ipopt] [OS] Using MUMPS in Ipopt within OSSolverService application causesMPI errors
Stefan Vigerske
stefan at math.hu-berlin.de
Sat Jul 18 14:40:20 EDT 2015
Hi,
On 07/16/2015 01:58 PM, Florent Teichteil wrote:
> Ok, thanks!
>
> But in this case I'm not sure to understand why Ipopt attempts to deal
> with the parallel version of MUMPS by calling MPI_Init and
> MPI_Finalize when needed or by forcing the use of flag
> HAVE_MPI_INITIALIZED. Why trying to deal with something that is anyway
> not supposed to work in essence?
The HAVE_MPI_INITIALIZED flag should be set by configure automatically.
That's why you don't see a difference when you set it explicitly.
The code in between
#ifndef MUMPS_MPI_H
...
#endif
in IpMumpsSolverInterface.cpp is for people who use Ipopt with an
MPI-enabled MUMPS version inside an MPI application.
As far as I remember, the idea was that if MUMPS_MPI_H is defined, then
one has the sequential (i.e., non-MPI) version of MUMPS, thus there is
no need to call the MPI_Init function.
I thus don't understand why you get the mpi.h from Mumps libseq when
using Fedora's MPI-enabled MUMPS.
If you remove the #ifndef MUMPS_MPI_H and corresponding #endif (in two
places), will that work for you?
As the MPI_init, MPI_finalize functions don't do anything in case of
using sequential MUMPS, there may be no harm in executing this code.
> At least it is confusing for the end user, and at worst it is a bug
> because COIN-OR and especially OSSolverService should not compile in
> presence of the parallel version of MUMPS. For instance,
> OSSolverService can NOT work under Fedora with the distribution
> packages of MUMPS and COIN.
>
> Why not simply aborting the build of COIN-OR in presence of the
> parallel version of MUMPS?
It's extra effort to implement a reliable test for a parallel MUMPS, and
there may be cases where this actually works.
Stefan
>
> Anyway, thank you very much for your help.
>
> Florent
>
> 2015-07-16 13:32 GMT+02:00 Tony Kelman <kelman at berkeley.edu>:
>> Try using the serial version of Mumps, if that's available from the Fedora
>> package. Ipopt is not an MPI parallel application, and neither is
>> OSSolverService, so there's no benefit and a lot of trouble to be had from
>> trying to use the MPI version of Mumps.
>>
>> -Tony
>>
>>
>> -----Original Message----- From: Florent Teichteil
>> Sent: Thursday, July 16, 2015 6:36 AM
>> To: ipopt at list.coin-or.org ; os at list.coin-or.org
>> Subject: [OS] Using MUMPS in Ipopt within OSSolverService application
>> causesMPI errors
>>
>>
>> Hi all,
>>
>> I compiled COIN-1.8 optimization suite with MUMPS as the linear solver
>> used by Ipopt. My operating system is Fedora 22 and I use MUMPS
>> provided by Fedora packages, which I think is compiled in its parallel
>> version using MPI.
>>
>> Then, I tried to solve an NLP with OSSolverService (application
>> provided by the COIN "Optimization Service" project) using Ipopt. I
>> get the following error:
>>
>> *** The MPI_Comm_f2c() function was called before MPI_INIT was invoked.
>> *** This is disallowed by the MPI standard.
>> *** Your MPI job will now abort.
>>
>> I read many posts on COIN-OR mailing lists related to MPI issues. As
>> suggested in these posts, I compiled COIN-OR with the
>> -DHAVE_MPI_INITIALIZED flag but it doesn't change anything. These
>> posts say also that this is the user responsibility to initialize MPI
>> by calling MPI_init in the user code, but here this is not relevant
>> because I am using the OSSolverService application provided by
>> COIN-OS.
>>
>> Therefore, I think this bug is related:
>>
>> - either to Optimization Service, which should call MPI_init() and
>> MPI_finalize() in the OSSolverService program
>>
>> - or to Ipopt, which should revise the logic behind the use of MPI
>> functions. Indeed, I looked at the IpMumpsSolverInterface.cpp file
>> where I suspect some logical mistakes: the call to MPI_Init depends
>> upon the directive "#ifndef MUMPS_MPI_H" on line 59 but actually
>> MUMPS_MPI_H is already defined (at least on Fedora) from the file
>> mpi.h provided by MUMPS and that is included on line 17. Thus, the
>> lines below "#ifndef MUMPS_MPI_H" where MPI is initialized are never
>> called, causing the bug in OSSolverService.
>>
>> In either case I think this is a bug in COIN-OR's Optimization Suite
>> package because using the provided application OSSolverService with
>> Ipopt and the underlying MUMPS linear solver provided by the operating
>> system is supposed to work, isn't it?
>>
>> All the best,
>> Florent Teichteil.
>> _______________________________________________
>> OS mailing list
>> OS at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/os
> _______________________________________________
> OS mailing list
> OS at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/os
>
More information about the Ipopt
mailing list