From 0ef0138a68f82cbf1ce759e1b5aaa38a2519df31 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 9 Jan 2023 13:00:27 -0500 Subject: [PATCH] Cast MPI_STATUS[ES]_IGNORE --- include/deal.II/base/mpi.h | 14 ++-- include/deal.II/base/mpi.templates.h | 15 +++-- .../deal.II/base/mpi_consensus_algorithms.h | 66 +++++++++++-------- .../mpi_noncontiguous_partitioner.templates.h | 4 +- .../base/mpi_remote_point_evaluation.h | 12 ++-- include/deal.II/base/partitioner.templates.h | 15 +++-- include/deal.II/grid/grid_tools.h | 11 ++-- .../lac/affine_constraints.templates.h | 12 ++-- .../lac/la_parallel_vector.templates.h | 18 ++--- .../mg_transfer_global_coarsening.templates.h | 6 +- source/base/data_out_base.cc | 59 +++++++++++------ source/base/mpi.cc | 27 ++++---- .../base/mpi_compute_index_owner_internal.cc | 16 +++-- source/base/partitioner.cc | 9 +-- source/distributed/fully_distributed_tria.cc | 8 +-- source/distributed/tria_base.cc | 40 ++++++----- source/grid/grid_tools.cc | 4 +- source/lac/sparsity_tools.cc | 4 +- source/matrix_free/vector_data_exchange.cc | 20 ++++-- source/multigrid/mg_transfer_internal.cc | 7 +- source/particles/particle_handler.cc | 12 +++- 21 files changed, 231 insertions(+), 148 deletions(-) diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index 49e41af38b..d6e3004165 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -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_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_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_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_IGNORE)); AssertThrowMPI(ierr); }; auto cleanup = [send_buffer = std::move(send_buffer)]() { diff --git a/include/deal.II/base/mpi.templates.h b/include/deal.II/base/mpi.templates.h index 2d8fede2c9..bf236d4cb2 100644 --- a/include/deal.II/base/mpi.templates.h +++ b/include/deal.II/base/mpi.templates.h @@ -445,13 +445,14 @@ namespace Utilities std::vector 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_IGNORE)); AssertThrowMPI(ierr_3); result = combiner(result, Utilities::unpack(temp, false)); diff --git a/include/deal.II/base/mpi_consensus_algorithms.h b/include/deal.II/base/mpi_consensus_algorithms.h index 6667de2826..7300522bac 100644 --- a/include/deal.II/base/mpi_consensus_algorithms.h +++ b/include/deal.II/base/mpi_consensus_algorithms.h @@ -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_IGNORE)); AssertThrowMPI(ierr); } @@ -2000,7 +2001,7 @@ namespace Utilities other_rank, tag_request, comm, - MPI_STATUS_IGNORE); + static_cast(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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); } - int ierr = MPI_Wait(&barrier_request, MPI_STATUS_IGNORE); + int ierr = MPI_Wait(&barrier_request, + static_cast(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_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_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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); } # endif diff --git a/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h b/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h index 0c03316436..0861858776 100644 --- a/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h +++ b/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h @@ -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_STATUSES_IGNORE)); AssertThrowMPI(ierr); #endif } diff --git a/include/deal.II/base/mpi_remote_point_evaluation.h b/include/deal.II/base/mpi_remote_point_evaluation.h index 7f3c121978..b6cb1870b0 100644 --- a/include/deal.II/base/mpi_remote_point_evaluation.h +++ b/include/deal.II/base/mpi_remote_point_evaluation.h @@ -393,7 +393,7 @@ namespace Utilities status.MPI_SOURCE, internal::Tags::remote_point_evaluation, tria->get_communicator(), - MPI_STATUS_IGNORE); + static_cast(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_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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); // sort for easy access during function call diff --git a/include/deal.II/base/partitioner.templates.h b/include/deal.II/base/partitioner.templates.h index c1d7a6856e..3f7befdf87 100644 --- a/include/deal.II/base/partitioner.templates.h +++ b/include/deal.II/base/partitioner.templates.h @@ -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_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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); } else diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index b5344d499f..9cdac16714 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); } diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index 9b2c26cf73..56f9aba596 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -352,7 +352,7 @@ namespace internal status.MPI_SOURCE, tag, mpi_communicator, - MPI_STATUS_IGNORE); + static_cast(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_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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); sort_constraints(); diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index eab0616c3d..18a579b366 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); Assert(flag == 1, ExcMessage("MPI found unfinished compress() requests " diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index 1dd8eb62e2..0785178670 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr_1); } diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index fb6ccc6adf..7f017acd03 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -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_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_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_IGNORE)); AssertThrowMPI(ierr); } @@ -8140,8 +8151,14 @@ DataOutInterface::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_IGNORE)); AssertThrowMPI(ierr); } @@ -8176,12 +8193,14 @@ DataOutInterface::write_vtu_in_parallel( // Locate specific offset for each processor. const MPI_Offset offset = static_cast(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_IGNORE)); AssertThrowMPI(ierr); if (myrank == n_ranks - 1) @@ -8194,12 +8213,14 @@ DataOutInterface::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_IGNORE)); AssertThrowMPI(ierr); } } @@ -8490,7 +8511,7 @@ DataOutInterface::create_xdmf_entry( status.MPI_SOURCE, tag, comm, - MPI_STATUS_IGNORE); + static_cast(MPI_STATUS_IGNORE)); AssertThrowMPI(ierr); return Utilities::unpack(buffer, false); diff --git a/source/base/mpi.cc b/source/base/mpi.cc index fcb0344c04..6285544278 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -398,21 +398,23 @@ namespace Utilities std::vector 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_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_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_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_IGNORE)); AssertThrowMPI(ierr); # else // nothing to do as blocking barrier already completed diff --git a/source/base/mpi_compute_index_owner_internal.cc b/source/base/mpi_compute_index_owner_internal.cc index 3beb029a2d..c4f12ea5de 100644 --- a/source/base/mpi_compute_index_owner_internal.cc +++ b/source/base/mpi_compute_index_owner_internal.cc @@ -310,7 +310,7 @@ namespace Utilities status.MPI_SOURCE, status.MPI_TAG, comm, - MPI_STATUS_IGNORE); + static_cast(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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); } diff --git a/source/base/partitioner.cc b/source/base/partitioner.cc index 693042d549..59c28fa74f 100644 --- a/source/base/partitioner.cc +++ b/source/base/partitioner.cc @@ -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_STATUSES_IGNORE)); AssertThrowMPI(ierr); Assert(flag == 1, ExcMessage( diff --git a/source/distributed/fully_distributed_tria.cc b/source/distributed/fully_distributed_tria.cc index 361af19d8b..10476f709d 100644 --- a/source/distributed/fully_distributed_tria.cc +++ b/source/distributed/fully_distributed_tria.cc @@ -560,7 +560,7 @@ namespace parallel &buffer_size, 1, Utilities::MPI::mpi_type_id_for_type, - MPI_STATUS_IGNORE); + static_cast(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_IGNORE)); AssertThrowMPI(ierr); ierr = MPI_File_close(&fh); @@ -666,7 +666,7 @@ namespace parallel &buffer_size, 1, Utilities::MPI::mpi_type_id_for_type, - MPI_STATUS_IGNORE); + static_cast(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_IGNORE)); AssertThrowMPI(ierr); ierr = MPI_File_close(&fh); diff --git a/source/distributed/tria_base.cc b/source/distributed/tria_base.cc index 1ee351481e..f2de206a7e 100644 --- a/source/distributed/tria_base.cc +++ b/source/distributed/tria_base.cc @@ -252,15 +252,16 @@ namespace parallel it, mpi_tag, this->mpi_communicator, - MPI_STATUS_IGNORE); + static_cast(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_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_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_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_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_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_IGNORE)); AssertThrowMPI(ierr); // Allocate sufficient memory. @@ -1639,12 +1642,14 @@ namespace parallel size_header + static_cast(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_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_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_IGNORE)); AssertThrowMPI(ierr); ierr = MPI_File_close(&fh); diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 29461a2d23..ed1c14af41 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -3754,7 +3754,7 @@ namespace GridTools source, mpi_tag, triangulation.get_communicator(), - MPI_STATUS_IGNORE); + static_cast(MPI_STATUS_IGNORE)); AssertThrowMPI(ierr); } @@ -3818,7 +3818,7 @@ namespace GridTools source, mpi_tag2, triangulation.get_communicator(), - MPI_STATUS_IGNORE); + static_cast(MPI_STATUS_IGNORE)); AssertThrowMPI(ierr); } diff --git a/source/lac/sparsity_tools.cc b/source/lac/sparsity_tools.cc index 0b45cbfb96..26ae9926c4 100644 --- a/source/lac/sparsity_tools.cc +++ b/source/lac/sparsity_tools.cc @@ -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_STATUSES_IGNORE)); AssertThrowMPI(ierr); } } diff --git a/source/matrix_free/vector_data_exchange.cc b/source/matrix_free/vector_data_exchange.cc index c3600fbe3a..09b69a9928 100644 --- a/source/matrix_free/vector_data_exchange.cc +++ b/source/matrix_free/vector_data_exchange.cc @@ -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_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_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_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_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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); #endif } diff --git a/source/multigrid/mg_transfer_internal.cc b/source/multigrid/mg_transfer_internal.cc index fe4e35562a..3c2abd5b0d 100644 --- a/source/multigrid/mg_transfer_internal.cc +++ b/source/multigrid/mg_transfer_internal.cc @@ -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_STATUSES_IGNORE)); AssertThrowMPI(ierr); requests.clear(); } diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index e55fe4da7f..8d45f39ddc 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -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_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_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_STATUSES_IGNORE)); AssertThrowMPI(ierr); } -- 2.39.5