Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement system solver class #86

Merged
merged 11 commits into from
Dec 5, 2023
Merged

Implement system solver class #86

merged 11 commits into from
Dec 5, 2023

Conversation

pelesh
Copy link
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 maksud and kswirydo 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
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.

resolve/SystemSolver.hpp Outdated Show resolved Hide resolved
resolve/SystemSolver.hpp Outdated Show resolved Hide resolved
resolve/SystemSolver.hpp Show resolved Hide resolved
resolve/SystemSolver.hpp Outdated Show resolved Hide resolved
resolve/SystemSolver.hpp Outdated Show resolved Hide resolved
resolve/SystemSolver.cpp Show resolved Hide resolved
resolve/SystemSolver.cpp Show resolved Hide resolved
resolve/SystemSolver.cpp Show resolved Hide resolved
resolve/SystemSolver.cpp Outdated Show resolved Hide resolved
resolve/SystemSolver.cpp Outdated Show resolved Hide resolved
@kswirydo
Copy link
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
Collaborator Author

pelesh commented Dec 3, 2023

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

Copy link
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.

examples/r_KLU_GLU.cpp Outdated Show resolved Hide resolved
examples/r_KLU_GLU_matrix_values_update.cpp Outdated Show resolved Hide resolved
examples/r_KLU_KLU.cpp Outdated Show resolved Hide resolved
examples/r_KLU_KLU_standalone.cpp Outdated Show resolved Hide resolved
examples/r_KLU_rf.cpp Outdated Show resolved Hide resolved
resolve/SystemSolver.cpp Outdated Show resolved Hide resolved
tests/functionality/testKLU.cpp Show resolved Hide resolved
tests/functionality/testKLU_Rf.cpp Show resolved Hide resolved
tests/functionality/testSysHipRefine.cpp Show resolved Hide resolved
@pelesh pelesh merged commit 5129c8c into develop Dec 5, 2023
7 checks passed
@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