]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix unnecessary allreduce
authorMartin Kronbichler <martin.kronbichler@rub.de>
Fri, 15 Mar 2024 08:46:49 +0000 (09:46 +0100)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Fri, 15 Mar 2024 08:46:49 +0000 (09:46 +0100)
include/deal.II/lac/solver_gmres.h

index 6df1e9a0ec9120a62ba04b9426ee681ce934bcb9..baa9a04b14ca540486c8901e54989a8b2ca09af5 100644 (file)
@@ -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<double>::signaling_NaN();
+      else
+        return std::sqrt(
+          Utilities::MPI::sum(norm_vv_temp,
+                              block(vv, 0).get_mpi_communicator()));
     }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.