[mpich] MPICH primary repository branch, master, updated. v3.1.2-124-g665c2db
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via 665c2db7b2fe4bd6d208278fc3a28a210a18445c (commit) from 0b5e9027d6e9d0978ec1cf46f07e64057011d3ab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/665c2db7b2fe4bd6d208278fc3a28a210a... commit 665c2db7b2fe4bd6d208278fc3a28a210a18445c Author: Norio Yamaguchi <[email protected]> Date: Tue Aug 19 14:46:33 2014 +0900 Bug-fix: avoid processing unissued ops at end of synchronization calls After one thread finishes processing all operations in the ops list, a new RMA operation may be enqueued by another thread in MPID_Progress_wait(). In such case, it has not got issued yet and we should avoid processing it at end of synchronization calls. This situation occurred when running test/mpi/threads/rma/multirma.c Signed-off-by: Pavan Balaji <[email protected]> diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h index 1fd76fa..02c0b9c 100644 --- a/src/mpid/ch3/include/mpidrma.h +++ b/src/mpid/ch3/include/mpidrma.h @@ -193,6 +193,7 @@ static inline int MPIDI_CH3I_RMA_Ops_alloc_tail(MPIDI_RMA_Ops_list_t *list, tmp_ptr->next = NULL; tmp_ptr->dataloop = NULL; + tmp_ptr->request = NULL; MPL_DL_APPEND(*list, tmp_ptr); diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c index 1f54473..b3c5342 100644 --- a/src/mpid/ch3/src/ch3u_rma_sync.c +++ b/src/mpid/ch3/src/ch3u_rma_sync.c @@ -1371,8 +1371,14 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr) if (mpi_errno != MPI_SUCCESS) MPIU_ERR_POP(mpi_errno); } + /* MT: avoid processing unissued operations enqueued by other threads + in rma_list_complete() */ + curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list); + if (curr_ptr && !curr_ptr->request) + goto finish_up; MPIU_Assert(MPIDI_CH3I_RMA_Ops_isempty(ops_list)); + finish_up: /* wait for all operations from other processes to finish */ if (win_ptr->my_counter) { @@ -3768,6 +3774,11 @@ static int do_passive_target_rma(MPID_Win *win_ptr, int target_rank, /* NOTE: Flush -- If RMA ops are issued eagerly, Send_flush_msg should be called here and wait_for_rma_done_pkt should be set. */ + /* MT: avoid processing unissued operations enqueued by other threads + in rma_list_complete() */ + curr_ptr = MPIDI_CH3I_RMA_Ops_head(&win_ptr->targets[target_rank].rma_ops_list); + if (curr_ptr && !curr_ptr->request) + goto fn_exit; MPIU_Assert(MPIDI_CH3I_RMA_Ops_isempty(&win_ptr->targets[target_rank].rma_ops_list)); fn_exit: @@ -5924,6 +5935,13 @@ static inline int rma_list_complete( MPID_Win *win_ptr, /* In some tests, this hung unless the test ensured that there was an incomplete request. */ curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list); + + /* MT: avoid processing unissued operations enqueued by other + threads in MPID_Progress_wait() */ + if (curr_ptr && !curr_ptr->request) { + /* This RMA operation has not been issued yet. */ + break; + } if (curr_ptr && !MPID_Request_is_complete(curr_ptr->request) ) { MPIR_T_PVAR_TIMER_START_VAR(RMA, list_block_timer); mpi_errno = MPID_Progress_wait(&progress_state); @@ -5964,6 +5982,12 @@ static inline int rma_list_gc( MPID_Win *win_ptr, curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list); do { + /* MT: avoid processing unissued operations enqueued by other threads + in rma_list_complete() */ + if (curr_ptr && !curr_ptr->request) { + /* This RMA operation has not been issued yet. */ + break; + } if (MPID_Request_is_complete(curr_ptr->request)) { /* Once we find a complete request, we complete as many as possible until we find an incomplete @@ -5979,6 +6003,13 @@ static inline int rma_list_gc( MPID_Win *win_ptr, MPID_Request_release(curr_ptr->request); MPIDI_CH3I_RMA_Ops_free_and_next(ops_list, &curr_ptr); nVisit++; + + /* MT: avoid processing unissued operations enqueued by other + threads in rma_list_complete() */ + if (curr_ptr && !curr_ptr->request) { + /* This RMA operation has not been issued yet. */ + break; + } } while (curr_ptr && curr_ptr != last_elm && MPID_Request_is_complete(curr_ptr->request)) ; ----------------------------------------------------------------------- Summary of changes: src/mpid/ch3/include/mpidrma.h | 1 + src/mpid/ch3/src/ch3u_rma_sync.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) hooks/post-receive -- MPICH primary repository
participants (1)
-
noreply@mpich.org