Skip to content

Commit

Permalink
Remove use of MPI_Win_lock/unlock from MPI Ops
Browse files Browse the repository at this point in the history
  • Loading branch information
janciesko committed Aug 3, 2022
1 parent 405f69d commit 5bd4123
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/impl/mpispace/Kokkos_MPISpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ void MPISpace::deallocate(void *const, const size_t) const {
MPI_Win_unlock_all(current_win);
MPI_Win_free(&current_win);

// We pass a mempory space instance do multiple Views thus
// setting "current_win = MPI_WIN_NULL;" will result in a wrong handle if
// subsequent view runs out of scope
// Fixme: The following only works when views are allocated sequentially
// We need a thread-safe map to associate views and windows

if (last_valid != 0)
current_win = mpi_windows[last_valid - 1];
else
Expand Down
4 changes: 0 additions & 4 deletions src/impl/mpispace/Kokkos_MPISpace_Ops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@ namespace Impl {
assert(win != MPI_WIN_NULL); \
int _typesize; \
MPI_Type_size(mpi_type, &_typesize); \
MPI_Win_lock(MPI_LOCK_SHARED, pe, 0, win); \
MPI_Put(&val, 1, mpi_type, pe, \
sizeof(SharedAllocationHeader) + offset * _typesize, 1, mpi_type, \
win); \
MPI_Win_unlock(pe, win); \
MPI_Win_flush(pe, win); \
}

Expand All @@ -85,11 +83,9 @@ KOKKOS_REMOTESPACES_P(double, MPI_DOUBLE)
assert(win != MPI_WIN_NULL); \
int _typesize; \
MPI_Type_size(mpi_type, &_typesize); \
MPI_Win_lock(MPI_LOCK_SHARED, pe, 0, win); \
MPI_Get(&val, 1, mpi_type, pe, \
sizeof(SharedAllocationHeader) + offset * _typesize, 1, mpi_type, \
win); \
MPI_Win_unlock(pe, win); \
MPI_Win_flush(pe, win); \
}

Expand Down

0 comments on commit 5bd4123

Please sign in to comment.