]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Cast MPI_STATUS[ES]_IGNORE
authorDaniel Arndt <arndtd@ornl.gov>
Mon, 9 Jan 2023 18:00:27 +0000 (13:00 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Mon, 9 Jan 2023 18:01:24 +0000 (13:01 -0500)
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 49e41af38bf4725714bfb0ea6a6923bbba27509d..d6e300416535135fe0472fc43a35f7d90c7100a2 100644 (file)
@@ -1159,7 +1159,7 @@ namespace Utilities
        * {
        *   static MPI_Request request = MPI_REQUEST_NULL;
        *   MPI_InitFinalize::register_request(request);
-       *   MPI_Wait(&request, MPI_STATUS_IGNORE);
+       *   MPI_Wait(&request, static_cast<MPI_Status*>(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,
-                            MPI_STATUS_IGNORE);
+                            static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
             AssertThrowMPI(ierr);
             Assert(received_objects.find(rank) == received_objects.end(),
                    ExcInternalError(
@@ -1956,9 +1956,10 @@ namespace Utilities
       }
 
       // Wait to have sent all objects.
-      const int ierr = MPI_Waitall(send_to.size(),
-                                   buffer_send_requests.data(),
-                                   MPI_STATUSES_IGNORE);
+      const int ierr =
+        MPI_Waitall(send_to.size(),
+                    buffer_send_requests.data(),
+                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
       AssertThrowMPI(ierr);
 
       return received_objects;
@@ -2357,7 +2358,8 @@ 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, MPI_STATUS_IGNORE);
+        const int ierr =
+          MPI_Wait(&request, static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
       };
       auto cleanup = [send_buffer = std::move(send_buffer)]() {
index 2d8fede2c97c7b38fbea4e2ca82f97cf37b119cb..bf236d4cb2e030b6defe186c08ac705fe47946d7 100644 (file)
@@ -445,13 +445,14 @@ 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,
-                                               MPI_STATUS_IGNORE);
+                  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));
                   AssertThrowMPI(ierr_3);
 
                   result = combiner(result, Utilities::unpack<T>(temp, false));
index 6667de282647017dc188024d966359fd198cdd69..7300522bac723c3dd69f4be278e4106a87b3f537 100644 (file)
@@ -1908,13 +1908,14 @@ 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,
-                                            MPI_STATUS_IGNORE);
+                  const int ierr =
+                    MPI_Recv(recv_buffer.data(),
+                             recv_buffer.size(),
+                             MPI_CHAR,
+                             target,
+                             tag_deliver,
+                             comm,
+                             static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
                   AssertThrowMPI(ierr);
                 }
 
@@ -2000,7 +2001,7 @@ namespace Utilities
                             other_rank,
                             tag_request,
                             comm,
-                            MPI_STATUS_IGNORE);
+                            static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
             AssertThrowMPI(ierr);
 
             // Allocate memory for an answer message to the current request,
@@ -2054,9 +2055,10 @@ namespace Utilities
       {
 #  ifdef DEAL_II_WITH_MPI
         int        all_ranks_reached_barrier;
-        const auto ierr = MPI_Test(&barrier_request,
-                                   &all_ranks_reached_barrier,
-                                   MPI_STATUS_IGNORE);
+        const auto ierr =
+          MPI_Test(&barrier_request,
+                   &all_ranks_reached_barrier,
+                   static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
         return all_ranks_reached_barrier != 0;
 #  else
@@ -2077,18 +2079,21 @@ namespace Utilities
         {
           if (send_requests.size() > 0)
             {
-              const int ierr = MPI_Waitall(send_requests.size(),
-                                           send_requests.data(),
-                                           MPI_STATUSES_IGNORE);
+              const int ierr =
+                MPI_Waitall(send_requests.size(),
+                            send_requests.data(),
+                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
               AssertThrowMPI(ierr);
             }
 
-          int ierr = MPI_Wait(&barrier_request, MPI_STATUS_IGNORE);
+          int ierr = MPI_Wait(&barrier_request,
+                              static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
           AssertThrowMPI(ierr);
 
           for (auto &i : request_requests)
             {
-              ierr = MPI_Wait(i.get(), MPI_STATUS_IGNORE);
+              ierr =
+                MPI_Wait(i.get(), static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
               AssertThrowMPI(ierr);
             }
 
@@ -2333,13 +2338,14 @@ 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,
-                                        MPI_STATUS_IGNORE);
+              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));
               AssertThrowMPI(ierr);
             }
 
@@ -2365,18 +2371,20 @@ 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(),
-                                         MPI_STATUSES_IGNORE);
+            const int ierr =
+              MPI_Waitall(send_request_requests.size(),
+                          send_request_requests.data(),
+                          static_cast<MPI_Status *>(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(),
-                                         MPI_STATUSES_IGNORE);
+            const int ierr =
+              MPI_Waitall(send_answer_requests.size(),
+                          send_answer_requests.data(),
+                          static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
             AssertThrowMPI(ierr);
           }
 #  endif
index 0c033164366e189b6c7a1b2d2fddaf7d1bedefcb..08618587768cd4babe931342f4d012ee1d3c2784 100644 (file)
@@ -184,7 +184,9 @@ namespace Utilities
 
       // wait that all data packages have been sent
       const int ierr =
-        MPI_Waitall(send_ranks.size(), requests.data(), MPI_STATUSES_IGNORE);
+        MPI_Waitall(send_ranks.size(),
+                    requests.data(),
+                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
       AssertThrowMPI(ierr);
 #endif
     }
index 7f3c1219780bc9839d97be07de8030ed71547bf5..b6cb1870b0ce230ecb397f153f10806195552bef 100644 (file)
@@ -393,7 +393,7 @@ namespace Utilities
                           status.MPI_SOURCE,
                           internal::Tags::remote_point_evaluation,
                           tria->get_communicator(),
-                          MPI_STATUS_IGNORE);
+                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
           AssertThrowMPI(ierr);
 
           temp_recv_map[status.MPI_SOURCE] =
@@ -402,7 +402,9 @@ namespace Utilities
 
       // make sure all messages have been sent
       const int ierr =
-        MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+        MPI_Waitall(requests.size(),
+                    requests.data(),
+                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
       AssertThrowMPI(ierr);
 
       // copy received data into output vector
@@ -551,7 +553,7 @@ namespace Utilities
                           status.MPI_SOURCE,
                           internal::Tags::remote_point_evaluation,
                           tria->get_communicator(),
-                          MPI_STATUS_IGNORE);
+                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
           AssertThrowMPI(ierr);
 
           const auto recv_buffer_unpacked =
@@ -577,7 +579,9 @@ namespace Utilities
         }
 
       const int ierr =
-        MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+        MPI_Waitall(requests.size(),
+                    requests.data(),
+                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
       AssertThrowMPI(ierr);
 
       // sort for easy access during function call
index c1d7a6856ea7cfb0a0802a48555ff4af085856bd..3f7befdf87170a0728c466fd9894ffc4bd2ede8d 100644 (file)
@@ -195,7 +195,9 @@ namespace Utilities
       if (requests.size() > 0)
         {
           const int ierr =
-            MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+            MPI_Waitall(requests.size(),
+                        requests.data(),
+                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
           AssertThrowMPI(ierr);
         }
       requests.resize(0);
@@ -575,7 +577,9 @@ namespace Utilities
         {
           AssertDimension(locally_owned_array.size(), locally_owned_size());
           const int ierr =
-            MPI_Waitall(n_import_targets, requests.data(), MPI_STATUSES_IGNORE);
+            MPI_Waitall(n_import_targets,
+                        requests.data(),
+                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
           AssertThrowMPI(ierr);
 
           const Number *read_position = temporary_storage.data();
@@ -711,9 +715,10 @@ 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],
-                                       MPI_STATUSES_IGNORE);
+          const int ierr =
+            MPI_Waitall(n_ghost_targets,
+                        &requests[n_import_targets],
+                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
           AssertThrowMPI(ierr);
         }
       else
index b5344d499fa041b97ca97ababbe126bdb40fea83..9cdac167144f81bf1477cdbeed841b7be6321a95 100644 (file)
@@ -4682,14 +4682,17 @@ namespace GridTools
       if (requests.size() > 0)
         {
           const int ierr =
-            MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+            MPI_Waitall(requests.size(),
+                        requests.data(),
+                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
           AssertThrowMPI(ierr);
         }
       if (reply_requests.size() > 0)
         {
-          const int ierr = MPI_Waitall(reply_requests.size(),
-                                       reply_requests.data(),
-                                       MPI_STATUSES_IGNORE);
+          const int ierr =
+            MPI_Waitall(reply_requests.size(),
+                        reply_requests.data(),
+                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
           AssertThrowMPI(ierr);
         }
 
index 9b2c26cf730bcbee2a5655e3ad84a2a9b84acf2d..56f9aba596b6e8169005f1543cc3399a7c4c03ae 100644 (file)
@@ -352,7 +352,7 @@ namespace internal
                           status.MPI_SOURCE,
                           tag,
                           mpi_communicator,
-                          MPI_STATUS_IGNORE);
+                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
           AssertThrowMPI(ierr);
 
           const auto data =
@@ -363,7 +363,9 @@ namespace internal
         }
 
       const int ierr =
-        MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+        MPI_Waitall(requests.size(),
+                    requests.data(),
+                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
       AssertThrowMPI(ierr);
 
       sort_constraints();
@@ -471,7 +473,7 @@ namespace internal
                           status.MPI_SOURCE,
                           tag,
                           mpi_communicator,
-                          MPI_STATUS_IGNORE);
+                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
           AssertThrowMPI(ierr);
 
           const auto received_locally_relevant_constrain =
@@ -483,7 +485,9 @@ namespace internal
         }
 
       const int ierr =
-        MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+        MPI_Waitall(requests.size(),
+                    requests.data(),
+                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
       AssertThrowMPI(ierr);
 
       sort_constraints();
index eab0616c3d06c4f132f6d5895c3beb5f12b7c46f..18a579b366f52b3ca4effc5adc6f13f3f23b1b31 100644 (file)
@@ -1339,10 +1339,11 @@ 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,
-                                           MPI_STATUSES_IGNORE);
+              const int ierr =
+                MPI_Testall(update_ghost_values_requests.size(),
+                            update_ghost_values_requests.data(),
+                            &flag,
+                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
               AssertThrowMPI(ierr);
               Assert(flag == 1,
                      ExcMessage(
@@ -1351,10 +1352,11 @@ namespace LinearAlgebra
             }
           if (compress_requests.size() > 0)
             {
-              const int ierr = MPI_Testall(compress_requests.size(),
-                                           compress_requests.data(),
-                                           &flag,
-                                           MPI_STATUSES_IGNORE);
+              const int ierr =
+                MPI_Testall(compress_requests.size(),
+                            compress_requests.data(),
+                            &flag,
+                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
               AssertThrowMPI(ierr);
               Assert(flag == 1,
                      ExcMessage("MPI found unfinished compress() requests "
index 1dd8eb62e2644d16665d2e2c7e5354ed51bcf057..0785178670113c8ec44052d181ddaee721bf9d6b 100644 (file)
@@ -730,7 +730,7 @@ namespace internal
               status.MPI_SOURCE,
               Utilities::MPI::internal::Tags::fine_dof_handler_view_reinit,
               communicator,
-              MPI_STATUS_IGNORE);
+              static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
             AssertThrowMPI(ierr_3);
 
             for (unsigned int i = 0; i < buffer.size();)
@@ -766,7 +766,9 @@ namespace internal
           }
 
         const int ierr_1 =
-          MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+          MPI_Waitall(requests.size(),
+                      requests.data(),
+                      static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
         AssertThrowMPI(ierr_1);
       }
 
index fb6ccc6adf93399f788cef2ab1b66c99e7471dca..7f017acd03d51dff8122642cf4189794c1bfdc06 100644 (file)
@@ -7901,8 +7901,14 @@ 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, MPI_STATUS_IGNORE);
+        ierr =
+          Utilities::MPI::LargeCount::File_write_at_c(fh,
+                                                      0,
+                                                      &header,
+                                                      sizeof(header),
+                                                      MPI_CHAR,
+                                                      static_cast<MPI_Status *>(
+                                                        MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
 
         ierr = Utilities::MPI::LargeCount::File_write_at_c(
@@ -7911,7 +7917,7 @@ namespace DataOutBase
           chunk_sizes.data(),
           chunk_sizes.size(),
           MPI_UINT64_T,
-          MPI_STATUS_IGNORE);
+          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
       }
 
@@ -7926,7 +7932,12 @@ 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, MPI_STATUS_IGNORE);
+        fh,
+        offset,
+        my_buffer.data(),
+        my_size,
+        MPI_CHAR,
+        static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
       AssertThrowMPI(ierr);
     }
 
@@ -8140,8 +8151,14 @@ 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, MPI_STATUS_IGNORE);
+      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));
       AssertThrowMPI(ierr);
     }
 
@@ -8176,12 +8193,14 @@ 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,
-                                                           MPI_STATUS_IGNORE);
+    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));
     AssertThrowMPI(ierr);
 
     if (myrank == n_ranks - 1)
@@ -8194,12 +8213,14 @@ 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,
-                                                           MPI_STATUS_IGNORE);
+        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));
         AssertThrowMPI(ierr);
       }
   }
@@ -8490,7 +8511,7 @@ DataOutInterface<dim, spacedim>::create_xdmf_entry(
                       status.MPI_SOURCE,
                       tag,
                       comm,
-                      MPI_STATUS_IGNORE);
+                      static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
       AssertThrowMPI(ierr);
 
       return Utilities::unpack<XDMFEntry>(buffer, false);
index fcb0344c04685f0d2839928f5c42abcc99d4ca10..628554427851a7b464379c1d4cbf1c457cf6a280 100644 (file)
@@ -398,21 +398,23 @@ 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,
-                                    MPI_STATUS_IGNORE);
+          const int ierr =
+            MPI_Recv(&el,
+                     1,
+                     MPI_UNSIGNED,
+                     MPI_ANY_SOURCE,
+                     mpi_tag,
+                     mpi_comm,
+                     static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
           AssertThrowMPI(ierr);
         }
 
       if (destinations.size() > 0)
         {
-          const int ierr = MPI_Waitall(destinations.size(),
-                                       send_requests.data(),
-                                       MPI_STATUSES_IGNORE);
+          const int ierr =
+            MPI_Waitall(destinations.size(),
+                        send_requests.data(),
+                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
           AssertThrowMPI(ierr);
         }
 
@@ -933,7 +935,8 @@ namespace Utilities
       // Before exiting, wait for nonblocking communication to complete:
       for (auto request : requests)
         {
-          const int ierr = MPI_Wait(request, MPI_STATUS_IGNORE);
+          const int ierr =
+            MPI_Wait(request, static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
           AssertThrowMPI(ierr);
         }
 
@@ -1153,7 +1156,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, MPI_STATUS_IGNORE);
+      const int ierr = MPI_Wait(&request, static_cast<MPI_Status*>(MPI_STATUS_IGNORE));
       AssertThrowMPI(ierr);
 #  else
       // nothing to do as blocking barrier already completed
index 3beb029a2d609e38a35e4f663c62ae79f2475925..c4f12ea5decd9782572d8f13f93d1953a59ce330 100644 (file)
@@ -310,7 +310,7 @@ namespace Utilities
                                   status.MPI_SOURCE,
                                   status.MPI_TAG,
                                   comm,
-                                  MPI_STATUS_IGNORE);
+                                  static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
                   AssertThrowMPI(ierr);
                   // process message: loop over all intervals
                   for (auto interval : buffer)
@@ -414,9 +414,10 @@ namespace Utilities
           // 5) make sure that all messages have been sent
           if (request.size() > 0)
             {
-              const int ierr = MPI_Waitall(request.size(),
-                                           request.data(),
-                                           MPI_STATUSES_IGNORE);
+              const int ierr =
+                MPI_Waitall(request.size(),
+                            request.data(),
+                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
               AssertThrowMPI(ierr);
             }
 
@@ -709,9 +710,10 @@ namespace Utilities
 
           if (send_requests.size() > 0)
             {
-              const auto ierr = MPI_Waitall(send_requests.size(),
-                                            send_requests.data(),
-                                            MPI_STATUSES_IGNORE);
+              const auto ierr =
+                MPI_Waitall(send_requests.size(),
+                            send_requests.data(),
+                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
               AssertThrowMPI(ierr);
             }
 
index 693042d549a90d47cc50fed5d852bb6a608f0ed0..59c28fa74fa650e7bacd3f29d9ab4d83d63e76f4 100644 (file)
@@ -382,10 +382,11 @@ 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,
-                                   MPI_STATUSES_IGNORE);
+      const int ierr =
+        MPI_Testall(requests.size(),
+                    requests.data(),
+                    &flag,
+                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
       AssertThrowMPI(ierr);
       Assert(flag == 1,
              ExcMessage(
index 361af19d8bdd58aaea56c1cfa22dd4c0588abe93..10476f709d81b2fadcee0b63f55963bb8473eee2 100644 (file)
@@ -560,7 +560,7 @@ namespace parallel
           &buffer_size,
           1,
           Utilities::MPI::mpi_type_id_for_type<decltype(buffer_size)>,
-          MPI_STATUS_IGNORE);
+          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
 
         // global position in file
@@ -574,7 +574,7 @@ namespace parallel
           buffer.data(),
           buffer.size(), // local buffer
           MPI_CHAR,
-          MPI_STATUS_IGNORE);
+          static_cast<MPI_Status *>(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)>,
-          MPI_STATUS_IGNORE);
+          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
 
         std::uint64_t offset = 0;
@@ -692,7 +692,7 @@ namespace parallel
           buffer.data(),
           buffer.size(), // local buffer
           MPI_CHAR,
-          MPI_STATUS_IGNORE);
+          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
 
         ierr = MPI_File_close(&fh);
index 1ee351481e5121e247b668a119f681f390b69365..f2de206a7e98f33446318a99f31d6a6568c2e5c1 100644 (file)
@@ -252,15 +252,16 @@ namespace parallel
                               it,
                               mpi_tag,
                               this->mpi_communicator,
-                              MPI_STATUS_IGNORE);
+                              static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
               AssertThrowMPI(ierr);
             }
 
           if (requests.size() > 0)
             {
-              ierr = MPI_Waitall(requests.size(),
-                                 requests.data(),
-                                 MPI_STATUSES_IGNORE);
+              ierr =
+                MPI_Waitall(requests.size(),
+                            requests.data(),
+                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
               AssertThrowMPI(ierr);
             }
 
@@ -1449,7 +1450,7 @@ namespace parallel
             sizes_fixed_cumulative.data(),
             sizes_fixed_cumulative.size(),
             MPI_UNSIGNED,
-            MPI_STATUS_IGNORE);
+            static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
           AssertThrowMPI(ierr);
         }
 
@@ -1469,7 +1470,8 @@ namespace parallel
                                                     src_data_fixed.data(),
                                                     src_data_fixed.size(),
                                                     MPI_BYTE,
-                                                    MPI_STATUS_IGNORE);
+                                                    static_cast<MPI_Status *>(
+                                                      MPI_STATUS_IGNORE));
       AssertThrowMPI(ierr);
 
       ierr = MPI_File_close(&fh);
@@ -1525,7 +1527,7 @@ namespace parallel
             src_sizes_variable.data(),
             src_sizes_variable.size(),
             MPI_INT,
-            MPI_STATUS_IGNORE);
+            static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
           AssertThrowMPI(ierr);
         }
 
@@ -1553,7 +1555,8 @@ namespace parallel
                                                       src_data_variable.data(),
                                                       src_data_variable.size(),
                                                       MPI_BYTE,
-                                                      MPI_STATUS_IGNORE);
+                                                      static_cast<MPI_Status *>(
+                                                        MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
 
 
@@ -1621,7 +1624,7 @@ namespace parallel
         sizes_fixed_cumulative.data(),
         sizes_fixed_cumulative.size(),
         MPI_UNSIGNED,
-        MPI_STATUS_IGNORE);
+        static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
       AssertThrowMPI(ierr);
 
       // Allocate sufficient memory.
@@ -1639,12 +1642,14 @@ 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,
-                                                        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,
+                                                   static_cast<MPI_Status *>(
+                                                     MPI_STATUS_IGNORE));
       AssertThrowMPI(ierr);
 
 
@@ -1684,7 +1689,7 @@ namespace parallel
           dest_sizes_variable.data(),
           dest_sizes_variable.size(),
           MPI_INT,
-          MPI_STATUS_IGNORE);
+          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
 
 
@@ -1716,7 +1721,8 @@ namespace parallel
                                                      dest_data_variable.data(),
                                                      dest_data_variable.size(),
                                                      MPI_BYTE,
-                                                     MPI_STATUS_IGNORE);
+                                                     static_cast<MPI_Status *>(
+                                                       MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
 
         ierr = MPI_File_close(&fh);
index 29461a2d23a65d7d9ce8abdf93188f3404b930a8..ed1c14af41f5bab8e143400fc9dfd9e8507dc2aa 100644 (file)
@@ -3754,7 +3754,7 @@ namespace GridTools
                         source,
                         mpi_tag,
                         triangulation.get_communicator(),
-                        MPI_STATUS_IGNORE);
+                        static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
       }
 
@@ -3818,7 +3818,7 @@ namespace GridTools
                         source,
                         mpi_tag2,
                         triangulation.get_communicator(),
-                        MPI_STATUS_IGNORE);
+                        static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
         AssertThrowMPI(ierr);
       }
 
index 0b45cbfb96310e2a2c9798d478595e0f912edd68..26ae9926c43b241b48255e11bcb3f9f430304b40 100644 (file)
@@ -1239,7 +1239,9 @@ namespace SparsityTools
     if (requests.size() > 0)
       {
         const int ierr =
-          MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+          MPI_Waitall(requests.size(),
+                      requests.data(),
+                      static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
         AssertThrowMPI(ierr);
       }
   }
index c3600fbe3a3fb4e2176ba66f702988c65f705d79..09b69a9928fe7cba5ab8b7a8dd12666e29f887b1 100644 (file)
@@ -603,7 +603,9 @@ namespace internal
             }
 
           const int ierr =
-            MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+            MPI_Waitall(requests.size(),
+                        requests.data(),
+                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
           AssertThrowMPI(ierr);
         }
 
@@ -640,7 +642,9 @@ namespace internal
             }
 
           const int ierr =
-            MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+            MPI_Waitall(requests.size(),
+                        requests.data(),
+                        static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
           AssertThrowMPI(ierr);
         }
 
@@ -976,7 +980,7 @@ namespace internal
               MPI_Waitany(sm_ghost_ranks.size() + ghost_targets_data.size(),
                           requests.data() + sm_import_ranks.size(),
                           &i,
-                          MPI_STATUS_IGNORE);
+                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
             AssertThrowMPI(ierr);
 
             const auto s = split(i);
@@ -1064,7 +1068,9 @@ namespace internal
           }
 
         const int ierr =
-          MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+          MPI_Waitall(requests.size(),
+                      requests.data(),
+                      static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
         AssertThrowMPI(ierr);
 
 #endif
@@ -1256,7 +1262,7 @@ namespace internal
                             ghost_targets_data.size(),
                           requests.data() + sm_ghost_ranks.size(),
                           &i,
-                          MPI_STATUS_IGNORE);
+                          static_cast<MPI_Status *>(MPI_STATUS_IGNORE));
             AssertThrowMPI(ierr);
 
             const auto &s = split(i);
@@ -1319,7 +1325,9 @@ namespace internal
           }
 
         const int ierr =
-          MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
+          MPI_Waitall(requests.size(),
+                      requests.data(),
+                      static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
         AssertThrowMPI(ierr);
 #endif
       }
index fe4e35562ac467b508825cc8f07e5908317bfbaf..3c2abd5b0d3564c1e3e09a09035b5965a11fd275 100644 (file)
@@ -362,9 +362,10 @@ namespace internal
           // * wait for all MPI_Isend to complete
           if (requests.size() > 0)
             {
-              const int ierr = MPI_Waitall(requests.size(),
-                                           requests.data(),
-                                           MPI_STATUSES_IGNORE);
+              const int ierr =
+                MPI_Waitall(requests.size(),
+                            requests.data(),
+                            static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
               AssertThrowMPI(ierr);
               requests.clear();
             }
index e55fe4da7f58ecf8c38a163df108106a4f20c441..8d45f39ddc08538c3c091d9d4f4d8a699e2401e0 100644 (file)
@@ -1800,7 +1800,9 @@ namespace Particles
           AssertThrowMPI(ierr);
         }
       const int ierr =
-        MPI_Waitall(2 * n_neighbors, n_requests.data(), MPI_STATUSES_IGNORE);
+        MPI_Waitall(2 * n_neighbors,
+                    n_requests.data(),
+                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
       AssertThrowMPI(ierr);
     }
 
@@ -1855,7 +1857,9 @@ namespace Particles
             recv_ops++;
           }
       const int ierr =
-        MPI_Waitall(send_ops + recv_ops, requests.data(), MPI_STATUSES_IGNORE);
+        MPI_Waitall(send_ops + recv_ops,
+                    requests.data(),
+                    static_cast<MPI_Status *>(MPI_STATUSES_IGNORE));
       AssertThrowMPI(ierr);
     }
 
@@ -2013,7 +2017,9 @@ namespace Particles
             recv_ops++;
           }
       const int ierr =
-        MPI_Waitall(send_ops + recv_ops, requests.data(), MPI_STATUSES_IGNORE);
+        MPI_Waitall(send_ops + recv_ops,
+                    requests.data(),
+                    static_cast<MPI_Status *>(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.