Commit 05fe55b2 authored by Antonio J. Pena's avatar Antonio J. Pena Committed by Xin Zhao
Browse files

Fix win_shared_create* tests



The tests were modifying local buffers without locking them after window
creation, causing potential race conditions. I've moved the buffer
initialization to be performed before the global window is created.

These tests were failing due to incorrect results in Jenkins whith async
enabled.
Signed-off-by: default avatarXin Zhao <xinzhao3@illinois.edu>
parent b47d95f7
......@@ -74,15 +74,15 @@ int main(int argc, char **argv)
create_info = MPI_INFO_NULL;
#endif
MPI_Win_create(my_base, sizeof(int) * ELEM_PER_PROC, sizeof(int), create_info, MPI_COMM_WORLD,
&win);
/* Reset data */
for (i = 0; i < ELEM_PER_PROC; i++) {
my_base[i] = 0;
local_buf[i] = i + 1;
}
MPI_Win_create(my_base, sizeof(int) * ELEM_PER_PROC, sizeof(int), create_info, MPI_COMM_WORLD,
&win);
/* Do RMA through global window, then check value through shared window */
MPI_Win_lock_all(0, win);
MPI_Win_lock_all(0, shm_win);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment