[Ipopt] Matlab Interface Crash
Siddharth Goyal
siddelec at gmail.com
Mon Jan 9 14:42:03 EST 2012
Hi,
I am trying to install ipopt and use it with matlab. I have used the instructions mentioned on following webpage.
https://projects.coin-or.org/Ipopt/wiki/Ipopt_on_Mac_OS_X
I have used snow leopard,HSL MA 57,native OS X with 64 bit matlab 2011.
When I run the given examples in ipopt, matlab crashes. I suppose it is because of mex file.
Let me give you more details about the makefile in src folder.
Originally LIBS line in the makefile had
LIBS = -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -framework vecLib -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.. -lgfortranbegin -lgfortran -lSystem -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -framework vecLib -framework vecLib -lm -ldl
I changed it to
LIBS = -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -lm -ldl
when I make the file, the result on the terminal is
-> mexopts.sh sourced from directory (DIR = $PREF_DIR)
FILE = /Users/siddharthgoyal/.matlab/R2011b/mexopts.sh
----------------------------------------------------------------
-> MATLAB = /Applications/MATLAB_R2011b.app
-> CC = g++
-> CC flags:
CFLAGS = -fno-common -no-cpp-precomp -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5 -fexceptions
CDEBUGFLAGS = -g
COPTIMFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE
CLIBS = -L/Applications/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++
arguments = -DMX_COMPAT_32
-> CXX = g++
-> CXX flags:
CXXFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5
CXXDEBUGFLAGS = -g
CXXOPTIMFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE
CXXLIBS = -L/Applications/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++
arguments = -DMX_COMPAT_32
-> FC = gfortran
-> FC flags:
FFLAGS = -fexceptions -m64 -fbackslash
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O
FLIBS = -L/Applications/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -L -lgfortran -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -lgfortranbegin
arguments = -DMX_COMPAT_32
-> LD = g++
-> Link flags:
LDFLAGS = -Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,/Applications/MATLAB_R2011b.app/extern/lib/maci64/mexFunction.map -framework vecLib
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE
LDEXTENSION = .mexmaci64
arguments = -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -lm -ldl
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments = -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -lm -ldl
----------------------------------------------------------------
-> g++ -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE -Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,/Applications/MATLAB_R2011b.app/extern/lib/maci64/mexFunction.map -framework vecLib -o "ipopt.mexmaci64" "matlabexception.o" "matlabfunctionhandle.o" "matlabjournal.o" "iterate.o" "ipoptoptions.o" "options.o" "sparsematrix.o" "callbackfunctions.o" "matlabinfo.o" "matlabprogram.o" "ipopt.o" -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -lm -ldl -L/Applications/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++
Please let me know if this is a successful compilation. If yes, why does the matlab crash. If not, how can it be fixed.
Thanks
Siddharth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20120109/1f8ce33e/attachment.html>
More information about the Ipopt
mailing list