ierr = MPI_Win_free(&shmem_window);
AssertThrowMPI(ierr);
- ierr = MPI_Comm_free(&shmem_group_communicator);
- AssertThrowMPI(ierr);
+ Utilities::MPI::free_communicator(shmem_group_communicator);
}
# endif
ExcInternalError());
// And get rid of the temporary communicator
- ierr = MPI_Comm_free(&shmem_group_communicator_temp);
- AssertThrowMPI(ierr);
+ Utilities::MPI::free_communicator(shmem_group_communicator_temp);
}
const bool is_shmem_root =
Utilities::MPI::this_mpi_process(shmem_group_communicator) == 0;
}
// We no longer need the shmem roots communicator, so get rid of it
- {
- const int ierr = MPI_Comm_free(&shmem_roots_communicator);
- AssertThrowMPI(ierr);
- }
+ Utilities::MPI::free_communicator(shmem_group_communicator);
// **** Step 3 ****
int ierr = MPI_Comm_split(mpi_communicator, color, rank, &comm_group);
AssertThrowMPI(ierr);
this->write_vtu_in_parallel(filename.c_str(), comm_group);
- ierr = MPI_Comm_free(&comm_group);
- AssertThrowMPI(ierr);
+ Utilities::MPI::free_communicator(comm_group);
#else
AssertThrow(false, ExcMessage("Logical error. Should not arrive here."));
#endif
}
if (*new_comm != comm_old)
{
- ierr = MPI_Comm_free(&ic);
- AssertThrowMPI(ierr);
- ierr = MPI_Comm_free(&comm_old);
- AssertThrowMPI(ierr);
+ Utilities::MPI::free_communicator(ic);
+ Utilities::MPI::free_communicator(comm_old);
}
}
Cblacs_gridexit(blacs_context);
if (mpi_communicator_inactive_with_root != MPI_COMM_NULL)
- MPI_Comm_free(&mpi_communicator_inactive_with_root);
+ Utilities::MPI::free_communicator(mpi_communicator_inactive_with_root);
}
Epetra_MpiComm *mpi_comm = dynamic_cast<Epetra_MpiComm *>(&communicator);
if (mpi_comm != nullptr)
{
- MPI_Comm comm = mpi_comm->GetMpiComm();
- *mpi_comm = Epetra_MpiComm(MPI_COMM_SELF);
- const int ierr = MPI_Comm_free(&comm);
- AssertThrowMPI(ierr);
+ MPI_Comm comm = mpi_comm->GetMpiComm();
+ *mpi_comm = Epetra_MpiComm(MPI_COMM_SELF);
+
+ Utilities::MPI::free_communicator(comm);
}
# endif
}
MPI_Group_free(&group_A);
MPI_Group_free(&group_B);
if (MPI_COMM_NULL != communicator_B)
- MPI_Comm_free(&communicator_B);
+ Utilities::MPI::free_communicator(communicator_B);
state = LAPACKSupport::matrix;
}
MPI_Group_free(&group_A);
MPI_Group_free(&group_B);
if (MPI_COMM_NULL != communicator_B)
- MPI_Comm_free(&communicator_B);
+ Utilities::MPI::free_communicator(communicator_B);
}
Cblacs_gridexit(union_blacs_context);
if (mpi_communicator_union != MPI_COMM_NULL)
- {
- ierr = MPI_Comm_free(&mpi_communicator_union);
- AssertThrowMPI(ierr);
- }
+ Utilities::MPI::free_communicator(mpi_communicator_union);
ierr = MPI_Group_free(&group_source);
AssertThrowMPI(ierr);
ierr = MPI_Group_free(&group_dest);
set_functions_to_trigger_an_assert();
}
+
+
template <typename VectorType>
ARKode<VectorType>::~ARKode()
{
# ifdef DEAL_II_WITH_MPI
if (is_serial_vector<VectorType>::value == false)
- {
- const int ierr = MPI_Comm_free(&communicator);
- (void)ierr;
- AssertNothrow(ierr == MPI_SUCCESS, ExcMPI(ierr));
- }
+ Utilities::MPI::free_communicator(communicator);
# endif
}
IDAFree(&ida_mem);
# ifdef DEAL_II_WITH_MPI
if (is_serial_vector<VectorType>::value == false)
- {
- const int ierr = MPI_Comm_free(&communicator);
- (void)ierr;
- AssertNothrow(ierr == MPI_SUCCESS, ExcMPI(ierr));
- }
+ Utilities::MPI::free_communicator(communicator);
# endif
}