[Ipopt] How to install Ipopt matlabinterface on 64bit Linux machine?

Andreas Waechter awaechter.iems at gmail.com
Mon Dec 19 12:20:37 EST 2011


Hi,

Please follow the instructions at 
https://projects.coin-or.org/Ipopt/wiki/MatlabInterface.  In particular, 
make sure you include the '-fPIC' flag in the ADD_* arguments to configure.

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.

Andreas Waechter
Associate Professor
Department of Industrial Engineering and Management Sciences
McCormick School of Engineering
Northwestern University
Evanston, IL 60208
USA


On 12/19/2011 04:49 AM, Lianghai Wu wrote:
> Dear Sir/Madam
>
> 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. Could you help me figure out what I did wrong in the installation process?
>
> Best,
>
> Lianghai Wu
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> make install
> /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
> -> mexopts.sh sourced from directory (DIR = $HOME/.matlab/$REL_VERSION)
>    FILE = /users/jz7/.matlab/R2010b/mexopts.sh
> ----------------------------------------------------------------
> ->    MATLAB                = /gpfs/runtime/opt/matlab/R2010b
> ->    CC                    = mpic++
> ->    CC flags:
>          CFLAGS             = -ansi -D_GNU_SOURCE  -fexceptions -fPIC 
> -fno-omit-frame-pointer -pthread
>          CDEBUGFLAGS        = -g
>          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
>          CLIBS              = 
> -Wl,-rpath-link,/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 
> -L/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 -lmx -lmex -lmat -lm 
> -lstdc++
>          arguments          =  -DMX_COMPAT_32
> ->    CXX                   = mpic++
> ->    CXX flags:
>          CXXFLAGS           = -ansi -D_GNU_SOURCE -fPIC 
> -fno-omit-frame-pointer -pthread
>          CXXDEBUGFLAGS      = -g
>          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
>          CXXLIBS            = 
> -Wl,-rpath-link,/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 
> -L/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 -lmx -lmex -lmat -lm
>          arguments          =  -DMX_COMPAT_32
> ->    FC                    = g95
> ->    FC flags:
>          FFLAGS             = -fexceptions -fPIC -fno-omit-frame-pointer
>          FDEBUGFLAGS        = -g
>          FOPTIMFLAGS        = -O
>          FLIBS              = 
> -Wl,-rpath-link,/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 
> -L/gpfs/runtime/opt/matlab/R2010b/bin/glnxa64 -lmx -lmex -lmat -lm
>          arguments          =  -DMX_COMPAT_32
> ->    LD                    = mpic++
> ->    Link flags:
>          LDFLAGS            = -pthread -shared 
> -Wl,--version-script,/gpfs/runtime/opt/matlab/R2010b/extern/lib/glnxa64/mexFunction.map 
> -Wl,--no-undefined
>          LDDEBUGFLAGS       = -g
>          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
>          LDEXTENSION        = .mexa64
>          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
> ->    LDCXX                 =
> ->    Link flags:
>          LDCXXFLAGS         =
>          LDCXXDEBUGFLAGS    =
>          LDCXXOPTIMFLAGS    =
>          LDCXXEXTENSION     =
>          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
> ----------------------------------------------------------------
>
> -> 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
>
> /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
> matlabexception.o: could not read symbols: Bad value
> collect2: ld returned 1 exit status
>
>     mex: link of ' "ipopt.mexa64"' failed.
>
> -- 
> Lianghai Wu
> Room 708, Yi-fu Science & Education Building
> Lab. of Image Information Progressing
> School of Computer and Information
> Hefei University of Technology
> P.O. BOX 98, No.193, Tunxi Road
> Hefei, Anhui Province, 230009
> P. R. China
> Email: wulianghai1227 at gmail.com <mailto:wulianghai1227 at gmail.com>
> Phone: +86-182 5519 1763 (Mobile)
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20111219/21b0a597/attachment.html>


More information about the Ipopt mailing list