]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Deprecate Utilities::MPI::create_group 13482/head
authorDaniel Arndt <arndtd@ornl.gov>
Wed, 2 Mar 2022 16:08:55 +0000 (11:08 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Wed, 2 Mar 2022 19:01:04 +0000 (14:01 -0500)
include/deal.II/base/mpi.h
source/base/mpi.cc
source/base/process_grid.cc
source/lac/scalapack.cc

index d75228fcc31165143866cf1c78c5c16596588639..97621696246cde40485be454134ff1b67e5bdbe3 100644 (file)
@@ -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,
index b15e272cee0c925206e30cfab94b4b80eb018b2c..18aaa0010dff3fad70c6d46fbb27b258fc05e6f7 100644 (file)
@@ -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;
     }
 
 
index 692c5898dddde524c9a8f1087f24e679340fb827..330df8f706da73c6bca8a4f759274118993b54e4 100644 (file)
@@ -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);
index 84465baeb8c49da2c553050c415d8ad2174eed7c..f0b53bc05b0a5330d200e0f19fb65e7aeb7b318f 100644 (file)
@@ -395,10 +395,11 @@ ScaLAPACKMatrix<NumberType>::copy_from(const LAPACKFullMatrix<NumberType> &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<NumberType>::copy_to(LAPACKFullMatrix<NumberType> &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<NumberType>::copy_to(ScaLAPACKMatrix<NumberType> &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);
 
       /*

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.