I have installed HSL_jll.jl as provided by HSL and also installed HSL.jl. With this I can get Ipopt to work with ma27 when I use Ipopt directly:
using JuMP, Ipopt, HSL, HSL_jll
model = Model(Ipopt.Optimizer)
@variable(model, x[1:2]>=0)
@objective(model, Min, sum(x.^2))
@constraint(model, sin(x[1]) <= -0.5)
set_optimizer_attribute(model, "hsllib", HSL_jll.libhsl_path)
set_optimizer_attribute(model, "linear_solver", "ma27")
optimize!(model)
However, when I try to use AmplNLWriter, it fails:
using JuMP, Ipopt_jll, HSL, HSL_jll, AmplNLWriter
model = Model(() -> AmplNLWriter.Optimizer(Ipopt_jll.amplexe))
@variable(model, x[1:2]>=0)
@objective(model, Min, sum(x.^2))
@constraint(model, sin(x[1]) <= -0.5)
set_optimizer_attribute(model, "hsllib", HSL_jll.libhsl_path)
set_optimizer_attribute(model, "linear_solver", "ma27")
optimize!(model)
Ipopt 3.14.16: hsllib=/home/anaconda/Notebooks/Joshua/HSL_jll.jl-2023.11.7/override/lib/x86_64-linux-gnu-libgfortran5/libhsl.so
linear_solver=ma27
Exception of type: DYNAMIC_LIBRARY_FAILURE in file "Common/IpLibraryLoader.cpp" at line 86:
Exception message: libmpifort.so.12: cannot open shared object file: No such file or directory
EXIT: Library loading failure.
I’ve tried a variety of things, but cannot get this to work. I need this for benchmarking study I am doing where I want to include AMPL-based AD.