Skip to content

Expose ILU0 numeric boost configuration for CUDA and HIP - #466

Merged
shakedregev merged 7 commits into
developfrom
kakeru/add-setter-boost
Aug 12, 2026
Merged

Expose ILU0 numeric boost configuration for CUDA and HIP#466
shakedregev merged 7 commits into
developfrom
kakeru/add-setter-boost

Conversation

@kakeueda

@kakeueda kakeueda commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

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 existing setCliParam() 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

./build/examples/sysGmres.exe \
  -m ~/tmp/matrixmarket/fidap012.mtx \
  -r ~/tmp/matrixmarket/fidap012_rhs1.mtx \
  -b cuda \
  -i fgmres

The number of iterations changed as follows:

Boost value Number of FGMRES iterations Final relative residual
1e-6 1121 9.9392e-13
1e-7 143 9.2850e-13
1e-8 143 9.2850e-13

Some problems are sensitive to this value.

Proposed changes

  • Added a zero_diagonal parameter to the CPU ILU0 solver through the existing setCliParam() interface.
  • Added boost_tolerance and boost_value parameters to the CUDA/HIP ILU0 solvers through the existing setCliParam() interface.
  • Added SystemSolver::getPreconditionerSolver() so users can configure ILU0 numerical stabilization parameters through SystemSolver.
  • Updated testSysGmres and MatrixFactorizationTests to configure ILU0 parameters.
  • Fixed misplaced entries in CHANGELOG.md.

Checklist

  • All tests pass (make test and make test_install per testing instructions). Code tested on
    • CPU backend
    • CUDA backend
    • HIP backend
  • I have manually run the non-experimental examples and verified that residuals are close to machine precision. (In your build directory run: ./examples/<your_example>.exe -h to get instructions how to run examples). Code tested on:
    • CPU backend
    • CUDA backend
    • HIP backend
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows Re::Solve style guidelines.
  • [N/A] There are unit tests for the new code.
  • The new code is documented.
  • [N/A] The feature branch is rebased with respect to the target branch.
  • I have updated CHANGELOG.md to reflect the changes in this PR. If this is a minor PR that is part of a larger fix already included in the file, state so.

@kakeueda

kakeueda commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

I’d appreciate any help with HIP testing

@tamar-dewilde tamar-dewilde left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on HIP. All 64 tests and install validation passed.

Comment thread resolve/SystemSolver.hpp

LinSolverDirect& getFactorizationSolver();
LinSolverDirect& getRefactorizationSolver();
LinSolverDirect& getPreconditionerSolver();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kakeueda kakeueda Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@kakeueda kakeueda changed the title Expose CUDA ILU0 boost configuration Expose ILU0 numeric boost configuration for CUDA and HIP Aug 7, 2026
@kakeueda

kakeueda commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

One remaining inconsistency is that CPU ILU0 still uses zero_diagonal for both the zero-pivot threshold and replacement value. Separating them also requires changing CPU ILU0’s numerical behavior. I left it out of this PR.

@kakeueda
kakeueda requested a review from tamar-dewilde August 7, 2026 12:28
@shakedregev

Copy link
Copy Markdown
Collaborator

You showed what the iteration number change to, what did it change from?

@shakedregev shakedregev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, neeed to test.

@kakeueda

kakeueda commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@shakedregev With the existing hard-coded settings (boost_tolerance = boost_value = 1e-6), the iteration count was 1121. Setting both parameters to either 1e-7 or 1e-8 reduced it to 143 iterations.

My Navier–Stokes FEM system also converges poorly with the default 1e-6, I suspect this value may be particularly problematic for some incompressible-flow systems (the system shown above comes from the Stokes equations as well).

@shakedregev

Copy link
Copy Markdown
Collaborator

Oh, now I understand.

@shakedregev

shakedregev commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Funnily my HIP test worked, but CUDA did not.
(The normal tests pass on both platforms).

./examples/sysGmres.exe   -m ../matrixmarket/fidap012.mtx   -r ../matrixmarket/fidap012_rhs1.mtx   -b cuda -t 1e-6
Matrix file: ../matrixmarket/fidap012.mtx
RHS file: ../matrixmarket/fidap012_rhs1.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
[ERROR] CUDA error in function cudaMemcpy(dst, src, sizeof(T) * n, cudaMemcpyDeviceToHost) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:133, error# 716
[ERROR] Dot product failed with error code 15
[ERROR] CUDA error in function cudaMemcpy(dst, src, sizeof(T) * n, cudaMemcpyHostToDevice) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:167, error# 716
[ERROR] scal returned error code 13
[ERROR] CUDA error in function cudaMemcpy(dst, src, sizeof(T) * n, cudaMemcpyDeviceToDevice) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:150, error# 716
[ERROR] Dot product failed with error code 15
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
solver.solve returned status: 0
	 Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
	 Final relative residual norm   ||b-A*x||/||b|| : 0.0000000000000000e+00
	 Number of iterations                           : 1
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716
[ERROR] CUDA error in function cudaFree(v) at /home/szb/ReSolve_dir/ReSolve/resolve/cuda/CudaMemory.hpp:43, error# 716


status_rocsparse_ = rocsparse_dcsrilu0_numeric_boost(workspace_->getRocsparseHandle(),
info_A_,
1,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kakeueda kakeueda Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kakeueda

kakeueda commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@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 -t is not currently a valid option for sysGmres, unless you added it locally for convenience. The relevant parameters are not yet consistent between the cpu (zero_diagonal) and device (boost_tolerance and boost_value), so this setting is not currently exposed as a command-line option.

Running the same command but without -t, I got

ku@kakeru:~/dev/ReSolve$ ./build/examples/sysGmres.exe   -m ~/tmp/matrixmarket/fidap012.mtx   -r ~/tmp/matrixmarket/fidap012_rhs1.mtx -b cuda   
Matrix file: /home/ku/tmp/matrixmarket/fidap012.mtx
RHS file: /home/ku/tmp/matrixmarket/fidap012_rhs1.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 1.0808156599918938e-12
         Number of iterations                           : 966

@shakedregev

Copy link
Copy Markdown
Collaborator

@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 -t is not currently a valid option for sysGmres, unless you added it locally for convenience. The relevant parameters are not yet consistent between the cpu (zero_diagonal) and device (boost_tolerance and boost_value), so this setting is not currently exposed as a command-line option.

Running the same command but without -t, I got

ku@kakeru:~/dev/ReSolve$ ./build/examples/sysGmres.exe   -m ~/tmp/matrixmarket/fidap012.mtx   -r ~/tmp/matrixmarket/fidap012_rhs1.mtx -b cuda   
Matrix file: /home/ku/tmp/matrixmarket/fidap012.mtx
RHS file: /home/ku/tmp/matrixmarket/fidap012_rhs1.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 1.0808156599918938e-12
         Number of iterations                           : 966

How do you set the boost value then?

@shakedregev

shakedregev commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

I get the same error on develop. Let me know if you want me to try and fix this or if you want to try some other way.

@kakeueda

Copy link
Copy Markdown
Collaborator Author

How do you set the boost value then?

I forgot to mention this - I tested these values by temporarily adding setCliParam() to sysGmres.cpp.

Added command-line options (luckily no option name collisions yet)

-n sets whether numeric boost is enabled, -t sets the boost tolerance, and -v sets the boost value. The cpu uses -z (zero_diagonal_) for both the tolerance and value. Maybe we can split these into separate -t and -v options in a follow up PR.

ku@kakeru:~/dev/ReSolve$  ./build/examples/sysGmres.exe \
                       -m /home/ku/tmp/matrixmarket/fidap012.mtx \
                       -r /home/ku/tmp/matrixmarket/fidap012_rhs1.mtx \
                       -b cuda \
                       -i fgmres \
                       -n yes \
                       -t 1e-7 \
                       -v 1e-7
Matrix file: /home/ku/tmp/matrixmarket/fidap012.mtx
RHS file: /home/ku/tmp/matrixmarket/fidap012_rhs1.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.2849901493455225e-13
         Number of iterations                           : 143
ku@kakeru:~/dev/ReSolve$ 
ku@kakeru:~/dev/ReSolve$ ./build/examples/sysGmres.exe \
                       -m /home/ku/tmp/matrixmarket/fidap012.mtx \
                       -r /home/ku/tmp/matrixmarket/fidap012_rhs1.mtx \
                       -b cuda \
                       -i fgmres \
                       -n yes \
                       -t 1e-6 \
                       -v 1e-6
Matrix file: /home/ku/tmp/matrixmarket/fidap012.mtx
RHS file: /home/ku/tmp/matrixmarket/fidap012_rhs1.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.9392435281287791e-13
         Number of iterations                           : 1121

@kakeueda

Copy link
Copy Markdown
Collaborator Author

I get the same error on develop. Let me know if you want me to try and fix this or if you want to try some other way.

If you have time to look into it that would be really helpful, thank you!

@kakeueda kakeueda self-assigned this Aug 12, 2026
@kakeueda

Copy link
Copy Markdown
Collaborator Author

I get the same error on develop. Let me know if you want me to try and fix this or if you want to try some other way.

Thank you for looking into this. As an alternative test case I added a linear system from one of my Navier-Stokes FEM simulations to tests/functionality/data (in case fidap012 is triggering the CUDA error in your environment).

The system comes from an idealized numerical test simulating two-dimensional blood flow through a channel with an asymmetric stenosis. Solving this system gives a velocity field that looks like this

Velocity field Screenshot 2026-08-12 190949

It also shows similar sensitivity to the stabilization parameters. Could you try running sysGmres.exe with this system instead? I hope this one will work.

If you still encounter the CUDA error, you can also check the parameter sensitivity using the CPU backend with -z.

Here are the results I get

CUDA, -t 1e-5 -v 1e-5
ku@kakeru:~/dev/ReSolve$ ./build/examples/sysGmres.exe \
  -m tests/functionality/data/matrix_NavierStokes_FEM.mtx \
  -r tests/functionality/data/rhs_NavierStokes_FEM.mtx \
  -b cuda \
  -i fgmres \
  -n yes \
  -t 1e-5 \
  -v 1e-5
Matrix file: tests/functionality/data/matrix_NavierStokes_FEM.mtx
RHS file: tests/functionality/data/rhs_NavierStokes_FEM.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.8053055603214492e-13
         Number of iterations                           : 2462
CUDA, -t 1e-6 -v 1e-6
ku@kakeru:~/dev/ReSolve$ ./build/examples/sysGmres.exe \
  -m tests/functionality/data/matrix_NavierStokes_FEM.mtx \
  -r tests/functionality/data/rhs_NavierStokes_FEM.mtx \
  -b cuda \
  -i fgmres \
  -n yes \
  -t 1e-6 \
  -v 1e-6
Matrix file: tests/functionality/data/matrix_NavierStokes_FEM.mtx
RHS file: tests/functionality/data/rhs_NavierStokes_FEM.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.0792753321891880e-13
         Number of iterations                           : 210
CUDA, -t 1e-7 -v 1e-7
ku@kakeru:~/dev/ReSolve$  ./build/examples/sysGmres.exe \
  -m tests/functionality/data/matrix_NavierStokes_FEM.mtx \
  -r tests/functionality/data/rhs_NavierStokes_FEM.mtx \
  -b cuda \
  -i fgmres \
  -n yes \
  -t 1e-7 \
  -v 1e-7
Matrix file: tests/functionality/data/matrix_NavierStokes_FEM.mtx
RHS file: tests/functionality/data/rhs_NavierStokes_FEM.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 8.4190964879869666e-13
         Number of iterations                           : 159
CPU, -z 1e-5 (took a little while to complete)
ku@kakeru:~/dev/ReSolve$ ./build/examples/sysGmres.exe \
  -m tests/functionality/data/matrix_NavierStokes_FEM.mtx \
  -r tests/functionality/data/rhs_NavierStokes_FEM.mtx \
  -b cpu \
  -i fgmres \
  -z 1e-5 
Matrix file: tests/functionality/data/matrix_NavierStokes_FEM.mtx
RHS file: tests/functionality/data/rhs_NavierStokes_FEM.mtx
sysGmres with CPU backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 5.6027246946700679e-12
         Number of iterations                           : 2500
CPU, -z 1e-6
ku@kakeru:~/dev/ReSolve$  ./build/examples/sysGmres.exe \
  -m tests/functionality/data/matrix_NavierStokes_FEM.mtx \
  -r tests/functionality/data/rhs_NavierStokes_FEM.mtx \
  -b cpu \
  -i fgmres \
  -z 1e-6 
Matrix file: tests/functionality/data/matrix_NavierStokes_FEM.mtx
RHS file: tests/functionality/data/rhs_NavierStokes_FEM.mtx
sysGmres with CPU backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.8350185404470242e-13
         Number of iterations                           : 247
CPU, -z 1e-7
ku@kakeru:~/dev/ReSolve$ ./build/examples/sysGmres.exe \
  -m tests/functionality/data/matrix_NavierStokes_FEM.mtx \
  -r tests/functionality/data/rhs_NavierStokes_FEM.mtx \
  -b cpu \
  -i fgmres \
  -z 1e-7 
Matrix file: tests/functionality/data/matrix_NavierStokes_FEM.mtx
RHS file: tests/functionality/data/rhs_NavierStokes_FEM.mtx
sysGmres with CPU backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 8.4192022523064318e-13
         Number of iterations                           : 159

I added this system mainly for testing, so let me know if you would prefer not to keep it.

@tamar-dewilde

Copy link
Copy Markdown
Collaborator

I tested both the original fidap012 case and the added Navier-Stokes system on CUDA. I was not able to reproduce the CUDA error on my machine.

My environment is:

  • Ubuntu 22.04.5 LTS
  • GCC 11.4.0
  • CUDA Toolkit 12.8
  • NVIDIA driver 572.42
  • NVIDIA GeForce RTX 2060 with Max-Q Design (compute capability 7.5)

This is not the same environment as the system where the CUDA error was observed, so I can only confirm that I was unable to reproduce it on my configuration.

I also verified that all ReSolve libraries were being loaded from the current PR build (a5d9e3a).

For the original fidap012 case from #468, I get

CUDA, default settings
tdewilde@TamarROG:~/hiop_work/resolve-pr466-cuda$ ./build/examples/sysGmres.exe \
  -m ~/tmp/matrixmarket/fidap012.mtx \
  -r ~/tmp/matrixmarket/fidap012_rhs1.mtx \
  -b cuda \
  -i fgmres
Matrix file: /home/tdewilde/tmp/matrixmarket/fidap012.mtx
RHS file: /home/tdewilde/tmp/matrixmarket/fidap012_rhs1.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.9414743316942403e-13
         Number of iterations                           : 1121
CUDA, -t 1e-6 -v 1e-6
tdewilde@TamarROG:~/hiop_work/resolve-pr466-cuda$ ./build/examples/sysGmres.exe \
  -m ~/tmp/matrixmarket/fidap012.mtx \
  -r ~/tmp/matrixmarket/fidap012_rhs1.mtx \
  -b cuda \
  -i fgmres \
  -n yes \
  -t 1e-6 \
  -v 1e-6
Matrix file: /home/tdewilde/tmp/matrixmarket/fidap012.mtx
RHS file: /home/tdewilde/tmp/matrixmarket/fidap012_rhs1.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.9414743316942403e-13
         Number of iterations                           : 1121
CUDA, -t 1e-7 -v 1e-7
tdewilde@TamarROG:~/hiop_work/resolve-pr466-cuda$ ./build/examples/sysGmres.exe \
  -m ~/tmp/matrixmarket/fidap012.mtx \
  -r ~/tmp/matrixmarket/fidap012_rhs1.mtx \
  -b cuda \
  -i fgmres \
  -n yes \
  -t 1e-7 \
  -v 1e-7
Matrix file: /home/tdewilde/tmp/matrixmarket/fidap012.mtx
RHS file: /home/tdewilde/tmp/matrixmarket/fidap012_rhs1.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.3118356485938196e-13
         Number of iterations                           : 143

I also get very similar results with the added Navier-Stokes system:

CUDA, -t 1e-5 -v 1e-5
tdewilde@TamarROG:~/hiop_work/resolve-pr466-cuda$ ./build/examples/sysGmres.exe \
  -m tests/functionality/data/matrix_NavierStokes_FEM.mtx \
  -r tests/functionality/data/rhs_NavierStokes_FEM.mtx \
  -b cuda \
  -i fgmres \
  -n yes \
  -t 1e-5 \
  -v 1e-5
Matrix file: tests/functionality/data/matrix_NavierStokes_FEM.mtx
RHS file: tests/functionality/data/rhs_NavierStokes_FEM.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.7453546303917556e-13
         Number of iterations                           : 2462
CUDA, -t 1e-6 -v 1e-6
tdewilde@TamarROG:~/hiop_work/resolve-pr466-cuda$ ./build/examples/sysGmres.exe \
  -m tests/functionality/data/matrix_NavierStokes_FEM.mtx \
  -r tests/functionality/data/rhs_NavierStokes_FEM.mtx \
  -b cuda \
  -i fgmres \
  -n yes \
  -t 1e-6 \
  -v 1e-6
Matrix file: tests/functionality/data/matrix_NavierStokes_FEM.mtx
RHS file: tests/functionality/data/rhs_NavierStokes_FEM.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 9.0792116342010696e-13
         Number of iterations                           : 210
CUDA, -t 1e-7 -v 1e-7
tdewilde@TamarROG:~/hiop_work/resolve-pr466-cuda$ ./build/examples/sysGmres.exe \
  -m tests/functionality/data/matrix_NavierStokes_FEM.mtx \
  -r tests/functionality/data/rhs_NavierStokes_FEM.mtx \
  -b cuda \
  -i fgmres \
  -n yes \
  -t 1e-7 \
  -v 1e-7
Matrix file: tests/functionality/data/matrix_NavierStokes_FEM.mtx
RHS file: tests/functionality/data/rhs_NavierStokes_FEM.mtx
sysGmres with CUDA backend
solver.setMatrix returned status: 0
solver.preconditionerSetup returned status: 0
solver.solve returned status: 0
         Initial relative residual norm ||b-A*x||/||b|| : 1.0000000000000000e+00
         Final relative residual norm   ||b-A*x||/||b|| : 8.4190597810832188e-13
         Number of iterations                           : 159

@shakedregev shakedregev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass and example seems to work on multiple platforms except mine.

@shakedregev
shakedregev merged commit 4d13cf1 into develop Aug 12, 2026
6 checks passed
@tamar-dewilde

Copy link
Copy Markdown
Collaborator

Just to double check, I also retested on my new CUDA machine and got the same passing results for both the fidap012 and Navier-Stokes cases.

My environment is:

Ubuntu 24.04.4 LTS
GCC 13.3.0
CUDA Toolkit 12.8
NVIDIA driver 577.05
NVIDIA GeForce RTX 5090 Laptop GPU (compute capability 12.0)

I was again unable to reproduce the CUDA error.

@kakeueda
kakeueda deleted the kakeru/add-setter-boost branch August 12, 2026 22:33
andrewxu319 pushed a commit that referenced this pull request Aug 13, 2026
* Expose CUDA ILU0 boost configuration

* Update CHANGELOG.md

* Add CLI parameter support

* Split GPU ILU0 numeric boost configuration

* Rename numeric boost parameters

* Add ILU0 boost options to sysGmres

* Add Navier-Stokes FEM system test data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants