From: Daniel Arndt Date: Mon, 9 Jan 2023 18:15:19 +0000 (-0500) Subject: Revert "Cast MPI_STATUS[ES]_IGNORE" X-Git-Tag: v9.5.0-rc1~673^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fab4d0899c226ae11aeb5fb047548952e5d1c3e;p=dealii.git Revert "Cast MPI_STATUS[ES]_IGNORE" This reverts commit 0ef0138a68f82cbf1ce759e1b5aaa38a2519df31. --- diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index d6e3004165..49e41af38b 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, static_cast(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_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_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_IGNORE)); + const int ierr = MPI_Wait(&request, 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 bf236d4cb2..2d8fede2c9 100644 --- a/include/deal.II/base/mpi.templates.h +++ b/include/deal.II/base/mpi.templates.h @@ -445,14 +445,13 @@ namespace Utilities std::vector temp(amount); - const auto ierr_3 = - MPI_Recv(temp.data(), - amount, - MPI_CHAR, - status.MPI_SOURCE, - status.MPI_TAG, - comm, - static_cast(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(temp, false)); diff --git a/include/deal.II/base/mpi_consensus_algorithms.h b/include/deal.II/base/mpi_consensus_algorithms.h index 7300522bac..6667de2826 100644 --- a/include/deal.II/base/mpi_consensus_algorithms.h +++ b/include/deal.II/base/mpi_consensus_algorithms.h @@ -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_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_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_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_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_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_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_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_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_STATUSES_IGNORE)); + const int ierr = MPI_Waitall(send_answer_requests.size(), + send_answer_requests.data(), + 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 0861858776..0c03316436 100644 --- a/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h +++ b/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h @@ -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_STATUSES_IGNORE)); + MPI_Waitall(send_ranks.size(), requests.data(), 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 b6cb1870b0..7f3c121978 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(), - static_cast(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_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_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_STATUSES_IGNORE)); + MPI_Waitall(requests.size(), requests.data(), 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 3f7befdf87..c1d7a6856e 100644 --- a/include/deal.II/base/partitioner.templates.h +++ b/include/deal.II/base/partitioner.templates.h @@ -195,9 +195,7 @@ namespace Utilities if (requests.size() > 0) { const int ierr = - MPI_Waitall(requests.size(), - requests.data(), - static_cast(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_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_STATUSES_IGNORE)); + const int ierr = MPI_Waitall(n_ghost_targets, + &requests[n_import_targets], + 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 9cdac16714..b5344d499f 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -4682,17 +4682,14 @@ namespace GridTools if (requests.size() > 0) { const int ierr = - MPI_Waitall(requests.size(), - requests.data(), - static_cast(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_STATUSES_IGNORE)); + const int ierr = MPI_Waitall(reply_requests.size(), + reply_requests.data(), + 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 56f9aba596..9b2c26cf73 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, - static_cast(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_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_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_STATUSES_IGNORE)); + MPI_Waitall(requests.size(), requests.data(), 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 18a579b366..eab0616c3d 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -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_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_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 " 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 0785178670..1dd8eb62e2 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, - static_cast(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_STATUSES_IGNORE)); + MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE); AssertThrowMPI(ierr_1); } diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 7f017acd03..fb6ccc6adf 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -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_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_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_IGNORE)); + fh, offset, my_buffer.data(), my_size, MPI_CHAR, MPI_STATUS_IGNORE); AssertThrowMPI(ierr); } @@ -8151,14 +8140,8 @@ 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, - static_cast( - 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::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, - static_cast( - 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::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_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::create_xdmf_entry( status.MPI_SOURCE, tag, comm, - static_cast(MPI_STATUS_IGNORE)); + MPI_STATUS_IGNORE); AssertThrowMPI(ierr); return Utilities::unpack(buffer, false); diff --git a/source/base/mpi.cc b/source/base/mpi.cc index 6285544278..fcb0344c04 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -398,23 +398,21 @@ 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, - static_cast(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_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_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_IGNORE)); + const int ierr = MPI_Wait(&request, 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 c4f12ea5de..3beb029a2d 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, - static_cast(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_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_STATUSES_IGNORE)); + const auto ierr = MPI_Waitall(send_requests.size(), + send_requests.data(), + MPI_STATUSES_IGNORE); AssertThrowMPI(ierr); } diff --git a/source/base/partitioner.cc b/source/base/partitioner.cc index 59c28fa74f..693042d549 100644 --- a/source/base/partitioner.cc +++ b/source/base/partitioner.cc @@ -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_STATUSES_IGNORE)); + const int ierr = MPI_Testall(requests.size(), + requests.data(), + &flag, + 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 10476f709d..361af19d8b 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, - static_cast(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_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, - static_cast(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_IGNORE)); + 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 f2de206a7e..1ee351481e 100644 --- a/source/distributed/tria_base.cc +++ b/source/distributed/tria_base.cc @@ -252,16 +252,15 @@ namespace parallel it, mpi_tag, this->mpi_communicator, - static_cast(MPI_STATUS_IGNORE)); + MPI_STATUS_IGNORE); AssertThrowMPI(ierr); } if (requests.size() > 0) { - ierr = - MPI_Waitall(requests.size(), - requests.data(), - static_cast(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_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_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_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_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_IGNORE)); + MPI_STATUS_IGNORE); AssertThrowMPI(ierr); // Allocate sufficient memory. @@ -1642,14 +1639,12 @@ 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, - static_cast( - 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_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_IGNORE)); + 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 ed1c14af41..29461a2d23 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(), - static_cast(MPI_STATUS_IGNORE)); + MPI_STATUS_IGNORE); AssertThrowMPI(ierr); } @@ -3818,7 +3818,7 @@ namespace GridTools source, mpi_tag2, triangulation.get_communicator(), - static_cast(MPI_STATUS_IGNORE)); + MPI_STATUS_IGNORE); AssertThrowMPI(ierr); } diff --git a/source/lac/sparsity_tools.cc b/source/lac/sparsity_tools.cc index 26ae9926c4..0b45cbfb96 100644 --- a/source/lac/sparsity_tools.cc +++ b/source/lac/sparsity_tools.cc @@ -1239,9 +1239,7 @@ namespace SparsityTools if (requests.size() > 0) { const int ierr = - MPI_Waitall(requests.size(), - requests.data(), - static_cast(MPI_STATUSES_IGNORE)); + MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE); AssertThrowMPI(ierr); } } diff --git a/source/matrix_free/vector_data_exchange.cc b/source/matrix_free/vector_data_exchange.cc index 09b69a9928..c3600fbe3a 100644 --- a/source/matrix_free/vector_data_exchange.cc +++ b/source/matrix_free/vector_data_exchange.cc @@ -603,9 +603,7 @@ namespace internal } const int ierr = - MPI_Waitall(requests.size(), - requests.data(), - static_cast(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_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_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_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_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_STATUSES_IGNORE)); + MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE); AssertThrowMPI(ierr); #endif } diff --git a/source/multigrid/mg_transfer_internal.cc b/source/multigrid/mg_transfer_internal.cc index 3c2abd5b0d..fe4e35562a 100644 --- a/source/multigrid/mg_transfer_internal.cc +++ b/source/multigrid/mg_transfer_internal.cc @@ -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_STATUSES_IGNORE)); + const int ierr = MPI_Waitall(requests.size(), + requests.data(), + MPI_STATUSES_IGNORE); AssertThrowMPI(ierr); requests.clear(); } diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index 8d45f39ddc..e55fe4da7f 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -1800,9 +1800,7 @@ namespace Particles AssertThrowMPI(ierr); } const int ierr = - MPI_Waitall(2 * n_neighbors, - n_requests.data(), - static_cast(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_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_STATUSES_IGNORE)); + MPI_Waitall(send_ops + recv_ops, requests.data(), MPI_STATUSES_IGNORE); AssertThrowMPI(ierr); }