[Ipopt-tickets] [Ipopt] #253: Pardiso Loader issue with Intel MKL's Pardiso

Ipopt coin-trac at coin-or.org
Sun Jan 4 11:37:43 EST 2015


#253: Pardiso Loader issue with Intel MKL's Pardiso
------------------------------+------------------------
Reporter:  FabiF1             |      Owner:  ipopt-team
    Type:  defect             |     Status:  new
Priority:  normal             |  Component:  Ipopt
 Version:  3.11               |   Severity:  normal
Keywords:  Intel MKL Pardiso  |
------------------------------+------------------------
 Dear all,

 I am using Ipopt 3.11.9 from sources on a Windows machine. I am building
 it together with the linear solver Pardiso coming from the Intel MKL 11.2
 update 1.

 I may have found a bug in the Pardiso loader that would cause exceptions
 whenever Ipopt tries to invoke it. I am proposing a fix hereafter which
 has enabled me to successfully use MKL's Pardiso to solve optimization
 problems.

 The main issue comes from the fact that in the Pardiso loader C-code, the
 argument IPARM comes after SOLVER. A bit of digging into the MKL reference
 documentation led me to believe that their version expects IPARM to come
 before SOLVER. Another minor issue appeared with an uninitialized pointer
 *E. Hereafter details of my fix.

 '''PardisoLoader.c''' line 42-46 modified to become:
 {{{
 typedef void (*pardisoinit_new_t)(void* PT, const ipfint* MTYPE,
                               ipfint* IPARM,
                               const ipfint * SOLVER,
                               double* DPARM,
                               ipfint* E);
 }}}

 '''PardisoLoader.c''' line 62-67 modified to become:
 {{{
 void wrap_old_pardisoinit(void* PT, const ipfint* MTYPE, ipfint* IPARM,
 const ipfint* SOLVER, double* DPARM, ipfint* E) {
    if (func_pardisoinit == NULL)
       LSL_lateParadisoLibLoad();
    func_pardisoinit(PT, MTYPE, IPARM);
    // *E = 0; // Fab Hack as uninitialized pointer
 }
 }}}

 '''PardisoLoader.c''' line 88-97 modified to become:
 {{{
 void F77_FUNC(pardisoinit,PARDISOINIT)(void* PT, const ipfint* MTYPE,
                       ipfint* IPARM,
                       const ipfint* SOLVER,
                       double* DPARM,
                       ipfint* E) {
    if (func_new_pardisoinit == NULL)
       LSL_lateParadisoLibLoad();
    assert(func_new_pardisoinit != NULL);
    func_new_pardisoinit(PT, MTYPE, IPARM, SOLVER, DPARM, E);
 }
 }}}

 '''IpPardisoSolverInterface.cpp''' lines 69-73 modified to become:
 {{{
  void PARDISOINIT_FUNC(void* PT, const ipfint* MTYPE,
                         ipfint* IPARM,
                         const ipfint* SOLVER,
                         double* DPARM,
                         ipfint* ERROR);
 }}}

 '''IpPardisoSolverInterface.cpp''' line 407 modified to become:
 {{{
     PARDISOINIT_FUNC(PT_, &MTYPE_, IPARM_, &SOLVER, DPARM_, &ERROR);
 }}}

 Modifying '''IpPardisoSolverInterface.cpp''' and '''PardisoLoader.c''' has
 been enough to be able to run Ipopt, nonetheless, as I haven't tried all
 the possible Pardiso options, more might be needed.

 Feel free to let me know, shall any of my modifications be incorrect.

 Best regards, and Happy New Year 2015.
 Fab.

--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/253>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list