[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.2-72-g1290951
Service Account
noreply at mpich.org
Thu Aug 7 09:35:25 CDT 2014
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 12909511b352b3b6d069b8d1f933b383f8447704 (commit)
from fadf8be59edef34dc78d90c96afabc7a8b428e59 (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/12909511b352b3b6d069b8d1f933b383f8447704
commit 12909511b352b3b6d069b8d1f933b383f8447704
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date: Tue Aug 5 15:32:08 2014 -0500
Bug-fix: correct the calculation of SHM base addrs.
The calculation of SHM base addrs is not correct when there are
processes allocating zero byte SHM window.
Suppose rank 0 and rank 2 has non-zero bytes SHM window whereas
rank 1 has zero byte SHM window.
The original and wrong calculation is:
win_base(rank 2) = win_base(rank 0) + win_size(rank 1).
The correct calculation should be:
win_base(rank 2) = win_base(rank 0) + win_size(rank 0).
Signed-off-by: Pavan Balaji <balaji at anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
index 82c5aec..8049289 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
@@ -303,17 +303,24 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPID_Info *
}
char *cur_base = (*win_ptr)->shm_base_addr;
+ int cur_rank = 0;
node_shm_base_addrs[0] = (*win_ptr)->shm_base_addr;
for (i = 1; i < node_size; ++i) {
if (node_sizes[i]) {
+ /* For the base addresses, we track the previous
+ * process that has allocated non-zero bytes of shared
+ * memory. We can not simply use "i-1" for the
+ * previous process because rank "i-1" might not have
+ * allocated any memory. */
if (noncontig) {
- node_shm_base_addrs[i] = cur_base + MPIDI_CH3_ROUND_UP_PAGESIZE(node_sizes[i-1]);
+ node_shm_base_addrs[i] = cur_base + MPIDI_CH3_ROUND_UP_PAGESIZE(node_sizes[cur_rank]);
} else {
- node_shm_base_addrs[i] = cur_base + node_sizes[i-1];
+ node_shm_base_addrs[i] = cur_base + node_sizes[cur_rank];
}
cur_base = node_shm_base_addrs[i];
+ cur_rank = i;
} else {
- node_shm_base_addrs[i] = NULL; /* FIXME: Is this right? */
+ node_shm_base_addrs[i] = NULL;
}
}
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list