From f4412691e3aeb7ae7f2d1f658b11b0efb54980c4 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 23 Oct 2019 17:43:00 +0200 Subject: [PATCH] address comments --- include/deal.II/base/mpi.h | 9 +++++---- source/base/mpi.cc | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index a5e897bc6f..35e136b5d8 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -233,6 +233,11 @@ namespace Utilities : comm(duplicate_communicator(communicator)) {} + /** + * Do not allow making copies. + */ + DuplicatedCommunicator(const DuplicatedCommunicator &) = delete; + /** * The destructor will free the communicator automatically. */ @@ -249,10 +254,6 @@ namespace Utilities return comm; } - /** - * Do not allow making copies. - */ - DuplicatedCommunicator(const DuplicatedCommunicator &) = delete; /** * Do not allow assignment of this class. diff --git a/source/base/mpi.cc b/source/base/mpi.cc index 3c7318b519..32bde89b6c 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -106,6 +106,7 @@ namespace Utilities void free_communicator(MPI_Comm &mpi_communicator) { + // MPI_Comm_free will set the argument to MPI_COMM_NULL automatically. const int ierr = MPI_Comm_free(&mpi_communicator); AssertThrowMPI(ierr); } -- 2.39.5