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 row and col scaling functions to distributed matrix #1640

Merged
merged 3 commits into from
Jul 19, 2024

Conversation

fritzgoebel
Copy link
Collaborator

This PR adds a row_scale and a col_scale function to the distributed matrix. This functionality is needed in openCARP.

  • The row scaling is straight forward, with a distributed vector of scaling coefficients that has the same row partitioning as the matrix, we can just scale the rows of local and non-local matrices with the local vectors.
  • For column scaling, we need to communicate the non-local scaling coefficients to scale the columns of the non-local matrices. This can be simply done with the matrix's communicate.

@fritzgoebel fritzgoebel added is:new-feature A request or implementation of a feature that does not exist yet. type:matrix-format This is related to the Matrix formats 1:ST:WIP This PR is a work in progress. Not ready for review. mod:mpi This is related to the MPI module type:distributed-functionality labels Jul 3, 2024
@fritzgoebel fritzgoebel self-assigned this Jul 3, 2024
@ginkgo-bot ginkgo-bot added the mod:core This is related to the core module. label Jul 3, 2024
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. That is a lot simpler than I expected.

@fritzgoebel fritzgoebel added 1:ST:ready-for-review This PR is ready for review and removed 1:ST:WIP This PR is a work in progress. Not ready for review. labels Jul 3, 2024
@fritzgoebel fritzgoebel added 1:ST:ready-to-merge This PR is ready to merge. and removed 1:ST:ready-for-review This PR is ready for review labels Jul 3, 2024
Copy link

sonarcloud bot commented Jul 4, 2024

Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 98.18182% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.26%. Comparing base (6c0da56) to head (e8b7c5b).
Report is 38 commits behind head on develop.

Files Patch % Lines
core/distributed/matrix.cpp 95.65% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1640      +/-   ##
===========================================
+ Coverage    90.01%   90.26%   +0.24%     
===========================================
  Files          759      759              
  Lines        61173    61204      +31     
===========================================
+ Hits         55067    55243     +176     
+ Misses        6106     5961     -145     

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

Copy link
Member

@upsj upsj left a comment

Choose a reason for hiding this comment

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

This seems to assume that the scaling factors have unit stride - that's not necessarily true

@yhmtsai yhmtsai added 1:ST:ready-for-review This PR is ready for review and removed 1:ST:ready-to-merge This PR is ready to merge. labels Jul 8, 2024
test/mpi/matrix.cpp Outdated Show resolved Hide resolved
test/mpi/matrix.cpp Outdated Show resolved Hide resolved
@fritzgoebel fritzgoebel added 1:ST:ready-to-merge This PR is ready to merge. and removed 1:ST:ready-for-review This PR is ready for review labels Jul 11, 2024
@fritzgoebel fritzgoebel merged commit 26eb276 into develop Jul 19, 2024
10 of 14 checks passed
@fritzgoebel fritzgoebel deleted the distributed_row_col_scale branch July 19, 2024 12:07
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. is:new-feature A request or implementation of a feature that does not exist yet. mod:core This is related to the core module. mod:mpi This is related to the MPI module type:distributed-functionality type:matrix-format This is related to the Matrix formats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants