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

Fix mean computation for zero sized ranks #1632

Merged
merged 4 commits into from
Jul 4, 2024

Conversation

greole
Copy link
Collaborator

@greole greole commented Jun 27, 2024

This PR makes sure to not divide by zero when calculating the mean of a distributed vector. This otherwise might occur if some ranks hold a local vector of length zero after repartitioning a matrix or vector.

@ginkgo-bot ginkgo-bot added mod:cuda This is related to the CUDA module. type:matrix-format This is related to the Matrix formats mod:hip This is related to the HIP module. labels Jun 27, 2024
@greole greole changed the title Fix mean computation for zero sized ranks WIP Fix mean computation for zero sized ranks Jun 27, 2024
@greole greole changed the title WIP Fix mean computation for zero sized ranks Fix mean computation for zero sized ranks Jun 27, 2024
@greole greole requested review from upsj and MarcelKoch June 27, 2024 07:06
common/unified/matrix/dense_kernels.template.cpp Outdated Show resolved Hide resolved
reference/matrix/dense_kernels.cpp Outdated Show resolved Hide resolved
reference/test/matrix/dense_kernels.cpp Outdated Show resolved Hide resolved
reference/matrix/dense_kernels.cpp Outdated Show resolved Hide resolved
@greole greole requested review from upsj and MarcelKoch June 27, 2024 08:01
greole and others added 4 commits July 2, 2024 13:53
Co-authored-by: Tobias Ribizel <mail@ribizel.de>
    Co-authored-by: Tobias Ribizel <ribizel@kit.edu>
    Co-authored-by: Marcel Koch <marcel.koch@kit.edu>
@yhmtsai yhmtsai added the 1:ST:ready-to-merge This PR is ready to merge. label Jul 2, 2024
Copy link

sonarcloud bot commented Jul 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

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

@greole greole merged commit 8a31cf8 into ginkgo-project:develop Jul 4, 2024
13 of 16 checks passed
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. 1:ST:run-full-test mod:cuda This is related to the CUDA module. mod:hip This is related to the HIP module. type:matrix-format This is related to the Matrix formats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants