[Ipopt] Maybe an error in the MKL version of the Pardiso interface?

Damien damien at khubla.com
Sun May 25 15:52:18 EDT 2014


Hi Folks,

I'm in the process of porting our Ipopt build over to Intel's MKL 
Pardiso.  I started getting crashes because the PT_ and IPARM_ arrays 
weren't being initialised.  I think there's an error in the code that 
sets up the solver if it's the MKL version (in 
IpPardisoSolverInterface.cpp)  There's a call to PARDISOINIT_FUNC around 
lines 400 - 405, which is defined earlier in the file with the comment:

// The following is a fix to allow linking with Pardiso library under Windows

In the Intel MKL version of PARDISO there isn't a 6-parameter PARDISO 
call that's described in the docs.  It passes in the linker though, so 
it must be exposed by the MKL library (possibly by mistake?).  If you 
call it though it takes out everything.  In the Intel version the 
initialisation is just performed as part of the first PARDISO call 
(typically PHASE = 11).

This can be fixed by wrapping the the call to PARDISOINIT_FUNC in a 
#ifdef HAVE_PARDISO_MKL check and initialising the PT_ and IPARM_ arrays:

     // Call Pardiso's initialization routine
     IPARM_[0] = 0;  // Tell it to fill IPARM with default values(?)
#ifdef HAVE_PARDISO_MKL  //MKL check
     for (int i = 0; i < 64; i++)
     {
        IPARM_[i] = 0;
        PT_[i] = 0;
     }
#else
#ifndef HAVE_PARDISO_OLDINTERFACE
     ipfint ERROR = 0;
     ipfint SOLVER = 0; // initialize only direct solver

     PARDISOINIT_FUNC(PT_, &MTYPE_, &SOLVER, IPARM_, DPARM_, &ERROR);
#else
     PARDISOINIT_FUNC(PT_, &MTYPE_, IPARM_);
#endif

#endif  //end MKL check

This runs happily on my machine in 32 and 64-bit.  Do you want this as a 
patch (or have I messed something else up in the compile with defines, 
and this shouldn't be necessary?)

Cheers,

Damien





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140525/4b3aff90/attachment.html>


More information about the Ipopt mailing list