[mpich-commits] r10682 - mpich2/trunk/src/mpid/ch3/src
dinan at mcs.anl.gov
dinan at mcs.anl.gov
Tue Nov 27 17:40:10 CST 2012
Author: dinan
Date: 2012-11-27 17:40:10 -0600 (Tue, 27 Nov 2012)
New Revision: 10682
Modified:
mpich2/trunk/src/mpid/ch3/src/ch3u_rma_reqops.c
Log:
RMA Req-ops: Added state tracking and error checks
Note: Request-generating operations can only be called within a passive target
epoch.
Reviewer: goodell
Modified: mpich2/trunk/src/mpid/ch3/src/ch3u_rma_reqops.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/src/ch3u_rma_reqops.c 2012-11-27 23:40:08 UTC (rev 10681)
+++ mpich2/trunk/src/mpid/ch3/src/ch3u_rma_reqops.c 2012-11-27 23:40:10 UTC (rev 10682)
@@ -150,6 +150,10 @@
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_RPUT);
+ MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state != MPIDI_EPOCH_LOCK &&
+ win_ptr->epoch_state != MPIDI_EPOCH_LOCK_ALL,
+ mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
+
MPIU_CHKPMEM_MALLOC(req_state, MPIDI_CH3I_Rma_req_state_t*,
sizeof(MPIDI_CH3I_Rma_req_state_t), mpi_errno,
"req-based RMA state");
@@ -176,9 +180,8 @@
*request = req_state->request;
+ fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_RPUT);
-
- fn_exit:
return mpi_errno;
fn_fail:
MPIU_CHKPMEM_REAP();
@@ -202,6 +205,10 @@
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_RGET);
+ MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state != MPIDI_EPOCH_LOCK &&
+ win_ptr->epoch_state != MPIDI_EPOCH_LOCK_ALL,
+ mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
+
MPIU_CHKPMEM_MALLOC(req_state, MPIDI_CH3I_Rma_req_state_t*,
sizeof(MPIDI_CH3I_Rma_req_state_t), mpi_errno,
"req-based RMA state");
@@ -228,9 +235,8 @@
*request = req_state->request;
+ fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_RGET);
-
- fn_exit:
return mpi_errno;
fn_fail:
MPIU_CHKPMEM_REAP();
@@ -254,6 +260,10 @@
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_RACCUMULATE);
+ MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state != MPIDI_EPOCH_LOCK &&
+ win_ptr->epoch_state != MPIDI_EPOCH_LOCK_ALL,
+ mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
+
MPIU_CHKPMEM_MALLOC(req_state, MPIDI_CH3I_Rma_req_state_t*,
sizeof(MPIDI_CH3I_Rma_req_state_t), mpi_errno,
"req-based RMA state");
@@ -280,9 +290,8 @@
*request = req_state->request;
+ fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_RACCUMULATE);
-
- fn_exit:
return mpi_errno;
fn_fail:
MPIU_CHKPMEM_REAP();
@@ -307,6 +316,10 @@
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_RGET_ACCUMULATE);
+ MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state != MPIDI_EPOCH_LOCK &&
+ win_ptr->epoch_state != MPIDI_EPOCH_LOCK_ALL,
+ mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
+
MPIU_CHKPMEM_MALLOC(req_state, MPIDI_CH3I_Rma_req_state_t*,
sizeof(MPIDI_CH3I_Rma_req_state_t), mpi_errno,
"req-based RMA state");
@@ -335,9 +348,8 @@
*request = req_state->request;
+ fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_RGET_ACCUMULATE);
-
- fn_exit:
return mpi_errno;
fn_fail:
MPIU_CHKPMEM_REAP();
More information about the commits
mailing list