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

add example for reordering for preconditioned solvers #1465

Merged
merged 2 commits into from
Dec 3, 2023

Conversation

upsj
Copy link
Member

@upsj upsj commented Nov 15, 2023

Extends the preconditioned-solver example by a reordering of the system matrix.

@ginkgo-bot ginkgo-bot added reg:build This is related to the build system. reg:example This is related to the examples. labels Nov 15, 2023
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4de27df) 91.34% compared to head (abe1701) 91.33%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1465      +/-   ##
===========================================
- Coverage    91.34%   91.33%   -0.01%     
===========================================
  Files          688      688              
  Lines        56100    56098       -2     
===========================================
- Hits         51243    51239       -4     
- Misses        4857     4859       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

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

some nit

Copy link
Member

@MarcelKoch MarcelKoch left a comment

Choose a reason for hiding this comment

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

LGTM, mostly nits.

auto solver = solver_gen->generate(A_reordered);

// Solve system
solver->apply(b_reordered, x_reordered);
Copy link
Member

Choose a reason for hiding this comment

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

Somehow, I thought there would be a wrapper that automatically applies the reordering to the input matrices and vectors. Was something like that planned?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but not yet implemented

auto b = gko::read<vec>(std::ifstream("data/b.mtx"), exec);
auto x = gko::read<vec>(std::ifstream("data/x0.mtx"), exec);

auto reordering =
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: maybe allow switching between reorderings by a CLI argument.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is going beyond the scope of this example

@yhmtsai
Copy link
Member

yhmtsai commented Nov 17, 2023

need to add description in the pr page

@upsj upsj added the 1:ST:ready-to-merge This PR is ready to merge. label Dec 2, 2023
upsj and others added 2 commits December 2, 2023 22:05
- use ParILU
- documentation

Co-authored-by: Marcel Koch <marcel.koch@kit.edu>
Co-authored-by: Yuhsiang M. Tsai <yhmtsai@gmail.com>
Co-authored-by: Pratik Nayak <pratik.nayak@kit.edu>
@upsj upsj force-pushed the reordered-example branch from fe6e715 to abe1701 Compare December 2, 2023 21:14
@upsj upsj self-assigned this Dec 2, 2023
Copy link

sonarqubecloud bot commented Dec 3, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
44.1% 44.1% Duplication

warning The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@upsj upsj merged commit aa5e26d into develop Dec 3, 2023
@upsj upsj deleted the reordered-example branch December 3, 2023 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-to-merge This PR is ready to merge. reg:build This is related to the build system. reg:example This is related to the examples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants