Commit 5d421da6 authored by Xin Zhao's avatar Xin Zhao
Browse files

Bug-fix: correct SHM memory size in Nemesis Win_gather_info().



In the Nemesis implementation of Win_gather_info(), we allocate
a memory region on SHM to store window information for other
processes, so that all processes on the same node can share
those information. However, previously the memory size was
incorrectly set as O(node_comm_size), which should be O(comm_size).
This patch fixed this bug.
Signed-off-by: default avatarMin Si <msi@il.is.s.u-tokyo.ac.jp>
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 45dfd815
......@@ -350,7 +350,7 @@ static int MPIDI_CH3I_Win_gather_info(void *base, MPI_Aint size, int disp_unit,
MPID_Comm * comm_ptr, MPID_Win ** win_ptr)
{
MPID_Comm *node_comm_ptr = NULL;
int node_rank, node_size;
int node_rank;
int comm_rank, comm_size;
MPI_Aint *tmp_buf = NULL;
int i, k;
......@@ -371,10 +371,9 @@ static int MPIDI_CH3I_Win_gather_info(void *base, MPI_Aint size, int disp_unit,
node_comm_ptr = (*win_ptr)->comm_ptr->node_comm;
MPIU_Assert(node_comm_ptr != NULL);
node_size = node_comm_ptr->local_size;
node_rank = node_comm_ptr->rank;
(*win_ptr)->info_shm_segment_len = node_size * sizeof(MPIDI_Win_basic_info_t);
(*win_ptr)->info_shm_segment_len = comm_size * sizeof(MPIDI_Win_basic_info_t);
mpi_errno = MPIU_SHMW_Hnd_init(&(*win_ptr)->info_shm_segment_handle);
if (mpi_errno != MPI_SUCCESS)
......
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