Skip to content
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

Upgrade MadNLPHSL.jl #376

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Upgrade MadNLPHSL.jl #376

merged 1 commit into from
Jan 23, 2025

Conversation

amontoison
Copy link
Member

@amontoison amontoison commented Nov 13, 2024

Require the new release of HSL_jll.jl and this PR of HSL.jl:
JuliaSmoothOptimizers/HSL.jl#215

@frapac You will be able to easily try it.

@amontoison amontoison marked this pull request as draft November 13, 2024 03:54
@sshin23
Copy link
Member

sshin23 commented Nov 13, 2024

This is great! @amontoison, does only ma27 support quad precision? I guess it might be tricky once they rely on BLAS

@amontoison
Copy link
Member Author

amontoison commented Nov 13, 2024

Quadruple precision will only be supported in MA27 for the upcoming release of HSL_jll.jl.
However, the next release will bring other useful features, such as support of Int64 for the HSL solvers interfaced in MadNLP.

For supporting quadruple precision in other HSL linear solvers, we have a few challenges.
The first is the convention for BLAS/LAPACK symbols, which isn't standardized in quadruple precision:

Next, I need to add these symbols to LBT, as some of them are missing:

Finally, we need a BLAS/LAPACK library compiled in quadruple precision with the relevant symbols.

@nimgould plans to port the subset of routines needed in quadruple precision:

We might be able to include this in HSL_jll.jl, but all of this is speculative and will take some time before it becomes available.

@amontoison amontoison changed the title Interface MA27 in quadruple precision Uograde MadNLPHSL.jl Dec 27, 2024
@amontoison amontoison requested review from sshin23 and frapac December 27, 2024 08:42
@amontoison amontoison marked this pull request as ready for review December 27, 2024 08:42
@sshin23
Copy link
Member

sshin23 commented Dec 27, 2024

Looks good @amontoison! Now I think it is a good time to get rid of Int32 from MadNLP and make Int64 the default (but in a separate PR)

@amontoison
Copy link
Member Author

amontoison commented Dec 27, 2024

MA27 can also be used with quadruple precision with the PR.

I tested with the future version of HSL_jll.jl 2025.x.x that support Float128 for all solvers and it works too.
I did the modifications in HSL.jl such that we don't need to update MadNLPHSL.jl again.

The function HSL.is_supported will automatically return true with Float128 for ma57, ma77, etc...

@amontoison amontoison changed the title Uograde MadNLPHSL.jl Upgrade MadNLPHSL.jl Dec 27, 2024
@amontoison
Copy link
Member Author

@frapac Can I merge this PR?

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 0% with 174 lines in your changes missing coverage. Please review.

Project coverage is 81.79%. Comparing base (2e301da) to head (ac115a5).
Report is 31 commits behind head on master.

Files with missing lines Patch % Lines
lib/MadNLPHSL/src/ma57.jl 0.00% 43 Missing ⚠️
lib/MadNLPHSL/src/ma27.jl 0.00% 42 Missing ⚠️
lib/MadNLPHSL/src/ma77.jl 0.00% 33 Missing ⚠️
lib/MadNLPHSL/src/ma86.jl 0.00% 31 Missing ⚠️
lib/MadNLPHSL/src/ma97.jl 0.00% 25 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #376       +/-   ##
===========================================
+ Coverage   70.17%   81.79%   +11.61%     
===========================================
  Files          45       42        -3     
  Lines        3943     3603      -340     
===========================================
+ Hits         2767     2947      +180     
+ Misses       1176      656      -520     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@frapac frapac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you for the contribution @amontoison !

@frapac frapac merged commit 12838df into MadNLP:master Jan 23, 2025
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants