[mpich] MPICH primary repository branch, master, updated. v3.2b3-109-gf039eeb
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 f039eebba1cd48a4a592391842b22c6e9a466c7b (commit) from ef34d2c9e6e7e1b89e27b1fe9b9e2200105acfa0 (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/f039eebba1cd48a4a592391842b22c6e9a... commit f039eebba1cd48a4a592391842b22c6e9a466c7b Author: Rob Latham <[email protected]> Date: Thu Jun 18 11:15:19 2015 -0500 better approach for do_accumulate_op commit 83253a414 triggerd a bunch of new warnings. Take a different approach. For simplicity of implementation, do_accumulate_op is defined as MPI_User_function. We could split up internal routine and user-provided routines, but that complicates the code for little benefit: Instead, keep do_accumlate_op with an int type, but check for overflow before explicitly casting. In many places the count is simply '1'. In stream processing there is an interal limit of 256k, so the assertion should never fire. Signed-off-by: Xin Zhao <[email protected]> diff --git a/src/mpid/ch3/include/mpid_rma_shm.h b/src/mpid/ch3/include/mpid_rma_shm.h index 31417a0..cb23a96 100644 --- a/src/mpid/ch3/include/mpid_rma_shm.h +++ b/src/mpid/ch3/include/mpid_rma_shm.h @@ -10,8 +10,8 @@ #include "mpl_utlist.h" #include "mpid_rma_types.h" -static inline int do_accumulate_op(void *source_buf, MPI_Aint source_count, MPI_Datatype source_dtp, - void *target_buf, MPI_Aint target_count, MPI_Datatype target_dtp, +static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datatype source_dtp, + void *target_buf, int target_count, MPI_Datatype target_dtp, MPI_Aint stream_offset, MPI_Op acc_op); #define ASSIGN_COPY(src, dest, count, type) \ @@ -399,7 +399,8 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); } - mpi_errno = do_accumulate_op((void *) packed_buf, stream_count, basic_type, + MPIU_Assert(stream_count == (int) stream_count); + mpi_errno = do_accumulate_op((void *) packed_buf, (int) stream_count, basic_type, (void *) ((char *) base + disp_unit * target_disp), target_count, target_datatype, stream_offset, op); @@ -541,7 +542,8 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_ packed_buf = tmpbuf; } - mpi_errno = do_accumulate_op((void *) packed_buf, stream_count, basic_type, + MPIU_Assert(stream_count == (int) stream_count); + mpi_errno = do_accumulate_op((void *) packed_buf, (int) stream_count, basic_type, (void *) ((char *) base + disp_unit * target_disp), target_count, target_datatype, stream_offset, op); diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h index 968f189..bfaa7a7 100644 --- a/src/mpid/ch3/include/mpidrma.h +++ b/src/mpid/ch3/include/mpidrma.h @@ -806,8 +806,8 @@ static inline int MPIDI_CH3I_RMA_Handle_flush_ack(MPID_Win * win_ptr, int target #define FUNCNAME do_accumulate_op #undef FCNAME #define FCNAME MPIDI_QUOTE(FUNCNAME) -static inline int do_accumulate_op(void *source_buf, MPI_Aint source_count, MPI_Datatype source_dtp, - void *target_buf, MPI_Aint target_count, MPI_Datatype target_dtp, +static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datatype source_dtp, + void *target_buf, int target_count, MPI_Datatype target_dtp, MPI_Aint stream_offset, MPI_Op acc_op) { int mpi_errno = MPI_SUCCESS; diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c index 981f877..d214a0c 100644 --- a/src/mpid/ch3/src/ch3u_handle_recv_req.c +++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c @@ -187,7 +187,8 @@ int MPIDI_CH3_ReqHandler_AccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, if (win_ptr->shm_allocated == TRUE) MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); /* accumulate data from tmp_buf into user_buf */ - mpi_errno = do_accumulate_op(rreq->dev.user_buf, predef_count, basic_type, + MPIU_Assert(predef_count == (int) predef_count); + mpi_errno = do_accumulate_op(rreq->dev.user_buf, (int) predef_count, basic_type, rreq->dev.real_user_buf, rreq->dev.user_count, rreq->dev.datatype, stream_offset, rreq->dev.op); if (win_ptr->shm_allocated == TRUE) @@ -336,7 +337,8 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq } /* accumulate data from tmp_buf into user_buf */ - mpi_errno = do_accumulate_op(rreq->dev.user_buf, predef_count, basic_type, + MPIU_Assert(predef_count == (int) predef_count); + mpi_errno = do_accumulate_op(rreq->dev.user_buf, (int) predef_count, basic_type, rreq->dev.real_user_buf, rreq->dev.user_count, rreq->dev.datatype, stream_offset, rreq->dev.op); @@ -1245,7 +1247,8 @@ static inline int perform_acc_in_lock_queue(MPID_Win * win_ptr, MPIDI_RMA_Lock_e /* Note: here stream_offset is 0 because when piggybacking LOCK, we must use * the first stream unit. */ - mpi_errno = do_accumulate_op(lock_entry->data, recv_count, acc_pkt->datatype, + MPIU_Assert(recv_count = (int) recv_count); + mpi_errno = do_accumulate_op(lock_entry->data, (int) recv_count, acc_pkt->datatype, acc_pkt->addr, acc_pkt->count, acc_pkt->datatype, 0, acc_pkt->op); } @@ -1415,7 +1418,8 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr, /* Perform ACCUMULATE OP */ - mpi_errno = do_accumulate_op(lock_entry->data, recv_count, get_accum_pkt->datatype, + MPIU_Assert(recv_count == (int) recv_count); + mpi_errno = do_accumulate_op(lock_entry->data, (int) recv_count, get_accum_pkt->datatype, get_accum_pkt->addr, get_accum_pkt->count, get_accum_pkt->datatype, 0, get_accum_pkt->op); ----------------------------------------------------------------------- Summary of changes: src/mpid/ch3/include/mpid_rma_shm.h | 10 ++++++---- src/mpid/ch3/include/mpidrma.h | 4 ++-- src/mpid/ch3/src/ch3u_handle_recv_req.c | 12 ++++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) hooks/post-receive -- MPICH primary repository
participants (1)
-
noreply@mpich.org