Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#75 closed defect (worksforme)

Ipopt fails unit test in Linux with no ThirdParty source

Reported by: tkr Owned by: andreasw
Priority: normal Component: Ipopt
Version: 3.4 Severity: normal
Keywords: Cc:


If I download Ipopt on my Linux and configure with no arguments and without downloading any third party source code, it builds fine, but the unit test fails as follows:

---- 8< ---- Start of test program output ---- 8< ----

==> Warning: Treating 1 binary and 1 integer variables as continuous.

Exception of type: OPTION_INVALID in file "../../../../Ipopt/src/Algorithm/IpAlgBuilder.cpp" at line 258:

Exception message: Selected linear solver MA27 not available.

Tried to obtain MA27 from shared library "", but the following error occured: cannot open shared object file: No such file or directory

It seems that somehow, the code is building because it finds the shared libraries it needs already installed, but because there is no third party source installed, it also somehow is convinced that it needs to build libhsl and use the MA27 library? I didn't look into it very deeply, since it works fine once all (open source) third party sources have been downloaded. By the way, you do not have an option for selecting version 3.4 below.

Change History (5)

comment:1 Changed 11 years ago by andreasw

  • Owner changed from ipopt-team to andreasw
  • Status changed from new to assigned

Hi Ted:

This is all as intended.

It is a new feature of the new Ipopt version to be able to compile the code without linear solver, and then have them loaded at runtime. The idea is that we can now distribute ONE binary with, for example, the MUMPS linear solver, but later users can run it with HSL if they want to as well. See also

I don't want to put a hard-stop into the configure script if no linear solver is available at Ipopt compilation time. Would things have been clearer for you if there had been a warning message?



comment:2 Changed 11 years ago by andreasw

  • Version changed from 3.3 (C++ Version) to 3.4 (C++ Version)

comment:3 Changed 11 years ago by andreasw

  • Resolution set to worksforme
  • Status changed from assigned to closed

No correspondence for one months. Closing ticket.

comment:4 Changed 6 years ago by rcasero

A consideration about whether a warning or error message would be better.

I'm building IPOPT (Ipopt-3.11.6) from CMake on linux as an external project (see code below). I think that the fact that "make test" fails with the error reported above (for every linear solver that is not present?) then makes CMake exit with an error too (at least, that's what happening to me).

If that's the case, and I'm not missing anything, given that linear solvers are not a requisite to build IPOPT, wouldn't it make more sense if the tests gave a warning rather than an error?


set(IPOPT_SOURCE_DIR ${GERARDUS_SOURCE_DIR}/cpp/src/third-party/Ipopt-3.11.6)

# build IPOPT
  CONFIGURE_COMMAND ./configure CC=$ENV{CC} CXX=$ENV{CXX} F77=$ENV{F77} --prefix=${IPOPT_SOURCE_DIR}/output
  # we don't run the test, because tests for any of the linear solvers
  #  that we don't use will fail, as they won't be installed in the
  #  system, and this will make cmake stop with an error
  # TEST_COMMAND make test

comment:5 Changed 6 years ago by kelman

You do not absolutely need a linear solver to compile Ipopt, but you need at least one linear solver for Ipopt to be usable in any way. If you have compiled Ipopt without any linear solver, the assumption is that you plan on using the "linear solver loader" functionality described here

What are you trying to use Ipopt for here? You can use the public domain linear solver Mumps, you just have to go to the ThirdParty/Mumps folder and run the ./get.Mumps script in order to download the source code before you run Ipopt's configure

Note: See TracTickets for help on using tickets.