@@ -50,19 +50,19 @@ void allgather(const SendView &sv, const RecvView &rv, MPI_Comm comm) {
5050}
5151
5252// in-place allgather
53- template <KokkosView RecvView>
54- void allgather (const RecvView &rv, MPI_Comm comm) {
53+ template <KokkosExecutionSpace ExecSpace, KokkosView RecvView>
54+ void allgather (const ExecSpace &space, const RecvView &rv, const size_t recvCount , MPI_Comm comm) {
5555 Kokkos::Tools::pushRegion (" KokkosComm::Mpi::allgather" );
5656
57- using RT = KokkosComm::Traits<RecvView>;
5857 using RecvScalar = typename RecvView::value_type;
5958
60- static_assert (RT ::rank () <= 1 , " allgather for RecvView::rank > 1 not supported" );
59+ static_assert (KokkosComm ::rank<RecvView> () <= 1 , " allgather for RecvView::rank > 1 not supported" );
6160
62- if (!RT ::is_contiguous (rv)) {
61+ if (!KokkosComm ::is_contiguous (rv)) {
6362 throw std::runtime_error (" low-level allgather requires contiguous recv view" );
6463 }
65- MPI_Allgather (MPI_IN_PLACE, 0 , MPI_DATATYPE_NULL, RT::data_handle (rv), RT::span (rv),
64+ space.fence (" fence before allgather" ); // work in space may have been used to produce send view data
65+ MPI_Allgather (MPI_IN_PLACE, 0 /* ignored*/ , MPI_DATATYPE_NULL /* ignored*/ , KokkosComm::data_handle (rv), recvCount,
6666 KokkosComm::Impl::mpi_type_v<RecvScalar>, comm);
6767
6868 Kokkos::Tools::popRegion ();
0 commit comments