From: Daniel Arndt Date: Wed, 2 Mar 2022 16:08:55 +0000 (-0500) Subject: Deprecate Utilities::MPI::create_group X-Git-Tag: v9.4.0-rc1~421^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13482%2Fhead;p=dealii.git Deprecate Utilities::MPI::create_group --- diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index d75228fcc3..9762169624 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -433,9 +433,11 @@ namespace Utilities * organization = {Springer} * } * @endcode + * + * @deprecated Use MPI_Comm_create_group directly */ #ifdef DEAL_II_WITH_MPI - int + DEAL_II_DEPRECATED_EARLY int create_group(const MPI_Comm & comm, const MPI_Group &group, const int tag, diff --git a/source/base/mpi.cc b/source/base/mpi.cc index b15e272cee..18aaa0010d 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -183,7 +183,9 @@ namespace Utilities const int tag, MPI_Comm * new_comm) { - return MPI_Comm_create_group(comm, group, tag, new_comm); + const int ierr = MPI_Comm_create_group(comm, group, tag, new_comm); + AssertThrowMPI(ierr); + return ierr; } diff --git a/source/base/process_grid.cc b/source/base/process_grid.cc index 692c5898dd..330df8f706 100644 --- a/source/base/process_grid.cc +++ b/source/base/process_grid.cc @@ -184,10 +184,10 @@ namespace Utilities const int mpi_tag = Utilities::MPI::internal::Tags::process_grid_constructor; - ierr = Utilities::MPI::create_group(mpi_communicator, - inactive_with_root_group, - mpi_tag, - &mpi_communicator_inactive_with_root); + ierr = MPI_Comm_create_group(mpi_communicator, + inactive_with_root_group, + mpi_tag, + &mpi_communicator_inactive_with_root); AssertThrowMPI(ierr); ierr = MPI_Group_free(&all_group); diff --git a/source/lac/scalapack.cc b/source/lac/scalapack.cc index 84465baeb8..f0b53bc05b 100644 --- a/source/lac/scalapack.cc +++ b/source/lac/scalapack.cc @@ -395,10 +395,11 @@ ScaLAPACKMatrix::copy_from(const LAPACKFullMatrix &B, MPI_Comm communicator_B; const int mpi_tag = Utilities::MPI::internal::Tags::scalapack_copy_from; - Utilities::MPI::create_group(this->grid->mpi_communicator, - group_B, - mpi_tag, - &communicator_B); + const int ierr = MPI_Comm_create_group(this->grid->mpi_communicator, + group_B, + mpi_tag, + &communicator_B); + AssertThrowMPI(ierr); int n_proc_rows_B = 1, n_proc_cols_B = 1; int this_process_row_B = -1, this_process_column_B = -1; int blacs_context_B = -1; @@ -565,10 +566,11 @@ ScaLAPACKMatrix::copy_to(LAPACKFullMatrix &B, MPI_Comm communicator_B; const int mpi_tag = Utilities::MPI::internal::Tags::scalapack_copy_to; - Utilities::MPI::create_group(this->grid->mpi_communicator, - group_B, - mpi_tag, - &communicator_B); + const int ierr = MPI_Comm_create_group(this->grid->mpi_communicator, + group_B, + mpi_tag, + &communicator_B); + AssertThrowMPI(ierr); int n_proc_rows_B = 1, n_proc_cols_B = 1; int this_process_row_B = -1, this_process_column_B = -1; int blacs_context_B = -1; @@ -900,10 +902,10 @@ ScaLAPACKMatrix::copy_to(ScaLAPACKMatrix &dest) const // processes. the same holds for the wrapper/fallback we are using here. const int mpi_tag = Utilities::MPI::internal::Tags::scalapack_copy_to2; - ierr = Utilities::MPI::create_group(MPI_COMM_WORLD, - group_union, - mpi_tag, - &mpi_communicator_union); + ierr = MPI_Comm_create_group(MPI_COMM_WORLD, + group_union, + mpi_tag, + &mpi_communicator_union); AssertThrowMPI(ierr); /*