[Ipopt-tickets] [Ipopt] #232: Problem in compiling matlab interface on MacOSX Maverick
Ipopt
coin-trac at coin-or.org
Wed Apr 23 21:53:40 EDT 2014
#232: Problem in compiling matlab interface on MacOSX Maverick
---------------------+------------------------
Reporter: ricwtk | Owner: ipopt-team
Type: defect | Status: new
Priority: high | Component: Ipopt
Version: 3.11 | Severity: critical
Resolution: | Keywords:
---------------------+------------------------
Comment (by kelman):
Where did you get gfortran from, and what version is it? Amazingly,
Mathworks still recommends Gfortran 4.3
http://www.mathworks.com/support/compilers/R2013b/index.html?sec=maci64
which is getting rather old now.
How large are your problems that are causing the downloaded mex file to
crash? There were some memory allocation bugs in the Matlab interface on
large problems that we fixed, but I can't recall whether those fixes were
before or after the posted mex file was compiled. There were also some
exception handling issues due to the compilers and static linking I used
at the time.
I'm guessing you updated both your OS and Matlab installations since you
compiled the previous mex file "one year ago or so," so it doesn't
surprise me at all that Matlab is crashing with it.
I just went through my email and found the last conversation I had about
the OS X exception handling issues and the special compilation approach I
used to get around it:
OSX was a little tricky because I needed to mix compilers, statically
linking to gfortran libraries from the GNU installation, but dynamically
linking to C++ from Xcode, and using the framework vecLib versions of Blas
and Lapack.
So first I created the build directory with a share subdirectory, and
copied Ipopt/contrib/MatlabInterface/MatlabInterface.site to
build/share/config.site.
I ran configure as
../configure --enable-matlab-ma57 CC=gcc --enable-matlab-static \
--with-blas='-framework vecLib' --with-lapack='-framework vecLib'
Then in build/Ipopt/contrib/MatlabInterface/src/Makefile, on the LDFLAGS
line, comment out
-static-libgcc -static-libstdc++
On LIBS = <...> line, delete -lgcc_eh and
-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2/../../..
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/232#comment:7>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list