From 588ab9ea3689da3124abe42acf49205ed365c3af Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Tue, 11 Apr 2023 10:01:45 +0200 Subject: [PATCH] Use proper MPI communicator --- include/deal.II/lac/solver_gmres.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/deal.II/lac/solver_gmres.h b/include/deal.II/lac/solver_gmres.h index 54d2393af1..e2f219d81b 100644 --- a/include/deal.II/lac/solver_gmres.h +++ b/include/deal.II/lac/solver_gmres.h @@ -915,7 +915,7 @@ namespace internal block(vv, b).local_element(j); } - Utilities::MPI::sum(h, MPI_COMM_WORLD, h); + Utilities::MPI::sum(h, block(vv, 0).get_mpi_communicator(), h); } @@ -1025,7 +1025,8 @@ namespace internal } } - return std::sqrt(Utilities::MPI::sum(norm_vv_temp, MPI_COMM_WORLD)); + return std::sqrt( + Utilities::MPI::sum(norm_vv_temp, block(vv, 0).get_mpi_communicator())); } @@ -1067,7 +1068,8 @@ namespace internal norm += temp * temp; } - return std::sqrt(Utilities::MPI::sum(norm, MPI_COMM_WORLD)); + return std::sqrt( + Utilities::MPI::sum(norm, block(v, 0).get_mpi_communicator())); } -- 2.39.5