[Ipopt] Matlab Interfaces

Tom Vacek vacek008 at umn.edu
Thu Apr 21 10:46:21 EDT 2011


Matlab 64-bit uses 8-byte integers in all its function signatures, 
including Blas and Lapack calls.  One problem is that there is a shared 
library namespace conflict for Matlab blas and coinblas, and coinblas 
uses a 4-byte integers in its signatures.  You'll usually see an error 
like "One entry to DPOTRF, parameter 4 had illegal value."

If this is the problem you have two options.  You can pass in the 
--enable-static configure option and avoid dynamic linking.  Or you can 
modify the wrappers in Ipopt/src/LinAlg/IpBlas.cpp and IpLapack.cpp and 
ma27 to use the Matlab signature, and then link everything to Matlab 
blas.  If you go with the first option, check the binary with ldd to 
make sure it really is static linked.  I seem to remember that 
--enable-static wasn't always honored by configure.

Tom

On 04/21/2011 09:26 AM, Johannes Huber wrote:
> Hi all,
> I'd like to use the ipopt matlab interface. However Matlab crashes when
> calling an example.
>
> I configured ipopt as
> ../src/configure
> ADD_CFLAGS="-ansi -D_GNU_SOURCE  -fexceptions -fPIC -fno-omit-frame-pointer -pthread"
> ADD_CXXFLAGS="-ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread"
> ADD_FFLAGS="-fexceptions -fPIC -fno-omit-frame-pointer" --with-matlab-home='/usr/local/Matlab2009a'
>
> and used the ma27 solver and the netlib lapack and blas libs. I can run the
> scalable problems successfully, so ipopt itself works.
> Compiling the matlab interface works as well. However, when calling ipopt from
> matlab it crashes after the standard ipopt - message. The Matlab I'm using is
> Matlab 2009a (glnxa64) and the used compiler is gcc 4.2.4.
>
> Any help is appreciated.
>
> Thanks,
>      Hannes



More information about the Ipopt mailing list