Commit 9931e2a4 authored by James Dinan's avatar James Dinan
Browse files

Cleaned up handling of PROC_NULL in RMA ops

Moved handling of MPI_PROC_NULL down to the device and cleaned up
handling of PROC_NULL in the CH3 device.

Reviewer: goodell
parent a77f0eac
......@@ -139,8 +139,6 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
/* ... body of routine ... */
if (target_rank == MPI_PROC_NULL) goto fn_exit;
mpi_errno = MPIU_RMA_CALL(win_ptr,Accumulate(origin_addr, origin_count,
origin_datatype,
target_rank, target_disp, target_count,
......
......@@ -128,8 +128,6 @@ int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
/* ... body of routine ... */
if (target_rank == MPI_PROC_NULL) goto fn_exit;
mpi_errno = MPIU_RMA_CALL(win_ptr,Compare_and_swap(origin_addr,
compare_addr, result_addr,
datatype, target_rank,
......
......@@ -142,8 +142,6 @@ int MPI_Fetch_and_op(const void *origin_addr, void *result_addr,
/* ... body of routine ... */
if (target_rank == MPI_PROC_NULL) goto fn_exit;
mpi_errno = MPIU_RMA_CALL(win_ptr,Fetch_and_op(origin_addr,
result_addr, datatype,
target_rank, target_disp,
......
......@@ -134,8 +134,6 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype
/* ... body of routine ... */
if (target_rank == MPI_PROC_NULL) goto fn_exit;
mpi_errno = MPIU_RMA_CALL(win_ptr,
Get(origin_addr, origin_count, origin_datatype,
target_rank, target_disp, target_count,
......
......@@ -187,8 +187,6 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count,
/* ... body of routine ... */
if (target_rank == MPI_PROC_NULL) goto fn_exit;
mpi_errno = MPIU_RMA_CALL(win_ptr,Get_accumulate(origin_addr, origin_count,
origin_datatype,
result_addr, result_count,
......
......@@ -134,8 +134,6 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype
/* ... body of routine ... */
if (target_rank == MPI_PROC_NULL) goto fn_exit;
mpi_errno = MPIU_RMA_CALL(win_ptr,
Put(origin_addr, origin_count, origin_datatype,
target_rank, target_disp, target_count,
......
......@@ -189,6 +189,10 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_PUT);
if (target_rank == MPI_PROC_NULL) {
goto fn_exit;
}
if (win_ptr->epoch_state == MPIDI_EPOCH_NONE && win_ptr->fence_issued) {
win_ptr->epoch_state = MPIDI_EPOCH_FENCE;
}
......@@ -199,8 +203,7 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
MPIDI_Datatype_get_info(origin_count, origin_datatype,
dt_contig, data_sz, dtp,dt_true_lb);
if ((data_sz == 0) || (target_rank == MPI_PROC_NULL))
{
if (data_sz == 0) {
goto fn_exit;
}
......@@ -297,6 +300,10 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET);
if (target_rank == MPI_PROC_NULL) {
goto fn_exit;
}
if (win_ptr->epoch_state == MPIDI_EPOCH_NONE && win_ptr->fence_issued) {
win_ptr->epoch_state = MPIDI_EPOCH_FENCE;
}
......@@ -307,8 +314,7 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
MPIDI_Datatype_get_info(origin_count, origin_datatype,
dt_contig, data_sz, dtp, dt_true_lb);
if ((data_sz == 0) || (target_rank == MPI_PROC_NULL))
{
if (data_sz == 0) {
goto fn_exit;
}
......@@ -404,6 +410,10 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_ACCUMULATE);
if (target_rank == MPI_PROC_NULL) {
goto fn_exit;
}
if (win_ptr->epoch_state == MPIDI_EPOCH_NONE && win_ptr->fence_issued) {
win_ptr->epoch_state = MPIDI_EPOCH_FENCE;
}
......@@ -414,8 +424,7 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
MPIDI_Datatype_get_info(origin_count, origin_datatype,
dt_contig, data_sz, dtp, dt_true_lb);
if ((data_sz == 0) || (target_rank == MPI_PROC_NULL))
{
if (data_sz == 0) {
goto fn_exit;
}
......
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