[Ipopt] Matlab interface problem when using hessian_approximation

Peter Gehler peter.gehler at vision.ee.ethz.ch
Wed May 12 10:13:25 EDT 2010


Dear Andreas, Dear Peter

Thanks for your prompt and helpful replies. It seems indeed to be a 
mix-up between the different LAPACK versions, the currently unsupported 
version 4.3.2 of the compiler appears not to be a problem.

What worked for me was to compile LAPACK and BLAS (--with-lapack=BUILD 
--with-blas=BUILD) and use the static library for compiling the matlab 
code. Using the shared library did not work however and resulted in the 
same crash under MATLAB. I could also not use the system wide lapack and 
blas libraries nor the ones from matlab.

Thanks, Peter




Andreas Waechter wrote:
> Hi Peter,
>
> The problem could be that different versions of the LAPACK (maybe also 
> BLAS) libraries get mixed up...
>
> It might be the case that when you compile the Ipopt code, it is 
> linking against whatever BLAS/LAPACK you provide or is automatically 
> found on your system, and when you run the stand-alone code these 
> versions of the libraries are used.  But Matlab comes with its own 
> BLAS/LAPACK, and there might be inconsistencies... (I also noticed on 
> some 64bit systems some problems lately that I still haven't fixed...)
>
> You could try to configure the Ipopt code to use the BLAS/LAPACK 
> coming with Matlab (I think it might be the mkl library), but I don't 
> know if that will work, you might just end up seeing the same error 
> now even in your stand-alone...  The issue might be that for some 
> reason the integer type of the Matlab version of LAPACK is 
> non-standard...?
>
> Maybe one thing you can try is to download the netlib source for BLAS 
> and LAPACK, and force its inclusing into the Ipopt library by 
> configuring with --with-blas=BUILD and --with-lapack=BUILD.  Maybe the 
> Ipopt code will then not try to use the Matlab version of those 
> libraries.   However, depending on the size of your problem and what 
> linear solver you use in Ipopt, you might see notso great performance 
> since the netlib code is not optimized...
>
> Regards,
>
> Andreas
>
> On Fri, 30 Apr 2010, Peter Gehler wrote:
>
>> Hello
>>
>> I am using IpOpt-3.7.0, Matlab R2010A, compiled with gcc,g++,gfortran 
>> version 4.3.2.
>>
>> I have the following problem when using the Matlab interface whenever 
>> I set hessian_approximation = limited_memory. For example in the 
>> included "examplehs051.m" I encounter the following problem:
>>
>> ========
>>>> examplehs051
>> This is Ipopt version 3.7.0, running with linear solver ma27.
>>
>> Number of nonzeros in equality constraint Jacobian...:        7
>> Number of nonzeros in inequality constraint Jacobian.:        0
>> Number of nonzeros in Lagrangian Hessian.............:        0
>>
>> ** On entry to DPOTRF parameter number  4 had an illegal value
>> Erase is control-H (^H).
>> ========
>>
>> The same is true for all included matlab examples whenever I change 
>> to include "options.ipopt.hessian_approximation = 'limited-memory';"  
>> I checked the c-examples in Ipopt/examples/ which work fine for both 
>> settings. I also compiled a version of the library with the mumps 
>> solver only instead of the HSL package but encounter the very same 
>> behaviour. I suspect that problem is caused by blas but since the 
>> command line version works, I am unsure how to resolve this problem.
>>
>> Best Regards, Peter
>>
>>
>>



More information about the Ipopt mailing list