coin-or/Ipopt

LAPACK_NOT_INCLUDED

matheusdiogenesandrade opened this issue · 3 comments

Overview:

I am trying to run Ipopt with the flag hessian_approximation=limited-memory by means of AMPL as interface. However, I am obtaining the following error.

Exception of type: LAPACK_NOT_INCLUDED in file "/tmp/coin/Ipopt/Ipopt/src/LinAlg/IpLapack.cpp" at line 87:
 Exception message: Ipopt has been compiled without LAPACK routine DPOTRF, but options are chosen that require this dependency.  Abort.

EXIT: Some uncaught Ipopt exception encountered.

After compiling HSL with the MA27 (as suggested here https://stackoverflow.com/questions/72562784/ipopt-provided-package-hsl-is-not-working-or-does-not-contain-ma27), and compiling Ipopt with the proper commands,

./configure --with-hsl-lflags="-L$HOME/ThirdParty/HSL/build -lcoinhsl" 
    --with-lapack-lflags="-L$HOME/ThirdParty/Lapack/build/lib -lcoinlapack" 
    --with-mumps-lflags="-L$HOME/ThirdParty/Mumps/build -lcoinmumps" 
    --with-mumps-cflags="-I$HOME/ThirdParty/Mumps/MUMPS/include -I$HOME/ThirdParty/Mumps" 
    --with-asl-lflags="-L$HOME/ASL -lcoinasl" 
    --with-asl-cflags="-I$HOME/ASL/solvers"

make

sudo make install

I obtained the initially mentioned error.

Tech stack:

  • Ipopt 3.12.13
  • AMPL 20230817
  • CoinHSL 2023.11.17
  • Mumps 5.6.2
  • Linux pop-os 6.2.6

I would like to know if there is any missing point from my side.

Thanks and regards.

It could be that --with-lapack-lflags is not understood by Ipopt 3.12.13. It probably got introduced with Ipopt 3.13. If you cannot use a current Ipopt version, then try --with-lapack=-L$HOME/ThirdParty/Lapack/build/lib -lcoinlapack.

./configure --with-hsl-lflags="-L$HOME/ThirdParty/HSL/build -lcoinhsl"
--with-lapack-lflags="-L$HOME/ThirdParty/Lapack/build/lib -lcoinlapack"
--with-mumps-lflags="-L$HOME/ThirdParty/Mumps/build -lcoinmumps"
--with-mumps-cflags="-I$HOME/ThirdParty/Mumps/MUMPS/include -I$HOME/ThirdParty/Mumps"
--with-asl-lflags="-L$HOME/ASL -lcoinasl"
--with-asl-cflags="-I$HOME/ASL/solvers"

Thanks. I managed to compile with the recommendation. However, I discovered another issue, it seems that the Ipopt used by AMPL is different than the own recently compiled.

(base) use@pop-os:~$ /usr/local/bin/ipopt --version
Ipopt 3.14.14 (x86_64-pc-linux-gnu), ASL(20190605)

(base) use@pop-os:~$ ~/ampl/ipopt --version
Ipopt 3.12.13 (Linux x86_64), ASL(20221115)

Therefore, the error still persists, since AMPL is delegating to the Ipopt 3.12, instead of the recent one. Should I move this issue to https://github.com/ampl/ampls-api?

Thanks and regards.

Issue moved to AMPL repository ampl/ampls-api#12 (comment).