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 |
|
You showed what the iteration number change to, what did it change from? |
shakedregev
left a comment
There was a problem hiding this comment.
Looks good, neeed to test.
|
@shakedregev With the existing hard-coded settings ( My Navier–Stokes FEM system also converges poorly with the default |
|
Oh, now I understand. |
|
Funnily my HIP test worked, but CUDA did not. |
|
|
||
| status_rocsparse_ = rocsparse_dcsrilu0_numeric_boost(workspace_->getRocsparseHandle(), | ||
| info_A_, | ||
| 1, |
There was a problem hiding this comment.
Was it intentional to enable numeric boost by default on HIP here? I set this flag to 0 and reran the full HIP suite on Frontier, and all 64 tests still passed.
There was a problem hiding this comment.
I enabled it for consistency with cuda but I agree that we can leave the hip settings as they are since we haven’t encountered the same issue there. Still the same issue could surface on hip as we expand testing to a broader range of systems.
A better approach would be to make numeric boost configurable on both backends (disabled by default on hip and enabled on cuda) so users can turn regularization on or off as needed.
|
@shakedregev Interesting, I couldn’t reproduce that error on my side (RTX 5050 Laptop GPU, CUDA Toolkit 12.9, driver 595.79, GCC 13). Could you try the same command on the develop branch and let me know whether it still occurs? Just a quick note Running the same command but without -t, I got |
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.