Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KokkosComm_irecv.hpp has no function overload to take an ExecSpace &space parameter #102

Open
nicoleavans opened this issue Jun 26, 2024 · 0 comments

Comments

@nicoleavans
Copy link
Collaborator

nicoleavans commented Jun 26, 2024

Current state of usage:

  if (rank == 0) {
    KokkosComm::Req sendreq = KokkosComm::isend(space, v, 1, 1, comm);
    sendreq.wait();
  } else if (rank == 1) {
    KokkosComm::Req recvreq = KokkosComm::irecv(v, 0, 1, comm);
    recvreq.wait();
  }

Current functions in irecv:

template <KokkosView RecvView>
void irecv(RecvView &rv, int src, int tag, MPI_Comm comm, MPI_Request &req) {
  Kokkos::Tools::pushRegion("KokkosComm::Impl::irecv");

  if (KokkosComm::is_contiguous(rv)) {
    using RecvScalar = typename RecvView::value_type;
    MPI_Irecv(KokkosComm::data_handle(rv), KokkosComm::span(rv), mpi_type_v<RecvScalar>, src, tag, comm, &req);
  } else {
    throw std::runtime_error("Only contiguous irecv viewsupported");
  }

  Kokkos::Tools::popRegion();
}

template <KokkosView RecvView>
KokkosComm::Req irecv(RecvView &rv, int src, int tag, MPI_Comm comm) {
  Kokkos::Tools::pushRegion("KokkosComm::Impl::irecv");
  KokkosComm::Req req;
  irecv(rv, src, tag, comm, req.mpi_req());
  return req;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant