-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linear solvers for Ipopt #69
Comments
Agreed. Would be interesting to check with some benchmarking. |
@PierreMartinon Do you use the function |
@amontoison I think we use Line 77 in b0b6921
We can see this here: https://github.com/search?q=repo%3Acontrol-toolbox%2FCTDirect.jl%20ipopt&type=code |
@amontoison YES. PR most welcome on this. All the more as there is currently an internship with @ocots @frapac that will benefit a lot from being able to easily try and change linear solvers. |
Done in #113 @jbcaillau 😉 |
@ocots @0Yassine0 @amontoison guys, I need a serious update, here:
|
Yes, the information are still correct.
HSL_jll.jl has two versions, the official one that is available on the website of RAL and a dummy one that contains one C routine and that is available in the Julia registry. Conclusion: If the user has installed the official HSL_jll.jl, we automatically use MA57 here otherwise we use MUMPS as a fallback but everything is transparent for the user because we can check which version of HSL_jll.jl is installed.
SPRAL requires two environnement variables related to OpenMP. Because CTDirect.jl requires at least Julia 1.9, I don't check the Julia version but I ensure that the two environnement variables are well defined if the user wants to use it. Note that I compiled MUMPS 5.7.2 yesterday with Yggdrasil. I wait a new release of SPRAL and I will recompile Ipopt with the updated linear solvers. |
🙏🏽 @amontoison now I get it. Actually, you probably already the dummy routine trick, but did not remembered it so was not able to figure where licensing was coming into play. having a try (before forgetting it again 🤞🏽) |
@ocots @PierreMartinon @0Yassine0 As discussed now with @amontoison 🙏🏽: for sparse problems, typically for constraints resulting from discretising x[i+1] == x[i] + h[i] / 2 * ( f(x[i], u[i]) + f(x[i]+1, u[i+1]) ) one has very sparse Hessians and @amontoison suggests that |
@0Yassine0 @ocots I installed HSL lib on a linux server, Can you please share how you did the install end to end? |
I didn't use |
@jbcaillau You have an old version of |
@amontoison outdated me 🙃 |
Started a basic benchmarking script. SPRAL does seems slower than MUMPS
|
@PierreMartinon nice. what about |
@PierreMartinon I suggest to
|
I am ok with symbols. We can provide with the description. |
@jbcaillau What is the issue with MA57? |
@amontoison just a slightly deprecated / less precise convergence for this particular case that is not compatible with some further solution analysis. |
Did you tune the tolerance of the optimization solver? |
only difference between the two runs = linear solver. same params otherwise (tols, etc.) as we cannot be sure that a user will have HSL installed, it is safer to ensure that the default (= MUMPS) for Ipopt gives the requested precision for post computation. minor point, though. |
ok for symbols as well (should we set this as a general rule ?) Equality tests may have to be updated for instance in https://github.com/control-toolbox/CTDirect.jl/blob/a9ae483a57382d44dba0612af914d78275fd6d7a/ext/CTSolveExt.jl As for the default choice, this is a 1-line change here, so pretty straightforward Line 21 in a9ae483
|
@PierreMartinon @gergaud @ocots Many thanks @amontoison for your input on this. To summarise:
solve
an option allowing to change the linear solver used byIpopt
: the default ismumps
, but there (at least) the other options below:ma27
andma57
from HSL1, andspral
from STFC/RAL:spral
instead ofmumps
in our code, provided that JuliaExtra
Users on Intel processors (and Julia$\geq$ 1.9 that has libblastrampoline) can change their
OpenBLAS
backend to the Intel one:To display the current backend, do
See also
Performance tips
Footnotes
free academic license available on request ↩
The text was updated successfully, but these errors were encountered: