ginkgo-project / ginkgo

Numerical linear algebra software package
https://ginkgo-project.github.io/
BSD 3-Clause "New" or "Revised" License
415 stars 90 forks source link

Fix mean computation for zero sized ranks #1632

Closed greole closed 5 months ago

greole commented 5 months ago

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.

sonarcloud[bot] commented 5 months ago

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