Skip to content

Commit 4b4ecde

Browse files
committed
mpi/c: allow MPI_PROC_NULL in MPI_Win_shared_query()
This fixes a regression introduced in b3a2010 Signed-off-by: Gilles Gouaillardet <[email protected]> (cherry picked from commit 23dad50)
1 parent c56441d commit 4b4ecde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/mpi/c/win_shared_query.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved.
3-
* Copyright (c) 2015 Research Organization for Information Science
3+
* Copyright (c) 2015-2017 Research Organization for Information Science
44
* and Technology (RIST). All rights reserved.
55
* $COPYRIGHT$
66
*
@@ -39,7 +39,7 @@ int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit,
3939

4040
if (ompi_win_invalid(win)) {
4141
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME);
42-
} else if (ompi_win_peer_invalid(win, rank)) {
42+
} else if (MPI_PROC_NULL != rank && ompi_win_peer_invalid(win, rank)) {
4343
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RANK, FUNC_NAME);
4444
}
4545
}

0 commit comments

Comments
 (0)