From f60bc8d0dcc8dcba84b90e2800d658d4b0f55677 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Mon, 20 Nov 2017 10:37:30 +0100 Subject: [PATCH] Fixed serial case. --- include/deal.II/base/mpi.templates.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/deal.II/base/mpi.templates.h b/include/deal.II/base/mpi.templates.h index 2ee5ce7e67..db4b33f35c 100644 --- a/include/deal.II/base/mpi.templates.h +++ b/include/deal.II/base/mpi.templates.h @@ -197,9 +197,10 @@ namespace Utilities { #ifndef DEAL_II_WITH_MPI (void)comm; - (void)objects_to_send; - Assert (false, ExcMessage ("The function some_to_some doesn't make" - "any sense if you do not have MPI enabled. ")); + Assert(objects_to_send.size() == 0, ExcMessage("Cannot send to more than one processor.")); + Assert(objects_to_send.find(0) != objects_to_send.end() || objects_to_send.size() == 0, + ExcMessage("Can only send to myself or to nobody.")); + return objects_to_send; #else const auto n_procs = dealii::Utilities::MPI::n_mpi_processes(comm); const auto my_proc = dealii::Utilities::MPI::this_mpi_process(comm); @@ -278,9 +279,8 @@ namespace Utilities { #ifndef DEAL_II_WITH_MPI (void)comm; - (void)objects_to_send; - Assert (false, ExcMessage ("The function all_gather doesn't make" - "any sense if you do not have MPI enabled. ")); + std::vector v(1, object); + return v; #else const auto n_procs = dealii::Utilities::MPI::n_mpi_processes(comm); -- 2.39.5