Commit 346050ea authored by Xin Zhao's avatar Xin Zhao
Browse files

Delete unnecessary code in SHM allocate / free.

We allocate / free SHM regions only when node_comm exists,
which means there are more than one processes on the same
node. When node_comm is NULL (only self process is on that
node), we call default allocate / free functions in CH3.
(Please refer to commit f02eed5b

)

Here we delete unnecessary code dealing with node_comm being
NULL in SHM allocate / free functions.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 7dfe2840
......@@ -107,10 +107,7 @@ int MPIDI_CH3_SHM_Win_free(MPID_Win **win_ptr)
that are on the same node as this process (node_comm).
If node_comm == NULL, this process is the only one on this node, therefore
we use comm_self as node comm. */
if ((*win_ptr)->comm_ptr->node_comm != NULL)
node_comm_ptr = (*win_ptr)->comm_ptr->node_comm;
else
node_comm_ptr = MPIR_Process.comm_self;
MPIU_Assert(node_comm_ptr != NULL);
if (node_comm_ptr->rank == 0) {
......
......@@ -291,10 +291,7 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPID_Info *
that are on the same node as this process (node_comm).
If node_comm == NULL, this process is the only one on this node, therefore
we use comm_self as node comm. */
if ((*win_ptr)->comm_ptr->node_comm != NULL)
node_comm_ptr = (*win_ptr)->comm_ptr->node_comm;
else
node_comm_ptr = MPIR_Process.comm_self;
MPIU_Assert(node_comm_ptr != NULL);
node_size = node_comm_ptr->local_size;
node_rank = node_comm_ptr->rank;
......
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