Skip to content

Commit 2d762b3

Browse files
authored
Manual commit for PR #550 to backport to 1.10 (#577)
* Disable nested dissection (from #550) * Update CI for Julia 1.10 --------- Co-authored-by: Viral B. Shah <[email protected]>
1 parent d2a80a6 commit 2d762b3

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,26 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
version:
25-
- '~1.10.0-0'
25+
- '1.10'
2626
os:
2727
- ubuntu-latest
28-
- macOS-latest
2928
- windows-latest
3029
arch:
3130
- x64
32-
- x86
33-
exclude:
31+
include:
3432
- os: macOS-latest
33+
arch: aarch64
34+
version: '1.10'
35+
- os: ubuntu-latest
3536
arch: x86
37+
version: '1.10'
3638
steps:
37-
- uses: actions/checkout@v2
38-
- uses: julia-actions/setup-julia@v1
39+
- uses: actions/checkout@v4
40+
- uses: julia-actions/setup-julia@v2
3941
with:
4042
version: ${{ matrix.version }}
4143
arch: ${{ matrix.arch }}
42-
- uses: actions/cache@v1
44+
- uses: actions/cache@v4
4345
env:
4446
cache-name: cache-artifacts
4547
with:
@@ -55,17 +57,18 @@ jobs:
5557
env:
5658
SPARSEARRAYS_AQUA_TEST: true
5759
- uses: julia-actions/julia-processcoverage@v1
58-
- uses: codecov/codecov-action@v1
60+
- uses: codecov/codecov-action@v4
5961
with:
6062
file: lcov.info
63+
token: ${{ secrets.CODECOV_TOKEN }}
64+
6165
docs:
6266
runs-on: ubuntu-latest
6367
steps:
6468
- uses: actions/checkout@v2
6569
- uses: julia-actions/setup-julia@latest
6670
with:
67-
# version: '1.6'
68-
version: 'nightly'
71+
version: '1.10'
6972
- name: Generate docs
7073
run: |
7174
julia --color=yes -e 'write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"3f01184e-e22b-5df5-ae63-d93ebab69eaf\"\n"));'

src/solvers/cholmod.jl

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,25 +1258,33 @@ end
12581258

12591259
## Compute that symbolic factorization only
12601260
function symbolic(A::Sparse{<:VTypes, Ti};
1261-
perm::Union{Nothing,AbstractVector{<:Integer}}=nothing,
1262-
postorder::Bool=isnothing(perm)||isempty(perm), userperm_only::Bool=true) where Ti
1261+
perm::Union{Nothing,AbstractVector{<:Integer}}=nothing,
1262+
postorder::Bool=isnothing(perm)||isempty(perm),
1263+
userperm_only::Bool=true,
1264+
nested_dissection::Bool=false) where Ti
12631265

12641266
sA = unsafe_load(pointer(A))
12651267
sA.stype == 0 && throw(ArgumentError("sparse matrix is not symmetric/Hermitian"))
12661268

1267-
@cholmod_param postorder = postorder begin
1268-
if perm === nothing || isempty(perm) # TODO: deprecate empty perm
1269-
return analyze(A)
1270-
else # user permutation provided
1271-
if userperm_only # use perm even if it is worse than AMD
1272-
@cholmod_param nmethods = 1 begin
1269+
# The default is to just use AMD. Use nested dissection only if explicitly asked for.
1270+
# https://github.com/JuliaSparse/SparseArrays.jl/issues/548
1271+
# https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/26ababc7f3af725c5fb9168a1b94850eab74b666/CHOLMOD/Include/cholmod.h#L555-L574
1272+
@cholmod_param nmethods = (nested_dissection ? 0 : 2) begin
1273+
@cholmod_param postorder = postorder begin
1274+
if perm === nothing || isempty(perm) # TODO: deprecate empty perm
1275+
return analyze(A)
1276+
else # user permutation provided
1277+
if userperm_only # use perm even if it is worse than AMD
1278+
@cholmod_param nmethods = 1 begin
1279+
return analyze_p(A, Ti[p-1 for p in perm])
1280+
end
1281+
else
12731282
return analyze_p(A, Ti[p-1 for p in perm])
12741283
end
1275-
else
1276-
return analyze_p(A, Ti[p-1 for p in perm])
12771284
end
12781285
end
12791286
end
1287+
12801288
end
12811289

12821290
function cholesky!(F::Factor{Tv}, A::Sparse{Tv};

0 commit comments

Comments
 (0)