Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ompi/mpi/c/win_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
* Copyright (c) 2015-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
Expand Down Expand Up @@ -61,9 +61,6 @@ int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win)
}
}

/* NTH: do not bother keeping track of locking MPI_PROC_NULL. */
if (MPI_PROC_NULL == rank) return MPI_SUCCESS;

rc = win->w_osc_module->osc_lock(lock_type, rank, assert, win);
OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME);
}
4 changes: 2 additions & 2 deletions ompi/mpi/c/win_shared_query.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* Copyright (c) 2015-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
Expand Down Expand Up @@ -39,7 +39,7 @@ int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit,

if (ompi_win_invalid(win)) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME);
} else if (ompi_win_peer_invalid(win, rank)) {
} else if (MPI_PROC_NULL != rank && ompi_win_peer_invalid(win, rank)) {
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RANK, FUNC_NAME);
}
}
Expand Down
5 changes: 1 addition & 4 deletions ompi/mpi/c/win_unlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
* Copyright (c) 2015-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
Expand Down Expand Up @@ -54,9 +54,6 @@ int MPI_Win_unlock(int rank, MPI_Win win)
}
}

/* NTH: do not bother keeping track of unlocking MPI_PROC_NULL. */
if (MPI_PROC_NULL == rank) return MPI_SUCCESS;

rc = win->w_osc_module->osc_unlock(rank, win);
OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME);
}
2 changes: 1 addition & 1 deletion ompi/win/win.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static inline int ompi_win_invalid(ompi_win_t *win) {
}

static inline int ompi_win_peer_invalid(ompi_win_t *win, int peer) {
if (win->w_group->grp_proc_count <= peer) return true;
if (win->w_group->grp_proc_count <= peer || peer < 0) return true;
return false;
}

Expand Down