kokkos / kokkos-comm

Experimental MPI Wrapper for Kokkos
https://kokkos.org/kokkos-comm/
Other
12 stars 9 forks source link

Skipped ready-mode send tests #43

Open dssgabriel opened 4 months ago

dssgabriel commented 4 months ago

PR #30 skips tests for ready-mode send operations as we lack irecv to correctly test the ready-mode send and isend functions.

Unit tests should look something like the following:

if (rank == 0) {
  // Ensure `irecv` has started when we exit the following barrier
  KokkosComm::Impl::barrier(Kokkos::DefaultExecutionSpace(), MPI_COMM_WORLD);

  // Send the view
  KokkosComm::send<KokkosComm::CommMode::Ready>(
    Kokkos::DefaultExecutionSpace(),
    view,
    dst,
    tag,
    MPI_COMM_WORLD
  );
} else {
  // Start reception
  auto req = KokkosComm::irecv(
    Kokkos::DefaultExecutionSpace(),
    view,
    src,
    tag,
    MPI_COMM_WORLD
  );

  // Barrier guaranteeing to the sender (rank 0) that the recipient (rank 1) is ready
  KokkosComm::Impl::barrier(Kokkos::DefaultExecutionSpace(), MPI_COMM_WORLD);

  // Wait until receive completion
  req.wait();
}

These tests should not be skipped anymore once #32 is merged.