Skip to content

Commit

Permalink
#1111: rdma: remove exception for Win_lock, guard code
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Oct 20, 2020
1 parent b107c97 commit db4dc1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/vt/pmpi/generate_mpi_wrappers.pl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ sub extract_defs {
MPI_Comm_rank
MPI_Comm_size
MPI_Get_.*(?<!accumulate)
MPI_Win_(lock|unlock)
);

sub should_guard_call {
Expand Down
3 changes: 3 additions & 0 deletions src/vt/rdmahandle/lock_mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#define INCLUDED_VT_RDMAHANDLE_LOCK_MPI_H

#include "vt/config.h"
#include "vt/runtime/mpi_access.h"

namespace vt { namespace rdma {

Expand All @@ -63,6 +64,7 @@ struct LockMPI {
{
if (l_ != Lock::None) {
auto lock_type = l_ == Lock::Exclusive ? MPI_LOCK_EXCLUSIVE : MPI_LOCK_SHARED;
VT_ALLOW_MPI_CALLS;
MPI_Win_lock(lock_type, rank_, 0, window_);
}
}
Expand All @@ -71,6 +73,7 @@ struct LockMPI {

~LockMPI() {
if (l_ != Lock::None) {
VT_ALLOW_MPI_CALLS;
MPI_Win_unlock(rank_, window_);
}
}
Expand Down

0 comments on commit db4dc1f

Please sign in to comment.