@@ -1258,25 +1258,33 @@ end
1258
1258
1259
1259
# # Compute that symbolic factorization only
1260
1260
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
1263
1265
1264
1266
sA = unsafe_load (pointer (A))
1265
1267
sA. stype == 0 && throw (ArgumentError (" sparse matrix is not symmetric/Hermitian" ))
1266
1268
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
1273
1282
return analyze_p (A, Ti[p- 1 for p in perm])
1274
1283
end
1275
- else
1276
- return analyze_p (A, Ti[p- 1 for p in perm])
1277
1284
end
1278
1285
end
1279
1286
end
1287
+
1280
1288
end
1281
1289
1282
1290
function cholesky! (F:: Factor{Tv} , A:: Sparse{Tv} ;
0 commit comments