Repository navigation
Releases: cpmech/algebra_linear
Releases · cpmech/algebra_linear
Release list
2.1.1
2.1.1
Performance and correctness. The library API is unchanged from 2.1.0: no signature moved, so this is a
drop-in update.
Performance
- Small matrix products no longer pack a megabyte.
gemm_coreallocated its packing panels at the
largest supported block -- 128x256 plus 256x256f64, 768 kB zeroed -- on every call, including the
3x8 by 8x3 product of seventy-two multiplications that element assembly makes 160 times per step.
Below 1024 multiplications the product is now computed directly, and above that the panels are sized
by the block in use. A 3x8 by 8x3 product went from 8 600 ns to 60 ns, a 24x24 product to
798 ns (34.7 GFLOP/s), and 500x500 is unchanged at 6.33 ms (39.5 GFLOP/s). - The supernodal front eliminates down the columns. The panel is column-major and the update
walked its rows, one cache miss per element. Swapping the loops took the front factorization on a
192-dof lattice from 2.989 ms to 0.633 ms, which is what let the supernodal path overtake the
simplicial one.
Fixed
- The AMG hierarchy builds when a row has no diagonal entry. A structural matrix may have one: a
constrained dof, a pure drift row. The smoother then divided by zero and the prolongator weighted by
it. The hierarchy's own copies now carry a unit diagonal where the diagonal is exactly zero (a full
diagonal is still shared, not copied), and a coarsest operator that comes out semi-definite is
factorized with a relative diagonal shift between 1e-12 and 1e-6 of its largest entry. A coarsest
level that still will not factor now relaxes instead of failing the solve. krylov_solvesolves and measures the caller's matrix. The fill above had been inserted into
level 0 while the Krylov operator came from the hierarchy, so the method solved a different system
than the caller handed in: on the benchmark,Goodwin_040reported a relative residual of 7.8e-11
with a solution 68 times away from the reference (123x onGoodwin_071, 220x onGoodwin_127).
The operator is now the caller's matrix -- the hierarchy keeps its adjusted copies for the
preconditioner only -- and the residual is measured against it. The cost is visible in the iteration
count: 430 instead of 74 onGoodwin_040, and the honest BiCGStab yield on the 33 real matrices is
12, not the 13 the defective path reported.
Documentation
- The supernodal factorization was described as slower and experimental. It is faster on the banded
and lattice patterns that dominate element assembly (0.604 ms against 1.248 ms), so the module
documentation now carries that measurement instead of the claim, and explains why the two callers
pass different flop thresholds (LuMethod::auto()40.0,russell_sparse1.0). - The README gains a Performance section with the numbers above, and an Iterative solvers section with
the yield measured on 33 real SuiteSparse matrices and the matrices where that path earns its place:
atmosmoddandatmosmodldo not fit in memory for UMFPACK and take 7.78 s and 5.70 s with
BiCGStab, against 46.2 s and 40.9 s with MUMPS.
Testing
282 tests, 2 ignored, including a coarse operator built from a dependent row and a matrix with an
isolated unknown.
Measurements
Arch, Intel i9-13900KF, release builds. The solver numbers come from
benchmark-russell; the element-assembly numbers come
from pmsim's stress-strain driver.
2.1.0
2.1.0
Documentation and test wiring. The library API is unchanged from 2.0.0.
README
- Describes the 2.0 array-based API:
SparseLuover caller-owned CSC arrays, and
amg_setup/krylov_solveover CSR arrays. - Provenance moves into two bullets: the sparse LU and its COLAMD ordering come from faer (MIT),
sparse::amgclfrom AMGCL (MIT). - Adds a
SparseLuexample that reuses one analysis across value updates, and states that at three
unknowns the AMGCL hierarchy is a single level the coarse solve handles. - The conventions name the error type of each half (
LapackError,SparseError,amgcl::Error). - The performance table calls the
russell_sparsesolverDirect, which is its name from
russell_sparse5.0; the numbers were measured with 4.x, where it was calledNative.
Testing
src/lib.rsexposesREADME.mdthrough#[doc = include_str!(...)]on a#[cfg(doctest)]type,
socargo testruns both of the page's examples as doctests.- The CI
Teststep runscargo testinstead ofcargo test --lib, so those examples cannot rot
unnoticed.
Full changelog: v2.0.0...v2.1.0