Commit 8da36278 authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

Allocate shared memory by default for WIN_ALLOCATE

Flip the default shared memory allocation info argument for
MPI_WIN_ALLOCATE.  We were alredy doing this for
Signed-off-by: Pavan Balaji's avatarPavan Balaji <>
parent 602ef5fc
......@@ -109,12 +109,15 @@ int MPID_Win_allocate(MPI_Aint size, int disp_unit, MPID_Info *info,
mpi_errno = win_init(size, disp_unit, MPI_WIN_FLAVOR_ALLOCATE, MPI_WIN_UNIFIED, comm_ptr, win_ptr);
if (mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
/* FOR ALLOCATE, alloc_shm info is default to set to TRUE */
(*win_ptr)->info_args.alloc_shm = TRUE;
if (info != NULL) {
int alloc_shm_flag = 0;
char shm_alloc_value[MPI_MAX_INFO_VAL+1];
MPIR_Info_get_impl(info, "alloc_shm", MPI_MAX_INFO_VAL, shm_alloc_value, &alloc_shm_flag);
if ((alloc_shm_flag == 1) && (!strncmp(shm_alloc_value, "true", sizeof("true"))))
(*win_ptr)->info_args.alloc_shm = TRUE;
if ((alloc_shm_flag == 1) && (!strncmp(shm_alloc_value, "false", sizeof("false"))))
(*win_ptr)->info_args.alloc_shm = FALSE;
mpi_errno = MPIDI_CH3U_Win_fns.allocate(size, disp_unit, info, comm_ptr, baseptr, win_ptr);
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