Change linear solver using JuMP, Hypatia

Hello :slight_smile:
I am using Hypatia with JuMP, and I want to change the Linear Solver inside it. How can I do ? I found out the following :

user_options = (  "mu_strategy" => "monotone",  "linear_solver" => "ma27" )
model = Model(optimizer_with_attributes(Ipopt.Optimizer, user_options...))

This works well for Ipopt, but I couldn’t find the equivalent for Hypatia … I would have to change “linear_solver” by an other right string …

an other way to write it, is :

model = Model(Ipopt.Optimizer)
set_attribute(model,"linear_solver","ma27")

Thanks for any answer :slight_smile:
gustave

I don’t think Hypatia supports using a different linear solver like HSL, but @chriscoey or @lkapelevich will know better.

thanks !
here are four solvers that can be used inside Hypatia !

Hey.

There is an option called syssolver that determines the strategy for solving Hypatia’s linear systems. The default is Solvers.QRCholDenseSystemSolver, so all the linear algebra is dense. You could try Solvers.SymIndefSparseSystemSolver{Float64}() if you suspecct that your problem will have sparse linear systems.

The files that you found do relate to the fact_cache field in the system solvers. But that’s a more subtle option. The HSL/Pardiso code probably hasn’t been used for a long time.

2 Likes

OK thanks, I undestood, and it works well !

1 Like

this works well :

   set_attribute(model , "use_dense_model",false)
   set_attribute(model, "syssolver", 
   Hypatia.Solvers.SymIndefSparseSystemSolver{Float64}())

“use dense model” makes a mistake, but the second line is OK (it uses less memory, but is also slower)