[Ipopt] Homebrew formula for IPOPT not compatible with HSL, Metis
Stefan Vigerske
stefan at math.hu-berlin.de
Sun Jun 22 14:23:53 EDT 2014
Hi,
linear solver loader tries to load a libhsl.dylib instead of
libcoinhsl.dylib, as it expects the user to build a HSL library with all
dependencies on its own.
The libcoinhsl.dylib that is created by an Ipopt build may depend on
other libs (metis, blas) and may not have everything that is required to
load it via the linear solver loader.
The "HSL for IPOPT" package is probably also meant for use during an
Ipopt build.
From what you write, it sounds that the easiest would be to just build
Ipopt with HSL and Metis from source.
The INSTALL.HSL file in Ipopt's ThirdParty/HSL directory also has
instructions on how to build a HSL library for use in the linear solver
loader.
Best,
Stefan
On 06/16/2014 04:32 PM, Joel Andersson wrote:
> Hello!
>
> I tried out the homebrew formula for IPOPT, but I am struggling to get it
> to work with HSL.
>
> Previously, when I built from sources, I have just put the HSL stuff in
> IPOPT source and had it built together with IPOPT. But I assume that if I
> use Homebrew to build IPOPT, I have to rely on the linear solver loader
> mechanism. Correct?
>
> So I obtained and installed the "HSL for IPOPT" package from
> http://www.hsl.rl.ac.uk/ipopt/. I just used default options for "configure
> - make - make install".
>
> I then brewed IPOPT (I had to use the --with-openblas option to get it to
> brew correctly). Out of the box, IPOPT was not able to find the compiled
> HSL library, but failed with the error:
>
> "Tried to obtain MA57 from shared library "libhsl.dylib", but the following
> error occured:
> dlopen(libhsl.dylib, 2): image not found"
>
> Strangely, there appears to be a name mismatch between the library produced
> by "HSL for IPOPT" and IPOPT, where IPOPT expect libhsl.dylib but a
> libcoinhsl.dylib is produced. Is this a bug or do I use the wrong HSL
> library? If I manually add a symbolic link using "ln -s libcoinhsl.dylib
> libhsl.dylib", it does appear to work, but I still get the following
> (recoverable) error: "Failed to load 'libmetis.so' - using fallback AMD
> code".
>
> I have a brewed metis ("brew install metis"), but the shared library is of
> course called libmetis.dylib and not libmetis.so on my Mac. I tried to make
> another symlink "ln -s libmetis.dylib libmetis.so", but it does not appear
> to help (or I do not understand the output):
>
> This is Ipopt version 3.11.7, running with linear solver ma57.
>
> Number of nonzeros in equality constraint Jacobian...: 394
> Number of nonzeros in inequality constraint Jacobian.: 0
> Number of nonzeros in Lagrangian Hessian.............: 295
>
> Runtime parameters:
> Objective type: Unknown!
> Coarsening type: Unknown!
> Initial partitioning type: Unknown!
> Refinement type: Unknown!
> Perform a 2-hop matching: Yes
> Number of balancing constraints: 1
> Number of refinement iterations: 0
> Random number seed: 1581471676
> Number of separators: 256
> Compress graph prior to ordering: Yes
> Detect & order connected components separately: No
> Prunning factor for high degree vertices: -184828960.000000
> Allowed maximum load imbalance: 2007201.000
>
> Input Error: Incorrect objective type.
> nbrpool statistics
> nbrpoolsize: 0 nbrpoolcpos: 0
> nbrpoolreallocs: 0
>
> Total number of variables............................: 148
>
> Does anyone know how to address these issues?
>
> Best regards,
> Joel
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> had to struggle a bit to get it working with HSL, so I want to know
>
> ln -s libmetis.dylib libmetis.so
> ln -s libcoinhsl.dylib libhsl.dylib
>
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
More information about the Ipopt
mailing list