Two new features
-
Variable-size batched solver interface.
Using the batch feature in
EXAMPLE/pddrive3d.c
- Turn it on from the command line with
-b <N>:mpirun -n <P> ./pddrive3d -b <N> <matrix-file>. This sets the localbatchCountvariable viacase 'b': batchCount = atoi(*cpp);in the arg-parsing loop. - What "batch" means here: the driver solves
batchCountindependent sparse linear systems in one call, instead of one. The sizes and sparsity patterns of the systems in the batch can be different. - The batch path is a separate branch in
main(), guarded byif ( batchCount > 0 ) { ... } else { ...normal path... }. It builds oneSuperMatrixhandle per batch entry (handle_t *SparseMatrix_handles, sizebatchCount), then calls a single batched solver,pdgssvx3d_csc_batch(), instead ofpdgssvx3d(). - Every per-system quantity is arrays of length
batchCount, not scalars: right-hand sides (RHSptr,ldRHS), solutions (Xptr,ldX), equilibration scale factors (ReqPtr,CeqPtr,DiagScale), row/column pivots (RpivPtr,CpivPtr), and backward errors (Berrs). If you adapt this pattern for your own matrices, you allocate and fill one slot per system in each of these arrays before callingpdgssvx3d_csc_batch(). - Results come back per-system: after the call,
Berrs[d][0]holds the backward error for systemd, and the driver prints it in a loop (for (int d = 0; d < batchCount; ++d) printf(...)). Remember to free each per-system allocation (as the driver does) before freeing the outer arrays.
- GPU-resident sparse triangular solvers.
Using the GPU-resident-solve (GPURES) feature in
EXAMPLE/pddrive3d.c
- Turn it on from the command line with
-g <0|1>:mpirun -n <P> ./pddrive3d -r <nprow> -c <npcol> -d <npdep> -g 1 <matrix-file>. This sets the localgpuresvariable viacase 'g': gpures = atoi(*cpp);in the arg-parsing loop; the default is-1(unset). - What it changes: normally the right-hand side
blives on the host and is copied to/from the GPU internally on every call. Withoptions.GPURES == YES, the driver instead movesbto the GPU once, up front, and handspdgssvx3d()the device pointer directly — the whole solve (equilibration, permutation, triangular solve) keeps the vector resident on the GPU instead of round-tripping through the host each step. - This needs a build with GPU support: the GPURES code paths are wrapped in
#ifdef GPU_ACC. If you request-g 1on a build compiled without GPU acceleration, the driver aborts:ABORT("GPURES requires GPU_ACC in pddrive3d.");— so make sure SuperLU_DIST was built withTPL_ENABLE_CUDALIB/TPL_ENABLE_HIPLIB(or the equivalent GPU option) turned on. - The pattern to follow if you adapt this: before the solve, allocate a device buffer and copy
bonto it (gpuMalloc+gpuMemcpy(..., gpuMemcpyHostToDevice)); callpdgssvx3d()passing that device pointer (d_b) instead of the host array; after the solve, copy the result back to the host buffer (gpuMemcpy(..., gpuMemcpyDeviceToHost)) and free the device buffer (gpuFree) —bon the host then holds the solution exactly as it would in the non-GPURES path. - Everything else about the run stays the same: the process grid (
-r/-c/-d), matrix input, right-hand-side setup, and result checking are unchanged —-gonly controls whether the RHS/solution vector is kept resident on the GPU during the solve rather than shuttled back and forth.
What's Changed
- Merge variable-sized batched branch to master by @SidShi in #213
- Skip OpenMP taskloop constructs when using the Fujitsu C compiler by @jamtrott in #214
- ROCm versioning fix by @Heinrich-BR in #215
- fix compile errors with gcc-16 by @balay in #219
- Merge master into amd_batch by @xiaoyeli in #221
- Merge gpures_solve into master (GPU-resident solve) by @xiaoyeli in #222
- Fix Windows/MSVC build issues by @jhale in #225
- Fix pkg-config Libs.private using un-flattened, semicolon-joined variables by @jhale in #224
New Contributors
- @Heinrich-BR made their first contribution in #215
- @jhale made their first contribution in #225
Full Changelog: v9.2.1...v9.3.0