Parameters
Parameters are set with setparam! and read with getparam (or getparam! into a preallocated buffer), with the parameter strings of CUDSS.jl. They come in three groups.
- Configuration parameters (
CONFIG_PARAMETERS, cuDSS'scudssConfigParam_t): algorithm choices and tolerances, read by the next phase that uses them. - Data parameters (
DATA_PARAMETERSandCUDSS08_DATA_PARAMETERS, cuDSS'scudssDataParam_t): inputs provided by the user (user_perm,user_schur_indices,user_host_interrupt, …) and outputs computed by the solver (info,inertia,diag,perm_row, …). - Extensions (
EXTRA_PARAMETERS): parameters cuDSS does not have, such aspivot_sign,pivot_stats,ir_modeandpivot_pairs.
Every parameter is validated when it is set: an unknown name raises an ArgumentError, a bad value an InvalidValueError, and a parameter that exists in cuDSS but is not implemented (the hybrid memory and multi-GPU modes, for example) a NotSupportedError.
using SparseDirectSolver
opts = Options(ir_n_steps = 2, pivot_threshold = 0.1)
getparam(opts, "ir_n_steps"), getparam(opts, "reordering_alg")(2, "default")Configuration parameters
The fields of Options with their defaults are listed in its docstring. The ones that matter most in practice:
| parameter | values | effect |
|---|---|---|
reordering_alg | "default", "algo1"–"algo5" | automatic (AMD or ND, whichever has the lower flops + 1e8 × supernodal schedule depth), AMD ("algo3"), nested dissection ("algo4"), natural ("algo5"); see SparseDirectSolver.ReorderingAlg |
factorization_alg | "default", "algo1", "algo2" | automatic, small-front kernels only, vendor dense calls for large fronts |
matching_alg | "default" (none), "algo1"–"algo6" | MC64 jobs 1–5 ("algo6": automatic) before the ordering |
pivot_type | 'A', 'N', 'D', 'L', 'B' | automatic, none, diagonal, local block, Bunch–Kaufman; global pivoting ('C', 'R') is not supported |
pivot_threshold | 0.0–1.0, default 0.01 | acceptance threshold of a pivot |
pivot_epsilon | default 1e-13 (Float64), 1e-5 (Float32) | tiny pivots are perturbed to this size |
solve_mode | 0, 1, 2 | solve with $A$, $A^T$ or $A^H$ |
ir_n_steps, ir_tol | integer, real | iterative refinement steps and early-exit tolerance |
ir_mode | "ir", "fgmres" | plain refinement or FGMRES (needs using Krylov) |
deterministic_mode | 0, 1 | 1 forbids the atomic forward solve |
schur_mode | 0, 1 | Schur complement mode |
Data parameters
The outputs and when they become available are tabulated in the docstring of getparam. For a uniform batch the per-factorization outputs are vectors with one entry per member.
Differences from cuDSS
"info"reports the original column of the first failed pivot.getparam!replaces the set-buffer-then-get protocol of cuDSS for vector outputs.pivot_signchooses the sign of the perturbation of each row, so that a perturbed KKT system keeps the inertia an interior-point method expects.pivot_statsreturns(npos, nneg, nzero, nperturbed, n2x2)in one read.