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

Update suitesparse to 7.8.3 #56959

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Conversation

fxcoudert
Copy link
Contributor

@giordano
Copy link
Contributor

giordano commented Jan 5, 2025

@ViralBShah I presume we need to update the suitesparse wrapper at the same time for this?

@inkydragon inkydragon added external dependencies Involves LLVM, OpenBLAS, or other linked libraries stdlib Julia's standard library JLLs labels Jan 6, 2025
@ViralBShah
Copy link
Member

I think I had checked a while ago and wrappers did not need updating. Can check once more.

@giordano
Copy link
Contributor

giordano commented Jan 7, 2025

There are loads of test failures though, and several errors like

Error: no BLAS/LAPACK library loaded for dlarfg_()

@imciner2
Copy link
Contributor

imciner2 commented Jan 7, 2025

There are loads of test failures though, and several errors like

Error: no BLAS/LAPACK library loaded for dlarfg_()

Uh oh... that sounds like name mangling or modification got messed up somehow so we are trying to call wrong BLAS functions.

Downloading the raw binaries from the JLL, a quick check on the undefined symbols shows we lost the 64 suffixing:

SuiteSparse 7.8.0+1:

$ nm -a libspqr.so | grep U
                 U dlarf_64_
                 U dlarfb_64_
                 U dlarfg_64_
                 U dlarft_64_
                 U dnrm2_64_
                 U dznrm2_64_
                 U memcpy@@GLIBC_2.2.5
                 U memmove@@GLIBC_2.2.5
                 U memset@@GLIBC_2.2.5
                 U __muldc3@@GCC_4.0.0
                 U sqrt@@GLIBC_2.2.5
                 U SuiteSparse_config_divcomplex
                 U SuiteSparse_config_hypot
                 U SuiteSparse_time
                 U zlarf_64_
                 U zlarfb_64_
                 U zlarfg_64_
                 U zlarft_64_

SuiteSparse 7.8.3+1

$ nm -a libspqr.so | grep U
                 U dlarf_
                 U dlarfb_
                 U dlarfg_
                 U dlarft_
                 U dnrm2_
                 U dznrm2_
                 U memcpy@@GLIBC_2.2.5
                 U memmove@@GLIBC_2.2.5
                 U memset@@GLIBC_2.2.5
                 U __muldc3@@GCC_4.0.0
                 U sqrt@@GLIBC_2.2.5
                 U SuiteSparse_config_divcomplex
                 U SuiteSparse_config_hypot
                 U SuiteSparse_time
                 U zlarf_
                 U zlarfb_
                 U zlarfg_
                 U zlarft_

@imciner2
Copy link
Contributor

imciner2 commented Jan 7, 2025

SuiteSparse 7.8.2+0:

$ nm -a libspqr.so | grep U
                 U dlarf_64_
                 U dlarfb_64_
                 U dlarfg_64_
                 U dlarft_64_
                 U dnrm2_64_
                 U dznrm2_64_
                 U memcpy@@GLIBC_2.2.5
                 U memmove@@GLIBC_2.2.5
                 U memset@@GLIBC_2.2.5
                 U __muldc3@@GCC_4.0.0
                 U sqrt@@GLIBC_2.2.5
                 U SuiteSparse_config_divcomplex
                 U SuiteSparse_config_hypot
                 U SuiteSparse_time
                 U zlarf_64_
                 U zlarfb_64_
                 U zlarfg_64_
                 U zlarft_64_

and SuiteSparse 7.8.3+0:

$ nm -a libspqr.so | grep U
                 U dlarf_64_
                 U dlarfb_64_
                 U dlarfg_64_
                 U dlarft_64_
                 U dnrm2_64_
                 U dznrm2_64_
                 U memcpy@@GLIBC_2.2.5
                 U memmove@@GLIBC_2.2.5
                 U memset@@GLIBC_2.2.5
                 U __muldc3@@GCC_4.0.0
                 U sqrt@@GLIBC_2.2.5
                 U SuiteSparse_config_divcomplex
                 U SuiteSparse_config_hypot
                 U SuiteSparse_time
                 U zlarf_64_
                 U zlarfb_64_
                 U zlarfg_64_
                 U zlarft_64_

So we lost the suffix through a Ygg change it looks like, since 7.8.3+0 has them but 7.8.3+1 lost the suffix.

@imciner2
Copy link
Contributor

imciner2 commented Jan 7, 2025

These BLAS errors should be fixed in the newest SuiteSparse 7.8.3+2 build (https://github.com/JuliaBinaryWrappers/SuiteSparse_jll.jl/releases/tag/SuiteSparse-v7.8.3%2B2) now waiting for merge to general (JuliaRegistries/General#122538). We also will get the RISCV platform there, but I don't think we can specify that in the deps yet.

@giordano
Copy link
Contributor

giordano commented Jan 7, 2025

We also will get the RISCV platform there, but I don't think we can specify that in the deps yet.

If this PR is rebased on master to include 5ec41e9, the refresh checksums Makefile should include the riscv64 build too.

@fxcoudert
Copy link
Contributor Author

Rebased on master

@imciner2
Copy link
Contributor

imciner2 commented Jan 7, 2025

This still looks to be using the wrong version of SuiteSparse. It needs to be 7.8.3+2 and it seems to be on 7.8.3+1 still.

@fxcoudert
Copy link
Contributor Author

Oops sorry about that

@giordano
Copy link
Contributor

giordano commented Jan 8, 2025

All green now, thanks everybody!

@giordano giordano merged commit fe1ed74 into JuliaLang:master Jan 8, 2025
7 checks passed
@ViralBShah
Copy link
Member

Thanks folks!

@fxcoudert fxcoudert deleted the suitesparse branch January 8, 2025 13:08
@ViralBShah
Copy link
Member

ViralBShah commented Jan 8, 2025

The wrappers can only be updated when Clang.jl runs on nightly: JuliaInterop/Clang.jl#523

I don't expect breaking changes, but we do need to regenerate the wrappers to pull in the right version numbers and such.

@giordano
Copy link
Contributor

giordano commented Jan 8, 2025

The wrappers can only be updated when Clang.jl runs on nightly: JuliaInterop/Clang.jl#523

Why? I thought you could use any version of Julia: https://github.com/JuliaSparse/SparseArrays.jl/blob/c575811ba7f558324738d54037d898699081d26d/gen/README.md#how-to-upgrade-suitesparse_jll

@ViralBShah
Copy link
Member

ViralBShah commented Jan 9, 2025

The reason you need to use the nightly version is so that it picks the correct version of the suitesparse header files from SuiteSparse_jll (otherwise older versions of Julia will have older suitesparse versions). Presumably this should be changed.

@imciner2
Copy link
Contributor

imciner2 commented Jan 9, 2025

The reason you need to use the nightly version is so that it picks the correct version of the suitesparse header files from SuiteSparse_jll (otherwise older versions of Julia will have older suitesparse versions). Presumably this should be changed.

The instructions that @giordano linked above say to add SuiteSparse_jll with a specific commit hash, and the recently merged one has the same Julia compat as the previous, so it should load on 1.11. Are you saying that using Pkg to add the new commit doesn't actually work right now?

@ViralBShah
Copy link
Member

Oh I see - I should try that.

@ViralBShah
Copy link
Member

What am I doing wrong? It is still picking up the Julia distribution provided SuiteSparse_jll rather than the one I installed.

➜  gen git:(main) julia --project             
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.2 (2024-12-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(gen) pkg> st
Status `~/repos/SparseArrays.jl/gen/Project.toml`
  [40e3b903] Clang v0.18.3
  [98e50ef6] JuliaFormatter v1.0.62
  [bea87d4a] SuiteSparse_jll v7.7.0+0 `https://github.com/JuliaBinaryWrappers/SuiteSparse_jll.jl.git#2ad461f`

julia> include("generator.jl")
ERROR: LoadError: AssertionError: isfile(cholmod_h)
Stacktrace:
 [1] top-level scope
   @ ~/repos/SparseArrays.jl/gen/generator.jl:17
 [2] include(fname::String)
   @ Main ./sysimg.jl:38
 [3] top-level scope
   @ REPL[2]:1
in expression starting at /Users/viral/repos/SparseArrays.jl/gen/generator.jl:17

julia> cholmod_h
"/Users/viral/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/include/suitesparse/cholmod.h"

@giordano
Copy link
Contributor

Oof, I don't think that's working then 😞

@ViralBShah
Copy link
Member

I think I just need to find a way to give it the right directory to pick the header file from.

@giordano
Copy link
Contributor

Ah, I can make it work if I change the UUID of the package. It's quite hackish, but it works. I'll open a PR over there to explain the process better.

@ViralBShah
Copy link
Member

I think what I propose in JuliaSparse/SparseArrays.jl#593 works well.

@giordano
Copy link
Contributor

Uh, yeah, that works too

@ViralBShah
Copy link
Member

It's kludgy, but allows me to use different versions of the artifacts and such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external dependencies Involves LLVM, OpenBLAS, or other linked libraries JLLs stdlib Julia's standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants