[Ipopt] problem using the Matlab interface with limited-memory update option
Ian Washington
washinid at mcmaster.ca
Thu Oct 4 14:20:40 EDT 2012
Much appreciated Tony,
Suggestion number 4.) worked like a charm and I was able to use Atlas
blas/lapack.
Thanks,
Ian.
On 10/04/2012 12:46 AM, Tony Kelman wrote:
> Hi Ian,
>
> Don't know if anyone has responded yet off-list. The reason for the
> crash is as follows:
>
> If you use shared-library versions of BLAS or Lapack (such as from the
> Ubuntu packages, or the Atlas libraries you were originally trying to
> use), Matlab will override those with its own (incompatible on 64-bit)
> versions. The BLAS incompatibility frequently causes crashes using any
> linear solver other than MA27. The Lapack incompatibility causes
> crashes using the limited-memory Hessian option.
>
> A few suggestions for you:
>
> 1. Did you try the precompiled Matlab interface binaries at
> http://www.coin-or.org/download/binary/Ipopt/Ipopt-trunk2112-linux64mac64win32win64-matlabmexfiles.zip
> ? If you're okay with using the linear solver MUMPS, these should be
> sufficient.
> 2. If you have BLAS and Lapack packages installed on your Ubuntu
> machine, Ipopt configure will pick those up and use them instead of
> the downloaded reference versions under the ThirdParty folder. You can
> force Ipopt to use the reference versions by specifying
> --with-blas=BUILD and --with-lapack=BUILD in the configure call.
> 3. If you add the flag -DFUNNY_LAPACK_FINT to ADD_CXXFLAGS, Ipopt will
> use a Lapack API that should be compatible with Matlab's version.
> 4. You can also switch the versions of BLAS and Lapack that Matlab
> uses by setting the environment variables BLAS_VERSION and
> LAPACK_VERSION to paths to the respective shared libraries.
>
> -Tony
>
>
> -----Original Message----- Date: Mon, 01 Oct 2012 20:53:24 -0400
> From: Ian Washington <washinid at mcmaster.ca>
> To: ipopt at list.coin-or.org
> Subject: Re: [Ipopt] problem using the Matlab interface with
> limited-memory update option
>
> Hi All,
>
> I tried using static libraries with the libcoin blas/lapack with gcc 4.3
> (officially supported by matlab R2010b) and everything again builds ok;
> however, this doesn't solve the problem when the limited memory option
> is switched on.
>
> ./configure --prefix=/opt/Ipopt-3.10.2/install_x64_mat \
> --with-matlab-home="/opt/MATLAB/R2010b" \
> CC=gcc-4.3 CXX=g++-4.3 F77=gfortran-4.3 \
> --disable-shared \
> ADD_CXXFLAGS="-ansi -D_GNU_SOURCE -fexceptions -fPIC
> -fno-omit-frame-pointer -pthread" \
> ADD_CFLAGS="-ansi -D_GNU_SOURCE -fexceptions -fPIC
> -fno-omit-frame-pointer -pthread" \
> ADD_FFLAGS="-fexceptions -fPIC -fno-omit-frame-pointer
> -pthread"
>
> Anybody have any suggestions ?
>
> Thanks,
> Ian.
>
>
>
> On 10/01/2012 06:55 PM, Ian Washington wrote:
>> Hi Ipopt Users,
>>
>> I am having some problems with the matlab interface (the one in
>> /Ipopt/contrib/MatlabInterface). The issue is whenever I use the
>> limited memory bfgs update matlab crashes (without a crash report),
>> i.e., it just closes.
>>
>> I am using Ipopt 3.10.2 on Ubuntu 10.04 64bit with matlab R2010b
>> 64bit. I compiled Ipopt using gcc 4.4 with the following specs (and
>> set PATH and LD_LIBRARY_PATH appropriately),
>>
>> ./configure --prefix=/opt/Ipopt-3.10.2/install_x64_mat \
>> --with-blas="/usr/lib/atlas/libblas.so.3gf.0" \
>> --with-lapack="/usr/lib/atlas/liblapack.so.3gf.0" \
>> --with-matlab-home="/opt/MATLAB/R2010b" \
>> CC=gcc-4.4 CXX=g++-4.4 F77=gfortran-4.4 \
>> ADD_CXXFLAGS="-ansi -D_GNU_SOURCE -fexceptions -fPIC
>> -fno-omit-frame-pointer -pthread" \
>> ADD_CFLAGS="-ansi -D_GNU_SOURCE -fexceptions -fPIC
>> -fno-omit-frame-pointer -pthread" \
>> ADD_FFLAGS="-fexceptions -fPIC -fno-omit-frame-pointer
>> -pthread"
>>
>> I also compiled the 64bit mex file using auto generated makefile (with
>> no problems) and placed it on the matlab path. Running the provided
>> test examples 'examplehs038.m', 'examplehs071.m', works fine; however,
>> when I try 'examplehs051.m', which uses the limited-memory update,
>> matlab immediately crashes.
>>
>> I suspect I didn't configure the compiler settings properly.
>>
>> If anyone has had the same issue, some advice would be much appreciated.
>>
>> Thanks,
>>
>> Ian.
>>
>>
>>
>>
>
More information about the Ipopt
mailing list