[Ipopt] Problem running Ipopt matlab interface

Tony Kelman kelman at berkeley.edu
Mon Jul 30 01:10:26 EDT 2012


In case someone hasn't already responded off-list, the below lines seem to 
indicate /usr/site-local/bin/gfortran-4.3 is not a working compiler. 
Configure tries to compile a bunch of small example files with different 
options to determine various things about the compiler, and in this case it 
determined the compiler isn't working! The example files aren't much more 
complicated than hello world. Have a look through config.log (the top-level 
one in build, the one under build/Ipopt, and the one under 
build/ThirdParty/Blas) to see more detailed error output, or try using 
/usr/site-local/bin/gfortran-4.3 manually on a few Fortran hello world 
examples to see what happens.

> checking whether /usr/site-local/bin/gfortran-4.3 accepts -g... no
> configure: WARNING: The flags FFLAGS="" do not work.  I will now just
try '-O', but you might want to set FFLAGS manually.
> configure: WARNING: This value for FFLAGS does not work.  I will
continue with empty FFLAGS, but you might want to set FFLAGS manually.
> configure: Fortran compiler options are:
> checking how to get verbose linking output from
/usr/site-local/bin/gfortran-4.3... configure: WARNING: compilation
failed
> checking for Fortran libraries of /usr/site-local/bin/gfortran-4.3...
> checking for dummy main to link with Fortran libraries... none
> checking for Fortran name-mangling scheme... configure: error: cannot
compile a simple Fortran program
> See `config.log' for more details.
> configure: error: /bin/sh '../../../ThirdParty/Blas/configure' failed
for ThirdParty/Blas

Another thing you can try with the mex file you got from gfortran 4.6 is
export LD_PRELOAD=/usr/lib64/gcc/x86_64-suse-linux/4.6/libgfortran.so
although you might need a more specific .so.3 or something. Inside Matlab 
you can check which libraries ipopt.mexa64 is linking against by calling
!ldd /homes/numerik/paul/lib/Ipopt/lib64/coin/ipopt.mexa64
Compare this to the ldd results outside of Matlab to see just how many 
libraries Matlab is redirecting to its own versions.




More information about the Ipopt mailing list