-
Notifications
You must be signed in to change notification settings - Fork 57
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
Ipopt_jll with LBT #327
Ipopt_jll with LBT #327
Conversation
Can we test with MKL on CI machines? |
Yes, you just need to add
|
Codecov ReportBase: 91.52% // Head: 93.22% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #327 +/- ##
==========================================
+ Coverage 91.52% 93.22% +1.70%
==========================================
Files 4 4
Lines 743 797 +54
==========================================
+ Hits 680 743 +63
+ Misses 63 54 -9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Windows segfault seems related: https://github.com/jump-dev/Ipopt.jl/runs/7986459839?check_suite_focus=true Does LBT not work on Windows? |
I never tested LBT on Windows. I don't know if it's related to the new version of MUMPS (5.5.1) or LBT. |
It seems to be related to OpenBLAS32. |
The null pointer suggests that something isn't loaded properly. @ViralBShah is there anything we need to do for LBT on Windows? |
Not to the best of my knowledge. @giordano perhaps. |
I suggest passing all the arguments to lbt_forward to make sure we are not clearing the ilp64 symbols. |
Also why such an old OpenBLAS32? |
Also, perhaps we want to only forward if the user has not already set up a forward. Otherwise you have to load packages in the right order so that MKL.jl forwards are not overwritten by this package for example. Eventually we need a better Julia wide mechanism to use Preferences to pick BLAS etc. |
Is it possible to detect if the user has already set up a 32 bits BLAS/LAPACK backend ? |
Yes, LBT allows you to query with |
Julia base uses LBT by default, and so this is checked in Julia base CI etc. Also MKL.jl CI tests Windows, and it works fine. We don't do anything special there, AFAICT. |
I'm not aware of anything special being needed for Windows |
Can someone fix the CI and re-trigger? |
I added a check for LP64 BLAS, but the problem is still there. |
Does it matter that OpenBLAS32_jll and OpenBLAS_jll are different versions? |
I confirm that we have also the null pointer with MUMPS 5.4.1 + LBT. |
Can we also try 32-bit Windows here? |
Added. Running now: https://github.com/jump-dev/Ipopt.jl/runs/8148650553?check_suite_focus=true |
Same null pointer error on 32-bit |
@odow, I rebuild |
@amontoison happy? So we've just disabled LBT on Windows for now? |
Yes, it's finally working! @ViralBShah Is it possible to do a new release of For Apple platforms, we could use directly Apple Accelerate what do you think? if VERSION >= v"1.8"
config = LinearAlgebra.BLAS.lbt_get_config()
if !any(lib -> lib.interface == :lp64, config.loaded_libs)
if !Sys.isapple()
LinearAlgebra.BLAS.lbt_forward(OpenBLAS32_jll.libopenblas_path, verbose = true, clear = false)
else
blas = "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/libBLAS.dylib"
lapack = "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/libLAPACK.dylib"
LinearAlgebra.BLAS.lbt_forward(blas, verbose = true, clear = false)
LinearAlgebra.BLAS.lbt_forward(lapack, verbose = true, clear = false)
end
end
end |
I have been holding off on a new release because IIRC, the latest master does not pass on one of the windows. I will trigger another build today. On Mac it does make sense to link to MKL. |
MKL is not efficient on Mac because it's only working with one thread: |
Oops - sorry I was typing on my phone in a hurry. I meant to say that on mac, it does make sense to link to Accelerate. |
I've tagged MKL.jl 0.6 |
If 32-bit BLAS is being linked against through LBT, then on Apple, we should also be able to set up forwarding to Accelerate and see if performance is better. |
Thanks for the new release of MKL @ViralBShah. For Apple Accelerate, we did some tests with @dpo for HSL and the performances seem similar. |
@amontoison are you happy for this to be merged? |
Yes, It's a nice feature for Ipopt.jl. |
close #6
I updated and recompiled
MUMPS_seq_jll
/Ipopt_jll
with libblastrampoline.We can easily switch the BLAS backend now with the version
300.1400.401
ofIpopt_jll
.or
Because
Ipopt_jll
andMUMPS_seq_jll
are compiled withLBT_jll
now, we must add OpenBLAS32_jll as dependency here to have a least one 32 bit BLAS/LAPACK backend.