]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revert "Cast MPI_STATUS[ES]_IGNORE"
authorDaniel Arndt <arndtd@ornl.gov>
Mon, 9 Jan 2023 18:15:19 +0000 (13:15 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Mon, 9 Jan 2023 18:15:19 +0000 (13:15 -0500)
This reverts commit 0ef0138a68f82cbf1ce759e1b5aaa38a2519df31.

21 files changed:
include/deal.II/base/mpi.h
include/deal.II/base/mpi.templates.h
include/deal.II/base/mpi_consensus_algorithms.h
include/deal.II/base/mpi_noncontiguous_partitioner.templates.h
include/deal.II/base/mpi_remote_point_evaluation.h
include/deal.II/base/partitioner.templates.h
include/deal.II/grid/grid_tools.h
include/deal.II/lac/affine_constraints.templates.h
include/deal.II/lac/la_parallel_vector.templates.h
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h
source/base/data_out_base.cc
source/base/mpi.cc
source/base/mpi_compute_index_owner_internal.cc
source/base/partitioner.cc
source/distributed/fully_distributed_tria.cc
source/distributed/tria_base.cc
source/grid/grid_tools.cc
source/lac/sparsity_tools.cc
source/matrix_free/vector_data_exchange.cc
source/multigrid/mg_transfer_internal.cc
source/particles/particle_handler.cc

index d6e300416535135fe0472fc43a35f7d90c7100a2..49e41af38bf4725714bfb0ea6a6923bbba27509d 100644 (file)
@@ -1159,7 +1159,7 @@ namespace Utilities
        * {
        *   static MPI_Request request = MPI_REQUEST_NULL;
        *   MPI_InitFinalize::register_request(request);
-       *   MPI_Wait(&request, static_cast<MPI_Status*>(MPI_STATUS_IGNORE));
+       *   MPI_Wait(&request, MPI_STATUS_IGNORE);
        *   // [some algorithm that is not safe to be executed twice in a row.]
        *   MPI_IBarrier(comm, &request);
        * }
@@ -1944,7 +1944,7 @@ namespace Utilities
                             status.MPI_SOURCE,
                             status.MPI_TAG,
                             comm,
-                            static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                            MPI_STATUS_IGNORE);
             AssertThrowMPI(ierr);
             Assert(received_objects.find(rank) == received_objects.end(),
                    ExcInternalError(
@@ -1956,10 +1956,9 @@ namespace Utilities
       }
 
       // Wait to have sent all objects.
-      const int ierr =
-        MPI_Waitall(send_to.size(),
-                    buffer_send_requests.data(),
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+      const int ierr = MPI_Waitall(send_to.size(),
+                                   buffer_send_requests.data(),
+                                   MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
 
       return received_objects;
@@ -2358,8 +2357,7 @@ namespace Utilities
       // buffer itself as early as possible, and so we clear the
       // buffer when the Future::get() function is called.
       auto wait = [request]() mutable {
-        const int ierr =
-          MPI_Wait(&request, static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+        const int ierr = MPI_Wait(&request, MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
       };
       auto cleanup = [send_buffer = std::move(send_buffer)]() {
index bf236d4cb2e030b6defe186c08ac705fe47946d7..2d8fede2c97c7b38fbea4e2ca82f97cf37b119cb 100644 (file)
@@ -445,14 +445,13 @@ namespace Utilities
 
                   std::vector<char> temp(amount);
 
-                  const auto ierr_3 =
-                    MPI_Recv(temp.data(),
-                             amount,
-                             MPI_CHAR,
-                             status.MPI_SOURCE,
-                             status.MPI_TAG,
-                             comm,
-                             static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                  const auto ierr_3 = MPI_Recv(temp.data(),
+                                               amount,
+                                               MPI_CHAR,
+                                               status.MPI_SOURCE,
+                                               status.MPI_TAG,
+                                               comm,
+                                               MPI_STATUS_IGNORE);
                   AssertThrowMPI(ierr_3);
 
                   result = combiner(result, Utilities::unpack<T>(temp, false));
index 7300522bac723c3dd69f4be278e4106a87b3f537..6667de282647017dc188024d966359fd198cdd69 100644 (file)
@@ -1908,14 +1908,13 @@ namespace Utilities
                   const int tag_deliver = Utilities::MPI::internal::Tags::
                     consensus_algorithm_nbx_process_deliver;
 
-                  const int ierr =
-                    MPI_Recv(recv_buffer.data(),
-                             recv_buffer.size(),
-                             MPI_CHAR,
-                             target,
-                             tag_deliver,
-                             comm,
-                             static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                  const int ierr = MPI_Recv(recv_buffer.data(),
+                                            recv_buffer.size(),
+                                            MPI_CHAR,
+                                            target,
+                                            tag_deliver,
+                                            comm,
+                                            MPI_STATUS_IGNORE);
                   AssertThrowMPI(ierr);
                 }
 
@@ -2001,7 +2000,7 @@ namespace Utilities
                             other_rank,
                             tag_request,
                             comm,
-                            static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                            MPI_STATUS_IGNORE);
             AssertThrowMPI(ierr);
 
             // Allocate memory for an answer message to the current request,
@@ -2055,10 +2054,9 @@ namespace Utilities
       {
 #  ifdef DEAL_II_WITH_MPI
         int        all_ranks_reached_barrier;
-        const auto ierr =
-          MPI_Test(&barrier_request,
-                   &all_ranks_reached_barrier,
-                   static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+        const auto ierr = MPI_Test(&barrier_request,
+                                   &all_ranks_reached_barrier,
+                                   MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
         return all_ranks_reached_barrier != 0;
 #  else
@@ -2079,21 +2077,18 @@ namespace Utilities
         {
           if (send_requests.size() > 0)
             {
-              const int ierr =
-                MPI_Waitall(send_requests.size(),
-                            send_requests.data(),
-                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+              const int ierr = MPI_Waitall(send_requests.size(),
+                                           send_requests.data(),
+                                           MPI_STATUSES_IGNORE);
               AssertThrowMPI(ierr);
             }
 
-          int ierr = MPI_Wait(&barrier_request,
-                              static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+          int ierr = MPI_Wait(&barrier_request, MPI_STATUS_IGNORE);
           AssertThrowMPI(ierr);
 
           for (auto &i : request_requests)
             {
-              ierr =
-                MPI_Wait(i.get(), static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+              ierr = MPI_Wait(i.get(), MPI_STATUS_IGNORE);
               AssertThrowMPI(ierr);
             }
 
@@ -2338,14 +2333,13 @@ namespace Utilities
             // above blocks until we have a message, we know that the
             // following MPI_Recv call will immediately succeed.
             {
-              const int ierr =
-                MPI_Recv(recv_buffer.data(),
-                         recv_buffer.size(),
-                         MPI_CHAR,
-                         other_rank,
-                         tag_deliver,
-                         comm,
-                         static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+              const int ierr = MPI_Recv(recv_buffer.data(),
+                                        recv_buffer.size(),
+                                        MPI_CHAR,
+                                        other_rank,
+                                        tag_deliver,
+                                        comm,
+                                        MPI_STATUS_IGNORE);
               AssertThrowMPI(ierr);
             }
 
@@ -2371,20 +2365,18 @@ namespace Utilities
         // send-request and receive-answer operations.
         if (send_request_requests.size() > 0)
           {
-            const int ierr =
-              MPI_Waitall(send_request_requests.size(),
-                          send_request_requests.data(),
-                          static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+            const int ierr = MPI_Waitall(send_request_requests.size(),
+                                         send_request_requests.data(),
+                                         MPI_STATUSES_IGNORE);
             AssertThrowMPI(ierr);
           }
 
         // Then also check the send-answer requests.
         if (send_answer_requests.size() > 0)
           {
-            const int ierr =
-              MPI_Waitall(send_answer_requests.size(),
-                          send_answer_requests.data(),
-                          static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+            const int ierr = MPI_Waitall(send_answer_requests.size(),
+                                         send_answer_requests.data(),
+                                         MPI_STATUSES_IGNORE);
             AssertThrowMPI(ierr);
           }
 #  endif
index 08618587768cd4babe931342f4d012ee1d3c2784..0c033164366e189b6c7a1b2d2fddaf7d1bedefcb 100644 (file)
@@ -184,9 +184,7 @@ namespace Utilities
 
       // wait that all data packages have been sent
       const int ierr =
-        MPI_Waitall(send_ranks.size(),
-                    requests.data(),
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+        MPI_Waitall(send_ranks.size(), requests.data(), MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
 #endif
     }
index b6cb1870b0ce230ecb397f153f10806195552bef..7f3c1219780bc9839d97be07de8030ed71547bf5 100644 (file)
@@ -393,7 +393,7 @@ namespace Utilities
                           status.MPI_SOURCE,
                           internal::Tags::remote_point_evaluation,
                           tria->get_communicator(),
-                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                          MPI_STATUS_IGNORE);
           AssertThrowMPI(ierr);
 
           temp_recv_map[status.MPI_SOURCE] =
@@ -402,9 +402,7 @@ namespace Utilities
 
       // make sure all messages have been sent
       const int ierr =
-        MPI_Waitall(requests.size(),
-                    requests.data(),
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+        MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
 
       // copy received data into output vector
@@ -553,7 +551,7 @@ namespace Utilities
                           status.MPI_SOURCE,
                           internal::Tags::remote_point_evaluation,
                           tria->get_communicator(),
-                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                          MPI_STATUS_IGNORE);
           AssertThrowMPI(ierr);
 
           const auto recv_buffer_unpacked =
@@ -579,9 +577,7 @@ namespace Utilities
         }
 
       const int ierr =
-        MPI_Waitall(requests.size(),
-                    requests.data(),
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+        MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
 
       // sort for easy access during function call
index 3f7befdf87170a0728c466fd9894ffc4bd2ede8d..c1d7a6856ea7cfb0a0802a48555ff4af085856bd 100644 (file)
@@ -195,9 +195,7 @@ namespace Utilities
       if (requests.size() > 0)
         {
           const int ierr =
-            MPI_Waitall(requests.size(),
-                        requests.data(),
-                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+            MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
           AssertThrowMPI(ierr);
         }
       requests.resize(0);
@@ -577,9 +575,7 @@ namespace Utilities
         {
           AssertDimension(locally_owned_array.size(), locally_owned_size());
           const int ierr =
-            MPI_Waitall(n_import_targets,
-                        requests.data(),
-                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+            MPI_Waitall(n_import_targets, requests.data(), MPI_STATUSES_IGNORE);
           AssertThrowMPI(ierr);
 
           const Number *read_position = temporary_storage.data();
@@ -715,10 +711,9 @@ namespace Utilities
       // wait for the send operations to complete
       if (requests.size() > 0 && n_ghost_targets > 0)
         {
-          const int ierr =
-            MPI_Waitall(n_ghost_targets,
-                        &requests[n_import_targets],
-                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+          const int ierr = MPI_Waitall(n_ghost_targets,
+                                       &requests[n_import_targets],
+                                       MPI_STATUSES_IGNORE);
           AssertThrowMPI(ierr);
         }
       else
index 9cdac167144f81bf1477cdbeed841b7be6321a95..b5344d499fa041b97ca97ababbe126bdb40fea83 100644 (file)
@@ -4682,17 +4682,14 @@ namespace GridTools
       if (requests.size() > 0)
         {
           const int ierr =
-            MPI_Waitall(requests.size(),
-                        requests.data(),
-                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+            MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
           AssertThrowMPI(ierr);
         }
       if (reply_requests.size() > 0)
         {
-          const int ierr =
-            MPI_Waitall(reply_requests.size(),
-                        reply_requests.data(),
-                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+          const int ierr = MPI_Waitall(reply_requests.size(),
+                                       reply_requests.data(),
+                                       MPI_STATUSES_IGNORE);
           AssertThrowMPI(ierr);
         }
 
index 56f9aba596b6e8169005f1543cc3399a7c4c03ae..9b2c26cf730bcbee2a5655e3ad84a2a9b84acf2d 100644 (file)
@@ -352,7 +352,7 @@ namespace internal
                           status.MPI_SOURCE,
                           tag,
                           mpi_communicator,
-                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                          MPI_STATUS_IGNORE);
           AssertThrowMPI(ierr);
 
           const auto data =
@@ -363,9 +363,7 @@ namespace internal
         }
 
       const int ierr =
-        MPI_Waitall(requests.size(),
-                    requests.data(),
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+        MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
 
       sort_constraints();
@@ -473,7 +471,7 @@ namespace internal
                           status.MPI_SOURCE,
                           tag,
                           mpi_communicator,
-                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                          MPI_STATUS_IGNORE);
           AssertThrowMPI(ierr);
 
           const auto received_locally_relevant_constrain =
@@ -485,9 +483,7 @@ namespace internal
         }
 
       const int ierr =
-        MPI_Waitall(requests.size(),
-                    requests.data(),
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+        MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
 
       sort_constraints();
index 18a579b366f52b3ca4effc5adc6f13f3f23b1b31..eab0616c3d06c4f132f6d5895c3beb5f12b7c46f 100644 (file)
@@ -1339,11 +1339,10 @@ namespace LinearAlgebra
           int flag = 1;
           if (update_ghost_values_requests.size() > 0)
             {
-              const int ierr =
-                MPI_Testall(update_ghost_values_requests.size(),
-                            update_ghost_values_requests.data(),
-                            &flag,
-                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+              const int ierr = MPI_Testall(update_ghost_values_requests.size(),
+                                           update_ghost_values_requests.data(),
+                                           &flag,
+                                           MPI_STATUSES_IGNORE);
               AssertThrowMPI(ierr);
               Assert(flag == 1,
                      ExcMessage(
@@ -1352,11 +1351,10 @@ namespace LinearAlgebra
             }
           if (compress_requests.size() > 0)
             {
-              const int ierr =
-                MPI_Testall(compress_requests.size(),
-                            compress_requests.data(),
-                            &flag,
-                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+              const int ierr = MPI_Testall(compress_requests.size(),
+                                           compress_requests.data(),
+                                           &flag,
+                                           MPI_STATUSES_IGNORE);
               AssertThrowMPI(ierr);
               Assert(flag == 1,
                      ExcMessage("MPI found unfinished compress() requests "
index 0785178670113c8ec44052d181ddaee721bf9d6b..1dd8eb62e2644d16665d2e2c7e5354ed51bcf057 100644 (file)
@@ -730,7 +730,7 @@ namespace internal
               status.MPI_SOURCE,
               Utilities::MPI::internal::Tags::fine_dof_handler_view_reinit,
               communicator,
-              static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+              MPI_STATUS_IGNORE);
             AssertThrowMPI(ierr_3);
 
             for (unsigned int i = 0; i < buffer.size();)
@@ -766,9 +766,7 @@ namespace internal
           }
 
         const int ierr_1 =
-          MPI_Waitall(requests.size(),
-                      requests.data(),
-                      static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+          MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
         AssertThrowMPI(ierr_1);
       }
 
index 7f017acd03d51dff8122642cf4189794c1bfdc06..fb6ccc6adf93399f788cef2ab1b66c99e7471dca 100644 (file)
@@ -7901,14 +7901,8 @@ namespace DataOutBase
     // Write the two parts of the header on rank 0:
     if (my_rank == 0)
       {
-        ierr =
-          Utilities::MPI::LargeCount::File_write_at_c(fh,
-                                                      0,
-                                                      &header,
-                                                      sizeof(header),
-                                                      MPI_CHAR,
-                                                      static_cast<MPI_Status *>(
-                                                        MPI_STATUS_IGNORE));
+        ierr = Utilities::MPI::LargeCount::File_write_at_c(
+          fh, 0, &header, sizeof(header), MPI_CHAR, MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
 
         ierr = Utilities::MPI::LargeCount::File_write_at_c(
@@ -7917,7 +7911,7 @@ namespace DataOutBase
           chunk_sizes.data(),
           chunk_sizes.size(),
           MPI_UINT64_T,
-          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+          MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
       }
 
@@ -7932,12 +7926,7 @@ namespace DataOutBase
                                 n_ranks * sizeof(std::uint64_t) + prefix_sum;
 
       ierr = Utilities::MPI::LargeCount::File_write_at_all_c(
-        fh,
-        offset,
-        my_buffer.data(),
-        my_size,
-        MPI_CHAR,
-        static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+        fh, offset, my_buffer.data(), my_size, MPI_CHAR, MPI_STATUS_IGNORE);
       AssertThrowMPI(ierr);
     }
 
@@ -8151,14 +8140,8 @@ DataOutInterface<dim, spacedim>::write_vtu_in_parallel(
       DataOutBase::write_vtu_header(ss, vtk_flags);
       header_size = ss.str().size();
       // Write the header on rank 0 at the start of a file, i.e., offset 0.
-      ierr =
-        Utilities::MPI::LargeCount::File_write_at_c(fh,
-                                                    0,
-                                                    ss.str().c_str(),
-                                                    header_size,
-                                                    MPI_CHAR,
-                                                    static_cast<MPI_Status *>(
-                                                      MPI_STATUS_IGNORE));
+      ierr = Utilities::MPI::LargeCount::File_write_at_c(
+        fh, 0, ss.str().c_str(), header_size, MPI_CHAR, MPI_STATUS_IGNORE);
       AssertThrowMPI(ierr);
     }
 
@@ -8193,14 +8176,12 @@ DataOutInterface<dim, spacedim>::write_vtu_in_parallel(
     // Locate specific offset for each processor.
     const MPI_Offset offset = static_cast<MPI_Offset>(header_size) + prefix_sum;
 
-    ierr =
-      Utilities::MPI::LargeCount::File_write_at_all_c(fh,
-                                                      offset,
-                                                      ss.str().c_str(),
-                                                      ss.str().size(),
-                                                      MPI_CHAR,
-                                                      static_cast<MPI_Status *>(
-                                                        MPI_STATUS_IGNORE));
+    ierr = Utilities::MPI::LargeCount::File_write_at_all_c(fh,
+                                                           offset,
+                                                           ss.str().c_str(),
+                                                           ss.str().size(),
+                                                           MPI_CHAR,
+                                                           MPI_STATUS_IGNORE);
     AssertThrowMPI(ierr);
 
     if (myrank == n_ranks - 1)
@@ -8213,14 +8194,12 @@ DataOutInterface<dim, spacedim>::write_vtu_in_parallel(
         const unsigned int footer_size = ss.str().size();
 
         // Writing footer:
-        ierr =
-          Utilities::MPI::LargeCount::File_write_at_c(fh,
-                                                      footer_offset,
-                                                      ss.str().c_str(),
-                                                      footer_size,
-                                                      MPI_CHAR,
-                                                      static_cast<MPI_Status *>(
-                                                        MPI_STATUS_IGNORE));
+        ierr = Utilities::MPI::LargeCount::File_write_at_c(fh,
+                                                           footer_offset,
+                                                           ss.str().c_str(),
+                                                           footer_size,
+                                                           MPI_CHAR,
+                                                           MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
       }
   }
@@ -8511,7 +8490,7 @@ DataOutInterface<dim, spacedim>::create_xdmf_entry(
                       status.MPI_SOURCE,
                       tag,
                       comm,
-                      static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                      MPI_STATUS_IGNORE);
       AssertThrowMPI(ierr);
 
       return Utilities::unpack<XDMFEntry>(buffer, false);
index 628554427851a7b464379c1d4cbf1c457cf6a280..fcb0344c04685f0d2839928f5c42abcc99d4ca10 100644 (file)
@@ -398,23 +398,21 @@ namespace Utilities
       std::vector<unsigned int> origins(n_recv_from);
       for (auto &el : origins)
         {
-          const int ierr =
-            MPI_Recv(&el,
-                     1,
-                     MPI_UNSIGNED,
-                     MPI_ANY_SOURCE,
-                     mpi_tag,
-                     mpi_comm,
-                     static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+          const int ierr = MPI_Recv(&el,
+                                    1,
+                                    MPI_UNSIGNED,
+                                    MPI_ANY_SOURCE,
+                                    mpi_tag,
+                                    mpi_comm,
+                                    MPI_STATUS_IGNORE);
           AssertThrowMPI(ierr);
         }
 
       if (destinations.size() > 0)
         {
-          const int ierr =
-            MPI_Waitall(destinations.size(),
-                        send_requests.data(),
-                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+          const int ierr = MPI_Waitall(destinations.size(),
+                                       send_requests.data(),
+                                       MPI_STATUSES_IGNORE);
           AssertThrowMPI(ierr);
         }
 
@@ -935,8 +933,7 @@ namespace Utilities
       // Before exiting, wait for nonblocking communication to complete:
       for (auto request : requests)
         {
-          const int ierr =
-            MPI_Wait(request, static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+          const int ierr = MPI_Wait(request, MPI_STATUS_IGNORE);
           AssertThrowMPI(ierr);
         }
 
@@ -1156,7 +1153,7 @@ namespace Utilities
 #  if 0
       // wait for non-blocking barrier to finish. This is a noop the
       // first time we lock().
-      const int ierr = MPI_Wait(&request, static_cast<MPI_Status*>(MPI_STATUS_IGNORE));
+      const int ierr = MPI_Wait(&request, MPI_STATUS_IGNORE);
       AssertThrowMPI(ierr);
 #  else
       // nothing to do as blocking barrier already completed
index c4f12ea5decd9782572d8f13f93d1953a59ce330..3beb029a2d609e38a35e4f663c62ae79f2475925 100644 (file)
@@ -310,7 +310,7 @@ namespace Utilities
                                   status.MPI_SOURCE,
                                   status.MPI_TAG,
                                   comm,
-                                  static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                                  MPI_STATUS_IGNORE);
                   AssertThrowMPI(ierr);
                   // process message: loop over all intervals
                   for (auto interval : buffer)
@@ -414,10 +414,9 @@ namespace Utilities
           // 5) make sure that all messages have been sent
           if (request.size() > 0)
             {
-              const int ierr =
-                MPI_Waitall(request.size(),
-                            request.data(),
-                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+              const int ierr = MPI_Waitall(request.size(),
+                                           request.data(),
+                                           MPI_STATUSES_IGNORE);
               AssertThrowMPI(ierr);
             }
 
@@ -710,10 +709,9 @@ namespace Utilities
 
           if (send_requests.size() > 0)
             {
-              const auto ierr =
-                MPI_Waitall(send_requests.size(),
-                            send_requests.data(),
-                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+              const auto ierr = MPI_Waitall(send_requests.size(),
+                                            send_requests.data(),
+                                            MPI_STATUSES_IGNORE);
               AssertThrowMPI(ierr);
             }
 
index 59c28fa74fa650e7bacd3f29d9ab4d83d63e76f4..693042d549a90d47cc50fed5d852bb6a608f0ed0 100644 (file)
@@ -382,11 +382,10 @@ namespace Utilities
                                     requests);
       export_to_ghosted_array_finish(make_array_view(ghost_indices), requests);
       int       flag = 0;
-      const int ierr =
-        MPI_Testall(requests.size(),
-                    requests.data(),
-                    &flag,
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+      const int ierr = MPI_Testall(requests.size(),
+                                   requests.data(),
+                                   &flag,
+                                   MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
       Assert(flag == 1,
              ExcMessage(
index 10476f709d81b2fadcee0b63f55963bb8473eee2..361af19d8bdd58aaea56c1cfa22dd4c0588abe93 100644 (file)
@@ -560,7 +560,7 @@ namespace parallel
           &buffer_size,
           1,
           Utilities::MPI::mpi_type_id_for_type<decltype(buffer_size)>,
-          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+          MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
 
         // global position in file
@@ -574,7 +574,7 @@ namespace parallel
           buffer.data(),
           buffer.size(), // local buffer
           MPI_CHAR,
-          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+          MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
 
         ierr = MPI_File_close(&fh);
@@ -666,7 +666,7 @@ namespace parallel
           &buffer_size,
           1,
           Utilities::MPI::mpi_type_id_for_type<decltype(buffer_size)>,
-          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+          MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
 
         std::uint64_t offset = 0;
@@ -692,7 +692,7 @@ namespace parallel
           buffer.data(),
           buffer.size(), // local buffer
           MPI_CHAR,
-          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+          MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
 
         ierr = MPI_File_close(&fh);
index f2de206a7e98f33446318a99f31d6a6568c2e5c1..1ee351481e5121e247b668a119f681f390b69365 100644 (file)
@@ -252,16 +252,15 @@ namespace parallel
                               it,
                               mpi_tag,
                               this->mpi_communicator,
-                              static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                              MPI_STATUS_IGNORE);
               AssertThrowMPI(ierr);
             }
 
           if (requests.size() > 0)
             {
-              ierr =
-                MPI_Waitall(requests.size(),
-                            requests.data(),
-                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+              ierr = MPI_Waitall(requests.size(),
+                                 requests.data(),
+                                 MPI_STATUSES_IGNORE);
               AssertThrowMPI(ierr);
             }
 
@@ -1450,7 +1449,7 @@ namespace parallel
             sizes_fixed_cumulative.data(),
             sizes_fixed_cumulative.size(),
             MPI_UNSIGNED,
-            static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+            MPI_STATUS_IGNORE);
           AssertThrowMPI(ierr);
         }
 
@@ -1470,8 +1469,7 @@ namespace parallel
                                                     src_data_fixed.data(),
                                                     src_data_fixed.size(),
                                                     MPI_BYTE,
-                                                    static_cast<MPI_Status *>(
-                                                      MPI_STATUS_IGNORE));
+                                                    MPI_STATUS_IGNORE);
       AssertThrowMPI(ierr);
 
       ierr = MPI_File_close(&fh);
@@ -1527,7 +1525,7 @@ namespace parallel
             src_sizes_variable.data(),
             src_sizes_variable.size(),
             MPI_INT,
-            static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+            MPI_STATUS_IGNORE);
           AssertThrowMPI(ierr);
         }
 
@@ -1555,8 +1553,7 @@ namespace parallel
                                                       src_data_variable.data(),
                                                       src_data_variable.size(),
                                                       MPI_BYTE,
-                                                      static_cast<MPI_Status *>(
-                                                        MPI_STATUS_IGNORE));
+                                                      MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
 
 
@@ -1624,7 +1621,7 @@ namespace parallel
         sizes_fixed_cumulative.data(),
         sizes_fixed_cumulative.size(),
         MPI_UNSIGNED,
-        static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+        MPI_STATUS_IGNORE);
       AssertThrowMPI(ierr);
 
       // Allocate sufficient memory.
@@ -1642,14 +1639,12 @@ namespace parallel
         size_header +
         static_cast<MPI_Offset>(global_first_cell) * bytes_per_cell;
 
-      ierr =
-        Utilities::MPI::LargeCount::File_read_at_c(fh,
-                                                   my_global_file_position,
-                                                   dest_data_fixed.data(),
-                                                   dest_data_fixed.size(),
-                                                   MPI_BYTE,
-                                                   static_cast<MPI_Status *>(
-                                                     MPI_STATUS_IGNORE));
+      ierr = Utilities::MPI::LargeCount::File_read_at_c(fh,
+                                                        my_global_file_position,
+                                                        dest_data_fixed.data(),
+                                                        dest_data_fixed.size(),
+                                                        MPI_BYTE,
+                                                        MPI_STATUS_IGNORE);
       AssertThrowMPI(ierr);
 
 
@@ -1689,7 +1684,7 @@ namespace parallel
           dest_sizes_variable.data(),
           dest_sizes_variable.size(),
           MPI_INT,
-          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+          MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
 
 
@@ -1721,8 +1716,7 @@ namespace parallel
                                                      dest_data_variable.data(),
                                                      dest_data_variable.size(),
                                                      MPI_BYTE,
-                                                     static_cast<MPI_Status *>(
-                                                       MPI_STATUS_IGNORE));
+                                                     MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
 
         ierr = MPI_File_close(&fh);
index ed1c14af41f5bab8e143400fc9dfd9e8507dc2aa..29461a2d23a65d7d9ce8abdf93188f3404b930a8 100644 (file)
@@ -3754,7 +3754,7 @@ namespace GridTools
                         source,
                         mpi_tag,
                         triangulation.get_communicator(),
-                        static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                        MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
       }
 
@@ -3818,7 +3818,7 @@ namespace GridTools
                         source,
                         mpi_tag2,
                         triangulation.get_communicator(),
-                        static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                        MPI_STATUS_IGNORE);
         AssertThrowMPI(ierr);
       }
 
index 26ae9926c43b241b48255e11bcb3f9f430304b40..0b45cbfb96310e2a2c9798d478595e0f912edd68 100644 (file)
@@ -1239,9 +1239,7 @@ namespace SparsityTools
     if (requests.size() > 0)
       {
         const int ierr =
-          MPI_Waitall(requests.size(),
-                      requests.data(),
-                      static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+          MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
         AssertThrowMPI(ierr);
       }
   }
index 09b69a9928fe7cba5ab8b7a8dd12666e29f887b1..c3600fbe3a3fb4e2176ba66f702988c65f705d79 100644 (file)
@@ -603,9 +603,7 @@ namespace internal
             }
 
           const int ierr =
-            MPI_Waitall(requests.size(),
-                        requests.data(),
-                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+            MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
           AssertThrowMPI(ierr);
         }
 
@@ -642,9 +640,7 @@ namespace internal
             }
 
           const int ierr =
-            MPI_Waitall(requests.size(),
-                        requests.data(),
-                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+            MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
           AssertThrowMPI(ierr);
         }
 
@@ -980,7 +976,7 @@ namespace internal
               MPI_Waitany(sm_ghost_ranks.size() + ghost_targets_data.size(),
                           requests.data() + sm_import_ranks.size(),
                           &i,
-                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                          MPI_STATUS_IGNORE);
             AssertThrowMPI(ierr);
 
             const auto s = split(i);
@@ -1068,9 +1064,7 @@ namespace internal
           }
 
         const int ierr =
-          MPI_Waitall(requests.size(),
-                      requests.data(),
-                      static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+          MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
         AssertThrowMPI(ierr);
 
 #endif
@@ -1262,7 +1256,7 @@ namespace internal
                             ghost_targets_data.size(),
                           requests.data() + sm_ghost_ranks.size(),
                           &i,
-                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
+                          MPI_STATUS_IGNORE);
             AssertThrowMPI(ierr);
 
             const auto &s = split(i);
@@ -1325,9 +1319,7 @@ namespace internal
           }
 
         const int ierr =
-          MPI_Waitall(requests.size(),
-                      requests.data(),
-                      static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+          MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
         AssertThrowMPI(ierr);
 #endif
       }
index 3c2abd5b0d3564c1e3e09a09035b5965a11fd275..fe4e35562ac467b508825cc8f07e5908317bfbaf 100644 (file)
@@ -362,10 +362,9 @@ namespace internal
           // * wait for all MPI_Isend to complete
           if (requests.size() > 0)
             {
-              const int ierr =
-                MPI_Waitall(requests.size(),
-                            requests.data(),
-                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+              const int ierr = MPI_Waitall(requests.size(),
+                                           requests.data(),
+                                           MPI_STATUSES_IGNORE);
               AssertThrowMPI(ierr);
               requests.clear();
             }
index 8d45f39ddc08538c3c091d9d4f4d8a699e2401e0..e55fe4da7f58ecf8c38a163df108106a4f20c441 100644 (file)
@@ -1800,9 +1800,7 @@ namespace Particles
           AssertThrowMPI(ierr);
         }
       const int ierr =
-        MPI_Waitall(2 * n_neighbors,
-                    n_requests.data(),
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+        MPI_Waitall(2 * n_neighbors, n_requests.data(), MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
     }
 
@@ -1857,9 +1855,7 @@ namespace Particles
             recv_ops++;
           }
       const int ierr =
-        MPI_Waitall(send_ops + recv_ops,
-                    requests.data(),
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+        MPI_Waitall(send_ops + recv_ops, requests.data(), MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
     }
 
@@ -2017,9 +2013,7 @@ namespace Particles
             recv_ops++;
           }
       const int ierr =
-        MPI_Waitall(send_ops + recv_ops,
-                    requests.data(),
-                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
+        MPI_Waitall(send_ops + recv_ops, requests.data(), MPI_STATUSES_IGNORE);
       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.