Closed anyzelman closed 7 months ago
Optional feature: split preconditioners for use with ILU, I think @djelovina's use case was for that particular one, or does it make use of the standard preconditioning now provided (modulo testing)?
Current status: all passes, except preconditioned CG with bsp1d and hybrid backends due to a segfault. Given it only appears for the preconditioned case, the error should be rather isolated (perhaps it's in the build of the diagonal vector?)
Current status: all passes, except preconditioned CG with bsp1d and hybrid backends due to a segfault. Given it only appears for the preconditioned case, the error should be rather isolated (perhaps it's in the build of the diagonal vector?)
I suspect it's a global/local index translation issue -- the eWiseLambda on matrices gives back global indices (at least that's what's specified), while the bracket-operator may expect local indices (which would be an error). If this is indeed the case, then a second bugfix that would be piggy-backing on this MR is that eWiseLambda on vectors then apparently does not use global indices (for bsp1d and hybrid).
Retarget to v0.8 due to the bugfixes this MR contains
Running unit and smoke tests, then will move to the last TODO
All tests OK on x86 and ARM at this point
This one seems ready, I'll try to test the KML entry point manually (and will run automated tests simultaneously)
Manual test of entry point also passes. Waiting review/approve from @alberto-scolari before merge~
I'm happy again:) Concept release notes:
This MR resolves a feature request for a preconditioned CG accessible via a transition path. To enable this feature, this MR adds the following:
grb::algorithms::conjugate_gradient
for non-preconditioned CG, and grb::algorithms::preconditioned_conjugate_gradient
for PCG. They are kept separate since PCG requires one more work-space vector. The preconditioner is given as an std::function
that returns a grb::RC
, takes an output grb::Vector
and an input const grb::Vector
. Given it's an std::function
, any state required by the preconditioner can be embedded into the function (there is no additional argument required for this).int
where 0
indicates successful application of the preconditioner. The first argument is a raw output vector, the second a const input vector, and the third a void *
argument to any state required by the preconditioner.The MR also expands and improves documentation regarding the transition path libraries.
This MR adds the following smoke test:
double
) and the complex case. Note that for the complex case, Jacobi preconditioning may not be a good choice; it is not encouraged to use outside of smoke testing.To enable the smoke tests, this MR additionally includes the following bugfixes:
grb::set(BSP1D,hybrid)
erroneously relied on local indexing of eWiseLambda.As always and additionally, the MR include code style fixes in both related and unrelated files.
CI and tests OK
Initial jab at adding standard preconditioning to the ALP CG. The following TODOs remain:
(Note that the latter point corresponds to the actual feature request)
Bugfixes in this MR:
Tag @alberto-scolari