-
Notifications
You must be signed in to change notification settings - Fork 9
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
Use CSDP_jll #56
Use CSDP_jll #56
Conversation
The symbols do not seem to be available in the symbolic library:
https://travis-ci.org/github/JuliaOpt/CSDP.jl/jobs/674044667#L708-L709 Might be fixed by JuliaPackaging/Yggdrasil#835 |
Can you try again? |
It works on Julia v1.4. I have tried making it work on Julia v1.0 with BinaryProvider but the generated script does not work. LibraryProduct(["libcsdp"], :libcsdp) produced the error ┌ Error: Error building `CSDP`:
│ ERROR: LoadError: MethodError: no method matching LibraryProduct(::String, ::Symbol)
│ Closest candidates are:
│ LibraryProduct(::AbstractString, !Matched::AbstractString, !Matched::Symbol) at /home/blegat/.julia/packages/BinaryProvider/kcGxO/src/Products.jl:101
│ LibraryProduct(::AbstractString, !Matched::Array{S<:AbstractString,1}, !Matched::Symbol) where S<:AbstractString at /home/blegat/.julia/packages/BinaryProvider/kcGxO/src/Products.jl:106
│ Stacktrace:
│ [1] top-level scope at none:0
│ [2] include at ./boot.jl:317 [inlined]
│ [3] include_relative(::Module, ::String) at ./loading.jl:1044
│ [4] include(::Module, ::String) at ./sysimg.jl:29
│ [5] include(::String) at ./client.jl:392
│ [6] top-level scope at none:0
│ in expression starting at /home/blegat/.julia/dev/CSDP/deps/build.jl:6 with BinaryProvider v0.5.8.
and
Is it expected that the blas library used is the system one ? |
I am not familiar much with BP scripts. Maybe @odow can help? |
See how Clp.jl does it in: jump-dev/Clp.jl#77 Worst case, can always make it Julia 1.3+ and drop BinaryProvider support - but it would be good to try a little more to see if Julia 1.0 support can be retained. |
I would just leave the existing builder in-place. But throw an error on Windows and say use Julia 1.3+. |
I'd rather have all Julia versions using the same binaries if possible, Windows is failing on Julia v1.4 to anyway, see AppVeyor log.
I added an |
deps/build_OpenBLAS32.v0.3.9.jl
Outdated
# We also added `prefix, ` after `LibraryProduct(`. | ||
using BinaryProvider # requires BinaryProvider 0.3.0 or later | ||
# Needed to add this as this method was not defined. | ||
function BinaryProvider.CompilerABI(; libgfortran_version=nothing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@staticfloat Any idea why the generated build.jl uses this method ? I don't see it defined in any version of BinaryProvider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably because that's the signature of Pkg.BinaryPlatforms.CompilerABI
Personally, I don't think it is worthwhile to get the new binaries running on the older versions. Maybe at least get a release done leaving the old things as is and Julia 1.3+ using the new binaries? |
Currently, I don't think that having a Windows binary that segfault is better for the user than having a Windows installer that does not work so the |
Wait I misunderstood. Didn't realize that the new windows binaries are segfaulting. Yes, if so, we should figure it out. I thought the old ones were segfaulting. |
How were the old windows binaries built? Is the build script available somewhere? |
@EQt built them and uploaded them in https://github.com/EQt/winlapack. I don't know whether he still has the script he used for generating them. |
@staticfloat Note that if I comment out the line https://github.com/JuliaPackaging/BinaryProvider.jl/blob/v0.5.8/src/Products.jl#L174 |
@EQt The build recipe is here, in case you notice something we are not doing right on windows: https://github.com/JuliaPackaging/Yggdrasil/blob/master/C/Coin-OR/CSDP/build_tarballs.jl |
Here are the build logs for windows: @giordano I don't see any complaints for libgfortran, but perhaps we need to add it and do the expansion? Any thoughts if that might help on Windows? Appears it might help:
|
The error is coming from this file that tries to install |
Actually maybe we can just drop 1.0 support. It's not a widely used solver, so we can aim for minimal maintenance. |
What do you mean ?
In my experience, CSDP is still the most reliable SDP solver so it's used on Travis to test packages that rely on solving SDP. Having the same binary for all versions is appealing in that regards. Figuring out how to do this for CSDP has a fixed cost but once it does not seem to difficult to replicate the same think for all solvers once we understand it for CSDP. It's just one line to generate the build.jl's but they are a few caveats that are the reason for this fixed cost. |
Should I merge the |
I think there is something wrong in the new scripts, I don't see how building CSDP for libgfortran would help |
I thought there are two issues: 1) the issue with the scripts for older Julia releases prior to 1.3 and 2) Windows failures with the new binaries in Julia 1.4 with the JLL. I was hoping to fix the second with gfortran expansion - but it is possible I have completely misunderstood what is going on here. |
Thanks ! Note that the segfault is thrown when you call |
Which |
The one for which you added |
Using the unreleased v0.5.9 of BinaryProvider, it now works with Julia v1.0 and Linux and we now have details on why
Any idea why EDIT: It seems to be because we need to add the dep CompilerSupportLibraries |
Travis is green for both Mac and Linux and both Julia v1.0 and v1.4 with JuliaPackaging/BinaryProvider.jl#192 🎉 |
Did this ever work on Windows? |
It used to with the dll manually built by @EQt |
@ViralBShah you see why it's so useful that BinaryBuilder tarballs come with the log? 😉 |
Is this the same look as what we see on AZP during building? Or something else? |
Logs in Azure Pipelines are not persistent and finding the log corresponding to a very specific build is cumbersome |
We could tarball them separately and upload them to JuliaBinaryWrappers along with the release. Should move this discussion to the other issue. |
v0.5.9 of BinaryProvider is now tagged |
Project.toml
Outdated
@@ -14,7 +15,8 @@ SemidefiniteModels = "169818f4-1a3d-53bf-95b3-11177825b1e3" | |||
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" | |||
|
|||
[compat] | |||
BinDeps = "0.8, 0.9, 1" | |||
BinaryProvider = "0.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to require v0.5.9 specifically:
BinaryProvider = "0.5" | |
BinaryProvider = "0.5.9" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it may be good to bump BP to 0.6.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That version requires Julia v1.3, which is not very helpful here. Yes, history of BinaryProvider is a bit messy 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - that is a bit messy.
@giordano Do you see anything in the CSDP build file that might be leading to the windows failure? It's a fairly simple C library. https://github.com/JuliaPackaging/Yggdrasil/blob/master/C/Coin-OR/CSDP/build_tarballs.jl |
Not sure, maybe we need @odow's level of debugging expertise to figure out what's the problem 🙂 |
I started a build without openmp on windows, just in case it helps. CSDP build docs claim openmp works (but they are specifically talking only about mingw64) |
Crashes without openmp. Reverted that PR on Yggdrasil. |
I found a Windows computer and tried to chase the segfault. It seems to only occur on
|
Codecov Report
@@ Coverage Diff @@
## master #56 +/- ##
==========================================
- Coverage 54.50% 54.43% -0.07%
==========================================
Files 10 10
Lines 655 654 -1
==========================================
- Hits 357 356 -1
Misses 298 298
Continue to review full report at Codecov.
|
Closes #50