<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
Please follow the instructions at
<a class="moz-txt-link-freetext" href="https://projects.coin-or.org/Ipopt/wiki/MatlabInterface">https://projects.coin-or.org/Ipopt/wiki/MatlabInterface</a>. In
particular, make sure you include the '-fPIC' flag in the ADD_*
arguments to configure.<br>
<br>
Also, the Ipopt matlab interface does not run in parallel using
MPI. There is no point in using MPI compilers. You need to use the
compiler that is compatible with your matlab version.<br>
<br>
Andreas Waechter<br>
Associate Professor<br>
Department of Industrial Engineering and Management Sciences<br>
McCormick School of Engineering<br>
Northwestern University<br>
Evanston, IL 60208<br>
USA<br>
<br>
<br>
On 12/19/2011 04:49 AM, Lianghai Wu wrote:
<blockquote
cite="mid:CANLHrgd4EaDE-sidOs3kU1HuZWJCHN4jFzJ1CND=2L_XaQz=Xg@mail.gmail.com"
type="cite"><font>Dear Sir/Madam<br>
<br>
</font>
<pre><font>I met problems in installing IPOPT (latest version) Matlab interface on my 64bit Linux Cluster.
First I install IPOPT correctly following the instruction(At least ,it seems so.).And then cd to "..../Ipopt/contrib/MatlabInterface/src" ,"make intall"
then follows the below information</font>. Could you help me figure out what I did wrong in the installation process?
Best,
Lianghai Wu
</pre>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
make install<br>
/gpfs/runtime/opt/matlab/R2010b/bin/mex -v -cxx -O CC="mpic++"
CXX="mpic++" LD="mpic++" COPTIMFLAGS="-O3 -pipe -DNDEBUG
-pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall
-Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas
-Wno-long-long -DIPOPT_BUILD -DMATLAB_MEXFILE "
CXXOPTIMFLAGS="-O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses
-Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
-Wconversion -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD
-DMATLAB_MEXFILE " LDOPTIMFLAGS="-O3 -pipe -DNDEBUG
-pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall
-Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas
-Wno-long-long -DIPOPT_BUILD -DMATLAB_MEXFILE -Wl,--rpath
-Wl,/users/jz7/data/wlh20111024/CoinIpopt/lib"
`PKG_CONFIG_PATH=/users/jz7/data/wlh20111024/CoinIpopt/lib/pkgconfig:/users/jz7/data/wlh20111024/CoinIpopt/share/pkgconfig:/gpfs/runtime/opt/gcc/4.5.1/lib/pkgconfig:/gpfs/runtime/core/5.4-updates/lib/pkgconfig
/usr/bin/pkg-config --libs ipopt` -output ipopt.mexa64
matlabexception.o matlabfunctionhandle.o matlabjournal.o iterate.o
ipoptoptions.o options.o sparsematrix.o callbackfunctions.o
matlabinfo.o matlabprogram.o ipopt.o<br>
-> mexopts.sh sourced from directory (DIR =
$HOME/.matlab/$REL_VERSION)<br>
FILE = /users/jz7/.matlab/R2010b/mexopts.sh<br>
----------------------------------------------------------------<br>
-> MATLAB = /gpfs/runtime/opt/matlab/R2010b<br>
-> CC = mpic++<br>
-> CC flags:<br>
CFLAGS = -ansi -D_GNU_SOURCE -fexceptions
-fPIC -fno-omit-frame-pointer -pthread<br>
CDEBUGFLAGS = -g<br>
COPTIMFLAGS = -O3 -pipe -DNDEBUG -pedantic-errors
-Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith
-Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long
-DIPOPT_BUILD -DMATLAB_MEXFILE <br>
CLIBS =
-Wl,-rpath-link,/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64
-L/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 -lmx -lmex -lmat -lm
-lstdc++<br>
arguments = -DMX_COMPAT_32<br>
-> CXX = mpic++<br>
-> CXX flags:<br>
CXXFLAGS = -ansi -D_GNU_SOURCE -fPIC
-fno-omit-frame-pointer -pthread<br>
CXXDEBUGFLAGS = -g<br>
CXXOPTIMFLAGS = -O3 -pipe -DNDEBUG -pedantic-errors
-Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith
-Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long
-DIPOPT_BUILD -DMATLAB_MEXFILE <br>
CXXLIBS =
-Wl,-rpath-link,/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64
-L/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 -lmx -lmex -lmat -lm<br>
arguments = -DMX_COMPAT_32<br>
-> FC = g95<br>
-> FC flags:<br>
FFLAGS = -fexceptions -fPIC
-fno-omit-frame-pointer<br>
FDEBUGFLAGS = -g<br>
FOPTIMFLAGS = -O<br>
FLIBS =
-Wl,-rpath-link,/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64
-L/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 -lmx -lmex -lmat -lm<br>
arguments = -DMX_COMPAT_32<br>
-> LD = mpic++<br>
-> Link flags:<br>
LDFLAGS = -pthread -shared
-Wl,--version-script,/gpfs/runtime/opt/matlab/R2010b/extern/lib/glnxa64/mexFunction.map
-Wl,--no-undefined<br>
LDDEBUGFLAGS = -g<br>
LDOPTIMFLAGS = -O3 -pipe -DNDEBUG -pedantic-errors
-Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith
-Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long
-DIPOPT_BUILD -DMATLAB_MEXFILE -Wl,--rpath
-Wl,/users/jz7/data/wlh20111024/CoinIpopt/lib<br>
LDEXTENSION = .mexa64<br>
arguments =
-L/users/jz7/data/wlh20111024/CoinIpopt/lib
-L/gpfs/runtime/opt/openmpi/1.4.3/lib
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../x86_64-unknown-linux-gnu/lib
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../..
-lipopt -lcoinlapack -lcoinblas -lmpi_f77 -lmpi -lopen-rte
-lopen-pal -ldl -lnsl -lutil -lgfortran -lm -lgcc_s -lpthread<br>
-> LDCXX = <br>
-> Link flags:<br>
LDCXXFLAGS = <br>
LDCXXDEBUGFLAGS = <br>
LDCXXOPTIMFLAGS = <br>
LDCXXEXTENSION = <br>
arguments =
-L/users/jz7/data/wlh20111024/CoinIpopt/lib
-L/gpfs/runtime/opt/openmpi/1.4.3/lib
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../x86_64-unknown-linux-gnu/lib
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../..
-lipopt -lcoinlapack -lcoinblas -lmpi_f77 -lmpi -lopen-rte
-lopen-pal -ldl -lnsl -lutil -lgfortran -lm -lgcc_s -lpthread<br>
----------------------------------------------------------------<br>
<br>
-> mpic++ -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses
-Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
-Wconversion -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD
-DMATLAB_MEXFILE -Wl,--rpath
-Wl,/users/jz7/data/wlh20111024/CoinIpopt/lib -pthread -shared
-Wl,--version-script,/gpfs/runtime/opt/matlab/R2010b/extern/lib/glnxa64/mexFunction.map
-Wl,--no-undefined -o "ipopt.mexa64" "matlabexception.o"
"matlabfunctionhandle.o" "matlabjournal.o" "iterate.o"
"ipoptoptions.o" "options.o" "sparsematrix.o"
"callbackfunctions.o" "matlabinfo.o" "matlabprogram.o"
"ipopt.o" -L/users/jz7/data/wlh20111024/CoinIpopt/lib
-L/gpfs/runtime/opt/openmpi/1.4.3/lib
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../x86_64-unknown-linux-gnu/lib
-L/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../..
-lipopt -lcoinlapack -lcoinblas -lmpi_f77 -lmpi -lopen-rte
-lopen-pal -ldl -lnsl -lutil -lgfortran -lm -lgcc_s -lpthread
-Wl,-rpath-link,/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64
-L/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 -lmx -lmex -lmat -lm<br>
<br>
/gpfs/runtime/opt/gcc/4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../x86_64-unknown-linux-gnu/bin/ld:
matlabexception.o: relocation R_X86_64_32 against `.rodata.str1.8'
can not be used when making a shared object; recompile with -fPIC<br>
matlabexception.o: could not read symbols: Bad value<br>
collect2: ld returned 1 exit status<br>
<br>
mex: link of ' "ipopt.mexa64"' failed.<br clear="all">
<br>
-- <br>
Lianghai Wu <br>
Room 708, Yi-fu Science & Education Building<br>
Lab. of Image Information Progressing<br>
School of Computer and Information<br>
Hefei University of Technology<br>
P.O. BOX 98, No.193, Tunxi Road<br>
Hefei, Anhui Province, 230009<br>
P. R. China<br>
Email: <a moz-do-not-send="true"
href="mailto:wulianghai1227@gmail.com" target="_blank">wulianghai1227@gmail.com</a><br>
Phone: +86-182 5519 1763 (Mobile)<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Ipopt mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/ipopt">http://list.coin-or.org/mailman/listinfo/ipopt</a>
</pre>
</blockquote>
<br>
</body>
</html>