Expose ILU0 numeric boost configuration for CUDA and HIP - #466
Conversation
|
I’d appreciate any help with HIP testing |
tamar-dewilde
left a comment
There was a problem hiding this comment.
Tested on HIP. All 64 tests and install validation passed.
|
|
||
| LinSolverDirect& getFactorizationSolver(); | ||
| LinSolverDirect& getRefactorizationSolver(); | ||
| LinSolverDirect& getPreconditionerSolver(); |
There was a problem hiding this comment.
The PR description says this getter lets users configure the numeric boost through SystemSolver. How should users call setZeroDiagonal() through it? The getter returns LinSolverDirect&, which does not declare that method, so the direct call does not compile.
I could only call the setter by including LinSolverDirectCuSparseILU0.hpp and casting the returned solver to that concrete type. Is that the intended use, or should LinSolverDirect provide a common way to access this setting? LinSolverDirectCpuILU0 already has the same setter.
There was a problem hiding this comment.
Thank you for pointing this out! I added the BOOST_TOLERANCE and BOOST_VALUE parameter IDs and the corresponding cli param settings so users can now configure the numeric boost through SystemSolver rather than casting it to a concrete type.
I also implemented numeric boost support for HIP since it was needed for the configuration test added to testSysGmres.cpp.
Can you test this again on HIP?
|
One remaining inconsistency is that CPU ILU0 still uses |
Description
The numeric boost tolerance and value in the CUDA ILU0 solver are hard-coded to
1e-6. This PR makes them configurable through the existingsetCliParam()interface.To see the effect of these values I tested the solver with FIDAP012 from the NIST Matrix Market, a nonsymmetric linear system arising from a fluid dynamics problem
The number of iterations changed as follows:
1e-69.9392e-131e-79.2850e-131e-89.2850e-13Some problems are sensitive to this value.
Proposed changes
zero_diagonalparameter to the CPU ILU0 solver through the existingsetCliParam()interface.boost_toleranceandboost_valueparameters to the CUDA/HIP ILU0 solvers through the existingsetCliParam()interface.SystemSolver::getPreconditionerSolver()so users can configure ILU0 numerical stabilization parameters throughSystemSolver.testSysGmresandMatrixFactorizationTeststo configure ILU0 parameters.CHANGELOG.md.Checklist
make testandmake test_installper testing instructions). Code tested on./examples/<your_example>.exe -hto get instructions how to run examples). Code tested on:-Wall -Wpedantic -Wconversion -Wextra.