Skip to content
Snippets Groups Projects
Commit d9362bf1 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MeL] Use vector allreduce

parent 709b8af6
No related branches found
No related tags found
No related merge requests found
...@@ -257,16 +257,9 @@ std::vector<std::size_t> computeGhostBaseNodeGlobalNodeIDsOfSubDomainPartition( ...@@ -257,16 +257,9 @@ std::vector<std::size_t> computeGhostBaseNodeGlobalNodeIDsOfSubDomainPartition(
} }
// send the computed ids back // send the computed ids back
std::vector<std::size_t> computed_global_ids_for_subdomain_ghost_nodes( std::vector<std::size_t> const
global_number_of_subdomain_node_id_to_bulk_node_id); computed_global_ids_for_subdomain_ghost_nodes = BaseLib::MPI::allreduce(
MPI_Allreduce( local_subdomain_node_ids_of_all_ranks, MPI_MAX, mpi);
local_subdomain_node_ids_of_all_ranks.data(), /* sendbuf */
computed_global_ids_for_subdomain_ghost_nodes
.data(), /* recvbuf (out) */
global_number_of_subdomain_node_id_to_bulk_node_id, /* sendcount */
MPI_UNSIGNED_LONG, /* sendtype */
MPI_MAX, /* operation */
mpi.communicator);
std::vector<std::size_t> global_ids_for_subdomain_ghost_nodes( std::vector<std::size_t> global_ids_for_subdomain_ghost_nodes(
computed_global_ids_for_subdomain_ghost_nodes.begin() + computed_global_ids_for_subdomain_ghost_nodes.begin() +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment