From: Martin Kronbichler Date: Fri, 15 Mar 2024 08:46:49 +0000 (+0100) Subject: Fix unnecessary allreduce X-Git-Tag: v9.6.0-rc1~473^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16f9a006ebcc4b9eb6e3ac6b34514d31d0c6c743;p=dealii.git Fix unnecessary allreduce --- diff --git a/include/deal.II/lac/solver_gmres.h b/include/deal.II/lac/solver_gmres.h index 6df1e9a0ec..baa9a04b14 100644 --- a/include/deal.II/lac/solver_gmres.h +++ b/include/deal.II/lac/solver_gmres.h @@ -1283,8 +1283,12 @@ namespace internal } } - return std::sqrt( - Utilities::MPI::sum(norm_vv_temp, block(vv, 0).get_mpi_communicator())); + if (delayed_reorthogonalization) + return std::numeric_limits::signaling_NaN(); + else + return std::sqrt( + Utilities::MPI::sum(norm_vv_temp, + block(vv, 0).get_mpi_communicator())); }