[Ipopt] Problems with calling IPOPT from MATLAB

Tony Kelman kelman at berkeley.edu
Mon Dec 2 20:42:50 EST 2013

In what way are you "using ampl through MATLAB"? Are you calling an external 
executable with the system() or ! commands, or are you loading an Ampl 
library into Matlab's memory space with loadlibrary()?

I suspect you need to compile Ipopt using the compiler versions Mathworks 
requires, see http://www.mathworks.com/support/compilers/R2012a/glnxa64.html
(some people have reported success with gfortran 4.4 when 4.3 is not 

Matlab comes with its own versions of libstdc++ and libgfortran, which are 
not compatible with the versions used by the compiler you built Ipopt with.

You'll also likely have conflicts with Lapack and Blas, since Matlab also 
includes its own versions of those libraries, which aren't compatible with 
Ipopt. Configure Ipopt using --with-blas=BUILD and --with-lapack=BUILD to 
use the reference versions.

It will probably be necessary to use static libraries for Blas and Lapack, 
which you can do by configuring Ipopt using --disable-shared.


-----Original Message----- 
From: xuey at andrew.cmu.edu
Sent: Monday, December 02, 2013 4:22 PM
To: ipopt at list.coin-or.org
Subject: [Ipopt] Problems with calling IPOPT from MATLAB

Hi all,

I've been using IPOPT through ampl and using ampl through MATLAB and it
works perfect. Recently I installed IPOPT 3.11 and MATLAB 2012a. When I
tried to run IPOPT through ampl called by MATLAB, I got the following
error messages:

ipopt: /usr/local/MATLAB/R2012a/sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.15' not found (required by
ipopt: /usr/local/MATLAB/R2012a/sys/os/glnxa64/libgfortran.so.3: version
`GFORTRAN_1.4' not found (required by
ipopt: /usr/local/MATLAB/R2012a/sys/os/glnxa64/libgfortran.so.3: version
`GFORTRAN_1.4' not found (required by
ipopt: /usr/local/MATLAB/R2012a/sys/os/glnxa64/libgfortran.so.3: version
`GFORTRAN_1.4' not found (required by /usr/lib/liblapack.so.3gf)
exit code 1

And IPOPT is not called at all.

Does anyone happen to know what the problem is? Thank you very much!

Best regards,

Xue Yang
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213

Ipopt mailing list
Ipopt at list.coin-or.org

More information about the Ipopt mailing list