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 wrappers for SuiteSparse 7.8.3 #593

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

1. update `SuiteSparse_jll` in Yggdrasil to the desired version
2. `cd` to this directory
3. run `julia --project` and then in the Julia REPL, run `pkg>add SuiteSparse_jll#<COMMIT_HASH>`, where `<COMMIT_HASH>` is the commit hash corresponding to the desired version of the package
3. run `julia --project generator.jl <SuiteSparse artifact directory>`

## How to upgrade Clang.jl

Expand Down
11 changes: 10 additions & 1 deletion gen/generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ using JuliaFormatter
cd(@__DIR__)

# headers
include_dir = joinpath(SuiteSparse_jll.artifact_dir, "include", "suitesparse") |> normpath
if length(ARGS) == 0
artifact_dir = SuiteSparse_jll.artifact_dir
else
if isdir(ARGS[1])
artifact_dir = ARGS[1]
else
error("Usage: $PROGRAM_FILE <SuiteSparse artifact directory>")
end
end
include_dir = joinpath(artifact_dir, "include", "suitesparse") |> normpath

cholmod_h = joinpath(include_dir, "cholmod.h")
@assert isfile(cholmod_h)
Expand Down
1 change: 1 addition & 0 deletions gen/generator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ output_ignorelist = [
"CHOLMOD_ASSEMBLE_TIME",
"CHOLMOD_ASSEMBLE_TIME2",
"SuiteSparse_long_idd",
"SUITESPARSE_CONFIG_TIMER",
"SUITESPARSE_COMPILER_MAJOR",
"SUITESPARSE_COMPILER_MINOR",
"SUITESPARSE_COMPILER_SUB",
Expand Down
59 changes: 40 additions & 19 deletions src/solvers/wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,27 @@
@ccall libsuitesparseconfig.SuiteSparse_BLAS_integer_size()::Csize_t
end

@enum cholmod_query_t::UInt32 begin
CHOLMOD_QUERY_HAS_GPL = 0
CHOLMOD_QUERY_HAS_CHECK = 1
CHOLMOD_QUERY_HAS_CHOLESKY = 2
CHOLMOD_QUERY_HAS_CAMD = 3
CHOLMOD_QUERY_HAS_PARTITION = 4
CHOLMOD_QUERY_HAS_MATRIXOPS = 5
CHOLMOD_QUERY_HAS_MODIFY = 6
CHOLMOD_QUERY_HAS_SUPERNODAL = 7
CHOLMOD_QUERY_HAS_CUDA = 8
CHOLMOD_QUERY_HAS_OPENMP = 9
end

function cholmod_query(feature)
@ccall libcholmod.cholmod_query(feature::cholmod_query_t)::Bool

Check warning on line 172 in src/solvers/wrappers.jl

View check run for this annotation

Codecov / codecov/patch

src/solvers/wrappers.jl#L171-L172

Added lines #L171 - L172 were not covered by tests
end

function cholmod_l_query(feature)
@ccall libcholmod.cholmod_l_query(feature::cholmod_query_t)::Bool

Check warning on line 176 in src/solvers/wrappers.jl

View check run for this annotation

Codecov / codecov/patch

src/solvers/wrappers.jl#L175-L176

Added lines #L175 - L176 were not covered by tests
end

struct cholmod_method_struct
lnz::Cdouble
fl::Cdouble
Expand Down Expand Up @@ -3343,19 +3364,19 @@

const CHOLMOD_LONG = 2

const CHOLMOD_DATE = "Mar 22, 2024"
const CHOLMOD_DATE = "June 20, 2024"

const CHOLMOD_MAIN_VERSION = 5

const CHOLMOD_SUB_VERSION = 2
const CHOLMOD_SUB_VERSION = 3

const CHOLMOD_SUBSUB_VERSION = 1
const CHOLMOD_SUBSUB_VERSION = 0

SUITESPARSE_VER_CODE(main, sub) = main * 1000 + sub

CHOLMOD_VER_CODE(main, sub) = SUITESPARSE_VER_CODE(main, sub)

const CHOLMOD_VERSION = CHOLMOD_VER_CODE(5, 2)
const CHOLMOD_VERSION = CHOLMOD_VER_CODE(5, 3)

const _FILE_OFFSET_BITS = 64

Expand Down Expand Up @@ -3383,23 +3404,23 @@

const SUITESPARSE_TIME = SuiteSparse_time()

const SUITESPARSE_DATE = "Mar 22, 2024"
const SUITESPARSE_DATE = "Oct 10, 2024"

const SUITESPARSE_MAIN_VERSION = 7

const SUITESPARSE_SUB_VERSION = 7
const SUITESPARSE_SUB_VERSION = 8

const SUITESPARSE_SUBSUB_VERSION = 0
const SUITESPARSE_SUBSUB_VERSION = 3

const SUITESPARSE_VERSION = SUITESPARSE_VER_CODE(7, 7)
const SUITESPARSE_VERSION = SUITESPARSE_VER_CODE(7, 8)

function SUITESPARSE__VERCODE(main, sub, patch)
return (main * Culonglong(1000) + sub) * Culonglong(1000) + patch
end

const SUITESPARSE__VERSION = SUITESPARSE__VERCODE(7, 7, 0)
const SUITESPARSE__VERSION = SUITESPARSE__VERCODE(7, 8, 3)

const CHOLMOD__VERSION = SUITESPARSE__VERCODE(5, 2, 1)
const CHOLMOD__VERSION = SUITESPARSE__VERCODE(5, 3, 0)

const CHOLMOD_DEVICE_SUPERNODE_BUFFERS = 6

Expand Down Expand Up @@ -3541,19 +3562,19 @@

const SPQR_RTX_EQUALS_ETB = 3

const SPQR_DATE = "Mar 22, 2024"
const SPQR_DATE = "June 20, 2024"

const SPQR_MAIN_VERSION = 4

const SPQR_SUB_VERSION = 3

const SPQR_SUBSUB_VERSION = 3
const SPQR_SUBSUB_VERSION = 4

SPQR_VER_CODE(main, sub) = SUITESPARSE_VER_CODE(main, sub)

const SPQR_VERSION = SPQR_VER_CODE(4, 3)

const SPQR__VERSION = SUITESPARSE__VERCODE(4, 3, 3)
const SPQR__VERSION = SUITESPARSE__VERCODE(4, 3, 4)

const AMD_CONTROL = 5

Expand Down Expand Up @@ -3603,37 +3624,37 @@

const AMD_OK_BUT_JUMBLED = 1

const AMD_DATE = "Mar 22, 2024"
const AMD_DATE = "June 20, 2024"

const AMD_MAIN_VERSION = 3

const AMD_SUB_VERSION = 3

const AMD_SUBSUB_VERSION = 2
const AMD_SUBSUB_VERSION = 3

AMD_VERSION_CODE(main, sub) = SUITESPARSE_VER_CODE(main, sub)

const AMD_VERSION = AMD_VERSION_CODE(3, 3)

const AMD__VERSION = SUITESPARSE__VERCODE(3, 3, 2)
const AMD__VERSION = SUITESPARSE__VERCODE(3, 3, 3)

const UMFPACK_INFO = 90

const UMFPACK_CONTROL = 20

const UMFPACK_DATE = "Mar 22, 2024"
const UMFPACK_DATE = "Sept 23, 2024"

const UMFPACK_MAIN_VERSION = 6

const UMFPACK_SUB_VERSION = 3

const UMFPACK_SUBSUB_VERSION = 3
const UMFPACK_SUBSUB_VERSION = 5

UMFPACK_VER_CODE(main, sub) = SUITESPARSE_VER_CODE(main, sub)

const UMFPACK_VER = UMFPACK_VER_CODE(6, 3)

const UMFPACK__VERSION = SUITESPARSE__VERCODE(6, 3, 3)
const UMFPACK__VERSION = SUITESPARSE__VERCODE(6, 3, 5)

const UMFPACK_STATUS = 0

Expand Down
Loading