[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1b1-67-gf8e7f47
mysql vizuser
noreply at mpich.org
Thu Sep 26 18:05:17 CDT 2013
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 f8e7f47f5712bde7af02800d73a3a9382e64fcfb (commit)
from 833f2e3e92c48a25b961ec2c8ebf9b9ca4931ea5 (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/f8e7f47f5712bde7af02800d73a3a9382e64fcfb
commit f8e7f47f5712bde7af02800d73a3a9382e64fcfb
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Thu Sep 26 13:08:56 2013 -0500
Simplify checks for shared memory windows.
We already do a check for shared memory before calling the
shared-memory specific functions. This patch simplifies some of those
redundant checks.
Signed-off-by: Xin Zhao <xinzhao3 at illinois.edu>
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index 17162a7..c15fc83 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -327,20 +327,11 @@ static inline int MPIDI_CH3I_Shm_put_op(const void *origin_addr, int origin_coun
int mpi_errno = MPI_SUCCESS;
void *base = NULL;
int disp_unit;
- MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_PUT_OP);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SHM_PUT_OP);
- /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
- the same node. However, in ch3:sock, even if origin and target are on the same node, they do
- not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
- which is only set to TRUE when SHM region is allocated in nemesis.
- In future we need to figure out a way to check if origin and target are in the same "SHM comm".
- */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id) {
+ if (win_ptr->shm_allocated == TRUE) {
base = win_ptr->shm_base_addrs[target_rank];
disp_unit = win_ptr->disp_units[target_rank];
}
@@ -378,7 +369,6 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
int origin_predefined, target_predefined;
MPI_User_function *uop = NULL;
MPID_Datatype *dtp;
- MPIDI_VC_t *orig_vc, *target_vc;
int mpi_errno = MPI_SUCCESS;
MPIU_CHKLMEM_DECL(2);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_ACC_OP);
@@ -388,10 +378,7 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, origin_predefined);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, target_predefined);
- /* FIXME: refer to FIXME in MPIDI_CH3I_Shm_put_op */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id) {
+ if (win_ptr->shm_allocated == TRUE) {
shm_op = 1;
base = win_ptr->shm_base_addrs[target_rank];
disp_unit = win_ptr->disp_units[target_rank];
@@ -534,7 +521,6 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_
MPI_User_function *uop = NULL;
MPID_Datatype *dtp;
int origin_predefined, target_predefined;
- MPIDI_VC_t *orig_vc, *target_vc;
int mpi_errno = MPI_SUCCESS;
MPIU_CHKLMEM_DECL(2);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_GET_ACC_OP);
@@ -547,10 +533,7 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_
}
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, target_predefined);
- /* FIXME: refer to FIXME in MPIDI_CH3I_Shm_put_op */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id) {
+ if (win_ptr->shm_allocated == TRUE) {
base = win_ptr->shm_base_addrs[target_rank];
disp_unit = win_ptr->disp_units[target_rank];
MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr);
@@ -706,16 +689,12 @@ static inline int MPIDI_CH3I_Shm_get_op(void *origin_addr, int origin_count, MPI
{
void *base = NULL;
int disp_unit;
- MPIDI_VC_t *orig_vc, *target_vc;
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_GET_OP);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SHM_GET_OP);
- /* FIXME: refer to FIXME in MPIDI_CH3I_Shm_put_op */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id) {
+ if (win_ptr->shm_allocated == TRUE) {
base = win_ptr->shm_base_addrs[target_rank];
disp_unit = win_ptr->disp_units[target_rank];
}
@@ -751,15 +730,11 @@ static inline int MPIDI_CH3I_Shm_cas_op(const void *origin_addr, const void *com
int disp_unit;
int len, shm_locked = 0;
int mpi_errno = MPI_SUCCESS;
- MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_CAS_OP);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SHM_CAS_OP);
- /* FIXME: refer to FIXME in MPIDI_CH3I_Shm_put_op */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id) {
+ if (win_ptr->shm_allocated == TRUE) {
base = win_ptr->shm_base_addrs[target_rank];
disp_unit = win_ptr->disp_units[target_rank];
@@ -810,16 +785,12 @@ static inline int MPIDI_CH3I_Shm_fop_op(const void *origin_addr, void *result_ad
MPI_User_function *uop = NULL;
int disp_unit;
int len, one, shm_locked = 0;
- MPIDI_VC_t *orig_vc, *target_vc;
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_FOP_OP);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SHM_FOP_OP);
- /* FIXME: refer to FIXME in MPIDI_CH3I_Shm_put_op */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id) {
+ if (win_ptr->shm_allocated == TRUE) {
base = win_ptr->shm_base_addrs[target_rank];
disp_unit = win_ptr->disp_units[target_rank];
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/include/mpidrma.h | 41 +++++----------------------------------
1 files changed, 6 insertions(+), 35 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list