[Ipopt] Compiling with Pardiso or Mumps

Stefan Vigerske stefan at vigerske.de
Sat May 3 11:46:16 EDT 2008


Hi,

> I am looking to compile Ipopt on a windows platform using Visual Studio 8,  I would like to leave out the HSL routines and instead use Mumps/pardiso which do not need $pecial licences.  I know there are no ready solutions and have no problems trying to find one myself.  Has anyone thought about the issues? Do I need to modify any Ipopt code where the linear solvers are invoked?  Any clues on what functions need to be modified, if any? Is there any documentation that is available? 
> 
> Someone wrote that I can call Pardiso at run time under windows.  Once again would appreciate  any pointers on how this can be done

For compling Ipopt with a Pardiso library present (at build time) it 
should be sufficient to add 
src/Algorithm/LinearSolvers/IpPardisoSolverInterface.cpp to the list of 
files to compile, to add the compiler flag -DHAVE_PARDISO, and to add a 
linking flag that points to your Pardiso library.
You can have a look at IpAlgBuilder.cpp:291 to see under which 
conditions the Pardiso interface is used.

Similar, for compiling Ipopt with a Mumps library present (at build 
time) it should be sufficient to add
src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp to the list of 
files to compile, to add the compiler flag -DHAVE_MUMPS, and to provide 
a Mumps library (incl. Blas).
However, note that you need a Fortran90 compiler to create a Mumps library.

Further, in both cases you want to take the HSL interfaces out, i.e., 
remove the files src/Algorithm/LinearSolvers/Ip{Ma??,Mc19}*
from the list of files to compile and remove the -DHAVE_MA27, 
-DHAVE_MC19... flags (whatever is defined by default).

To compile Ipopt without any linear solver and enabling the dynamic 
linker of an HSL or Pardiso library, you also take out the -DHAVE_... 
flags, add a -DHAVE_LINEARSOLVERLOADER, add the c-files from the 
src/contrib/LinearSolverLoader directory, and the Pardiso interface 
src/Algorithm/LinearSolvers/IpPardisoSolverInterface.cpp.
Ipopt then tries to load a dll with the linear solver routines at 
runtime, either libhsl.dll or libpardiso.dll (depending on the setting 
of the linear_solver option). With Pardiso, this should be most 
convenient, since you should be able to use the dll that the
Pardiso people provide.

I should mention that I have not tried these things, I'm still reluctant 
to start the point-and-click Visual-Studio-adventure, and I think 
Andreas is so too ;-). Hence, it's unlikely that there will be a full 
documentation available soon. However, if it works for you, then you are 
welcome to document your steps at the Ipopt wiki at 
https://projects.coin-or.org/Ipopt :-).

Best,
Stefan


More information about the Ipopt mailing list