[Ipopt-tickets] [Ipopt] #186: Preprocessor flag to use long ints in MA57 interface
Ipopt
coin-trac at coin-or.org
Thu Sep 20 22:03:01 EDT 2012
#186: Preprocessor flag to use long ints in MA57 interface
------------------------+------------------------
Reporter: guest | Owner: ipopt-team
Type: enhancement | Status: new
Priority: normal | Component: Ipopt
Version: 3.10 | Severity: normal
Keywords: MA57 Matlab |
------------------------+------------------------
Several Ipopt users have encountered an issue with shared-library
namespace collisions using the MA57 solver in the Matlab mex interface,
since Matlab includes its own version of MA57 in the file
libmwma57.{so,dll,dylib}. A related discussion (regarding BLAS rather than
MA57, but similar issue) is http://list.coin-
or.org/pipermail/ipopt/2011-March/002376.html. On 64-bit platforms, the
Matlab implementation of MA57 uses a long int API which is incompatible
with the interface Ipopt normally uses. The attached patch provides the
option for users to add a preprocessor flag -DFUNNY_MA57_FINT during
configure and link to -lmwma57 instead of the MA57 routines in libcoinhsl.
The name was chosen based on a similar flag that's available in
IpLapack.cpp.
A few things could be tweaked - instead of adding Max(long, long) as a
#define, we could add it to IpUtils.hpp. And since ipfint is a typedef
rather than a #define in IpTypes.hpp, the lines in
IpMa57TSolverInterface.hpp where I save and reuse ipfintold may not be
necessary.
This could also allow users who have Matlab but not the MA57 source code
to use Matlab's implementation of MA57 as a solver, either by pointing the
linear solver loader to libmwma57 (can the LSL library name be modified by
a runtime option?) or by manually modifying the CoinHSL headers to set
COINHSL_HAS_MA57 to 1. May be worth asking either HSL or Mathworks if mex
files dynamically linked against libmwma57 but not including any compiled
MA57 source code can be freely distributed...
(This is Tony Kelman from UC Berkeley, it took me a while to realize there
is a guest Trac account)
--
Ticket URL: <https://projects.coin-or.org/ticket/186>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list