Migrating from CUDSS.jl

The handle API keeps the names of the parameters and phases of CUDSS.jl; the functions are renamed after Julia conventions.

CUDSS.jlSparseDirectSolver.jl
CudssSolver(A, structure, view)DirectSolver(A, structure, view)
cudss(phase, solver, x, b)execute!(phase, solver, x, b)
cudss_set(solver, name, value)setparam!(solver, name, value)
cudss_get(solver, name)getparam(solver, name) (or getparam! into a buffer)
cudss_update(solver, A)update!(solver, A); with CUDA.jl ≥ 6.5 both packages export update!, so write using SparseDirectSolver: update!
CudssMatrix (sparse), CudssMatrix (dense), CudssConfigCSR, MatrixDescriptor, Options
CudssDatano public counterpart: the data object lives inside the DirectSolver
cholesky, ldlt, lu on CuSparseMatrixCSRthe same functions, see LinearAlgebra interface

Structures ("G", "S", "H", "SPD", "HPD"), views ('L', 'U', 'F'), phase strings and parameter strings are identical, so a port is mostly a renaming:

# CUDSS.jl
solver = CudssSolver(A_gpu, "S", 'L')
cudss_set(solver, "pivot_threshold", 0.01)
cudss("analysis", solver, x_gpu, b_gpu)
cudss("factorization", solver, x_gpu, b_gpu)
inertia = cudss_get(solver, "inertia")
cudss("solve", solver, x_gpu, b_gpu)

# SparseDirectSolver.jl
solver = DirectSolver(A_gpu, "S", 'L')
setparam!(solver, "pivot_threshold", 0.01)
execute!("analysis", solver, x_gpu, b_gpu)
execute!("factorization", solver, x_gpu, b_gpu)
inertia = getparam(solver, "inertia")
execute!("solve", solver, x_gpu, b_gpu)

Differences

  • cuDSS parameters that are not implemented are not silently dropped: the multi-device parameters raise a NotSupportedError, the hybrid memory and execution modes warn once and are ignored; see How unimplemented parameters are handled.
  • "factorization_alg" and "solve_alg" keep their spellings but select this package's own algorithms (see SparseDirectSolver.FactorizationAlg and SparseDirectSolver.SolveAlg).
  • Global pivoting (pivot_type 'C'/'R') is not supported: pivots are chosen inside each front, and failed pivots are perturbed rather than delayed.
  • Extensions beyond cuDSS: pivot_sign, pivot_stats, ir_mode = "fgmres", pivot_pairs, amalgamation, schedule (EXTRA_PARAMETERS).
  • The matrix and the vectors may live on any KernelAbstractions backend, not only CUDA.