Skip to content

Implement system solver class#86

Merged
pelesh merged 11 commits intodevelopfrom
system-solver-dev
Dec 5, 2023
Merged

Implement system solver class#86
pelesh merged 11 commits intodevelopfrom
system-solver-dev

Conversation

@pelesh
Copy link
Copy Markdown
Collaborator

@pelesh pelesh commented Nov 29, 2023

The system solver is supposed to be a high-level API for ReSolve. This class should also manage options settings.

This PR delivers main functionality for the SystemSolver class. It includes:

  • Basic methods for parameter settings.
  • Adjustments to linear solver classes interfaces.
  • Removes loophole in functionality tests that could lead to false positives.
  • Adds functionality tests and usage examples for SystemSolver class.
  • Closes: KLU Direct Solver rcond functionality needed #95.

@pelesh pelesh added the enhancement New feature or request label Nov 29, 2023
@pelesh pelesh added this to the First Release milestone Nov 29, 2023
@pelesh pelesh requested review from kswirydo and maksud November 29, 2023 00:05
@pelesh pelesh self-assigned this Nov 29, 2023
@pelesh pelesh marked this pull request as draft November 29, 2023 00:06
@pelesh pelesh marked this pull request as ready for review November 29, 2023 04:32
Copy link
Copy Markdown
Collaborator

@kswirydo kswirydo left a comment

Choose a reason for hiding this comment

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

will compile and run next.

Comment thread resolve/SystemSolver.hpp Outdated
Comment thread resolve/SystemSolver.hpp Outdated
Comment thread resolve/SystemSolver.hpp
Comment thread resolve/SystemSolver.hpp Outdated
Comment thread resolve/SystemSolver.hpp Outdated
Comment thread resolve/SystemSolver.cpp
Comment thread resolve/SystemSolver.cpp
Comment thread resolve/SystemSolver.cpp
Comment thread resolve/SystemSolver.cpp Outdated
Comment thread resolve/SystemSolver.cpp Outdated
@kswirydo
Copy link
Copy Markdown
Collaborator

kswirydo commented Dec 2, 2023

When I run the system.exe example on ascent, I am getting
./examples/system.exe ../tests/functionality/ terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid Aborted (core dumped)
same with system_cuda.exe

@pelesh
Copy link
Copy Markdown
Collaborator Author

pelesh commented Dec 3, 2023

@maksud, please check if the issue #95 is fixed in this branch.

Copy link
Copy Markdown
Collaborator

@kswirydo kswirydo left a comment

Choose a reason for hiding this comment

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

So both syssolver test with cuda and klu_glu test gives this (for the first matrix) which is obviously wrong
||b-Ax||_2 : 2.88790648555419e-12 (residual norm)
||b-A
x||_2 (CPU) : 2.483452223531182e-12 (residual norm)
||b-Ax||_2/||b||_2 : 1.465835083417962e-18 (scaled residual norm)
||x-x_true||_2 : 5.382658656691419e-12 (solution error)
||x-x_true||_2/||x_true||_2 : 7.898611154542518e-14 (scaled solution error)
||b-A
x_exact||_2 : 1970144.198500361 (control; residual norm with exact solution)
(I fixed this, see the newest commit)
All other tested exampleswork.

Comment thread examples/r_KLU_GLU.cpp Outdated
Comment thread examples/r_KLU_GLU_matrix_values_update.cpp Outdated
Comment thread examples/r_KLU_KLU.cpp Outdated
Comment thread examples/r_KLU_KLU_standalone.cpp Outdated
Comment thread examples/r_KLU_rf.cpp Outdated
Comment thread resolve/SystemSolver.cpp Outdated
Comment thread tests/functionality/testKLU.cpp
Comment thread tests/functionality/testKLU_Rf.cpp
Comment thread tests/functionality/testKLU_RocSolver_FGMRES.cpp
Comment thread tests/functionality/testSysHipRefine.cpp
@pelesh pelesh merged commit 5129c8c into develop Dec 5, 2023
@pelesh pelesh deleted the system-solver-dev branch December 11, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KLU Direct Solver rcond functionality needed

2 participants