mpid_rma.c 16.1 KB
Newer Older
1
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 3 4 5 6 7
/*
 *  (C) 2001 by Argonne National Laboratory.
 *      See COPYRIGHT in top-level directory.
 */

#include "mpidimpl.h"
8
#include "mpidrma.h"
9

Xin Zhao's avatar
Xin Zhao committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===

cvars:
    - name        : MPIR_CVAR_CH3_RMA_SLOTS_SIZE
      category    : CH3
      type        : int
      default     : 262144
      class       : none
      verbosity   : MPI_T_VERBOSITY_USER_BASIC
      scope       : MPI_T_SCOPE_ALL_EQ
      description : >-
        Number of RMA slots during window creation. Each slot contains
        a linked list of target elements. The distribution of ranks among
        slots follows a round-robin pattern. Requires a positive value.

=== END_MPI_T_CVAR_INFO_BLOCK ===
*/

29 30 31

MPIU_THREADSAFE_INIT_DECL(initRMAoptions);

Xin Zhao's avatar
Xin Zhao committed
32 33
MPIDI_RMA_Win_list_t *MPIDI_RMA_Win_list = NULL, *MPIDI_RMA_Win_list_tail = NULL;

34
static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
35
                    MPID_Comm * comm_ptr, MPID_Win ** win_ptr);
36 37


38 39 40
#define MPID_WIN_FTABLE_SET_DEFAULTS(win_ptr)                   \
    do {                                                        \
        /* Get ptr to RMAFns, which is embedded in MPID_Win */  \
41
        MPID_RMAFns *ftable         = &(*(win_ptr))->RMAFns;    \
42
        ftable->Win_free            = MPIDI_Win_free;           \
43 44
        ftable->Win_attach          = MPIDI_Win_attach;         \
        ftable->Win_detach          = MPIDI_Win_detach;         \
45 46
        ftable->Win_shared_query    = MPIDI_Win_shared_query;   \
                                                                \
47 48 49
        ftable->Win_set_info        = MPIDI_Win_set_info;       \
        ftable->Win_get_info        = MPIDI_Win_get_info;       \
                                                                \
50 51 52
        ftable->Put                 = MPIDI_Put;                \
        ftable->Get                 = MPIDI_Get;                \
        ftable->Accumulate          = MPIDI_Accumulate;         \
53 54 55
        ftable->Get_accumulate      = MPIDI_Get_accumulate;     \
        ftable->Fetch_and_op        = MPIDI_Fetch_and_op;       \
        ftable->Compare_and_swap    = MPIDI_Compare_and_swap;   \
56
                                                                \
57 58 59 60
        ftable->Rput                = MPIDI_Rput;               \
        ftable->Rget                = MPIDI_Rget;               \
        ftable->Raccumulate         = MPIDI_Raccumulate;        \
        ftable->Rget_accumulate     = MPIDI_Rget_accumulate;    \
61 62 63 64 65 66 67 68 69 70 71 72 73
                                                                \
        ftable->Win_fence           = MPIDI_Win_fence;          \
        ftable->Win_post            = MPIDI_Win_post;           \
        ftable->Win_start           = MPIDI_Win_start;          \
        ftable->Win_complete        = MPIDI_Win_complete;       \
        ftable->Win_wait            = MPIDI_Win_wait;           \
        ftable->Win_test            = MPIDI_Win_test;           \
                                                                \
        ftable->Win_lock            = MPIDI_Win_lock;           \
        ftable->Win_unlock          = MPIDI_Win_unlock;         \
        ftable->Win_lock_all        = MPIDI_Win_lock_all;       \
        ftable->Win_unlock_all      = MPIDI_Win_unlock_all;     \
                                                                \
74 75 76 77
        ftable->Win_flush           = MPIDI_Win_flush;          \
        ftable->Win_flush_all       = MPIDI_Win_flush_all;      \
        ftable->Win_flush_local     = MPIDI_Win_flush_local;    \
        ftable->Win_flush_local_all = MPIDI_Win_flush_local_all;\
78 79 80 81
        ftable->Win_sync            = MPIDI_Win_sync;           \
    } while (0)


82
#undef FUNCNAME
83
#define FUNCNAME MPID_Win_create
84 85
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
86 87
int MPID_Win_create(void *base, MPI_Aint size, int disp_unit, MPID_Info * info,
                    MPID_Comm * comm_ptr, MPID_Win ** win_ptr)
88
{
89
    int mpi_errno = MPI_SUCCESS;
90

91
    MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_CREATE);
92

93 94
    MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_CREATE);

Wesley Bland's avatar
Wesley Bland committed
95 96
    /* Check to make sure the communicator hasn't already been revoked */
    if (comm_ptr->revoked) {
97
        MPIU_ERR_SETANDJUMP(mpi_errno, MPIX_ERR_REVOKED, "**revoked");
Wesley Bland's avatar
Wesley Bland committed
98 99
    }

100 101 102 103
    mpi_errno =
        win_init(size, disp_unit, MPI_WIN_FLAVOR_CREATE, MPI_WIN_UNIFIED, comm_ptr, win_ptr);
    if (mpi_errno)
        MPIU_ERR_POP(mpi_errno);
104

105 106
    (*win_ptr)->base = base;

107 108 109 110 111 112 113 114 115 116
    /* FOR CREATE, alloc_shm info is default to set to FALSE */
    (*win_ptr)->info_args.alloc_shm = FALSE;
    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;
    }

117 118 119
    mpi_errno = MPIDI_CH3U_Win_fns.create(base, size, disp_unit, info, comm_ptr, win_ptr);
    if (mpi_errno)
        MPIU_ERR_POP(mpi_errno);
120

121
  fn_fail:
122 123 124 125 126 127 128 129 130
    MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_CREATE);
    return mpi_errno;
}


#undef FUNCNAME
#define FUNCNAME MPID_Win_allocate
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
131 132
int MPID_Win_allocate(MPI_Aint size, int disp_unit, MPID_Info * info,
                      MPID_Comm * comm_ptr, void *baseptr, MPID_Win ** win_ptr)
133
{
134
    int mpi_errno = MPI_SUCCESS;
135
    MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_ALLOCATE);
136

137 138
    MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_ALLOCATE);

139 140 141 142 143
    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);
    }
144

145 146 147
    /* FOR ALLOCATE, alloc_shm info is default to set to TRUE */
    (*win_ptr)->info_args.alloc_shm = TRUE;

148 149
    if (info != NULL) {
        int alloc_shm_flag = 0;
150
        char shm_alloc_value[MPI_MAX_INFO_VAL + 1];
151
        MPIR_Info_get_impl(info, "alloc_shm", MPI_MAX_INFO_VAL, shm_alloc_value, &alloc_shm_flag);
152 153
        if ((alloc_shm_flag == 1) && (!strncmp(shm_alloc_value, "false", sizeof("false"))))
            (*win_ptr)->info_args.alloc_shm = FALSE;
154 155
    }

156
    mpi_errno = MPIDI_CH3U_Win_fns.allocate(size, disp_unit, info, comm_ptr, baseptr, win_ptr);
157 158 159
    if (mpi_errno != MPI_SUCCESS) {
        MPIU_ERR_POP(mpi_errno);
    }
160

161
  fn_fail:
162 163 164 165 166 167 168 169 170
    MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_ALLOCATE);
    return mpi_errno;
}


#undef FUNCNAME
#define FUNCNAME MPID_Win_create_dynamic
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
171
int MPID_Win_create_dynamic(MPID_Info * info, MPID_Comm * comm_ptr, MPID_Win ** win_ptr)
172
{
173
    int mpi_errno = MPI_SUCCESS;
174

175
    MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_CREATE_DYNAMIC);
176

177
    MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_CREATE_DYNAMIC);
178

179 180 181
    mpi_errno = win_init(0 /* spec defines size to be 0 */ ,
                         1 /* spec defines disp_unit to be 1 */ ,
                         MPI_WIN_FLAVOR_DYNAMIC, MPI_WIN_UNIFIED, comm_ptr, win_ptr);
182

183 184
    if (mpi_errno)
        MPIU_ERR_POP(mpi_errno);
185

186 187
    (*win_ptr)->base = MPI_BOTTOM;

188
    mpi_errno = MPIDI_CH3U_Win_fns.create_dynamic(info, comm_ptr, win_ptr);
189 190 191
    if (mpi_errno != MPI_SUCCESS) {
        MPIU_ERR_POP(mpi_errno);
    }
192

193
  fn_fail:
194
    MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_CREATE_DYNAMIC);
195 196 197 198
    return mpi_errno;
}


199
/* The memory allocation functions */
200 201 202 203
#undef FUNCNAME
#define FUNCNAME MPID_Alloc_mem
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
204
void *MPID_Alloc_mem(size_t size, MPID_Info * info_ptr)
205
{
206
    void *ap = NULL;
207 208 209 210
    MPIDI_STATE_DECL(MPID_STATE_MPID_ALLOC_MEM);

    MPIDI_FUNC_ENTER(MPID_STATE_MPID_ALLOC_MEM);

211
    ap = MPIDI_Alloc_mem(size, info_ptr);
212

213 214 215 216 217 218 219 220 221
    MPIDI_FUNC_EXIT(MPID_STATE_MPID_ALLOC_MEM);
    return ap;
}


#undef FUNCNAME
#define FUNCNAME MPID_Free_mem
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
222
int MPID_Free_mem(void *ptr)
223 224 225 226 227 228
{
    int mpi_errno = MPI_SUCCESS;
    MPIDI_STATE_DECL(MPID_STATE_MPID_FREE_MEM);

    MPIDI_FUNC_ENTER(MPID_STATE_MPID_FREE_MEM);

229
    mpi_errno = MPIDI_Free_mem(ptr);
230
    if (mpi_errno != MPI_SUCCESS) {
231
        MPIU_ERR_POP(mpi_errno);
232
    }
233 234

  fn_fail:
235
    MPIDI_FUNC_EXIT(MPID_STATE_MPID_FREE_MEM);
236 237 238
    return mpi_errno;
}

239

240 241 242 243
#undef FUNCNAME
#define FUNCNAME MPID_Win_allocate_shared
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
244 245
int MPID_Win_allocate_shared(MPI_Aint size, int disp_unit, MPID_Info * info, MPID_Comm * comm_ptr,
                             void *base_ptr, MPID_Win ** win_ptr)
246
{
247
    int mpi_errno = MPI_SUCCESS;
248 249

    MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_ALLOCATE_SHARED);
250

251 252
    MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_ALLOCATE_SHARED);

253 254 255 256
    mpi_errno =
        win_init(size, disp_unit, MPI_WIN_FLAVOR_SHARED, MPI_WIN_UNIFIED, comm_ptr, win_ptr);
    if (mpi_errno)
        MPIU_ERR_POP(mpi_errno);
257

258 259 260 261 262
    /* FOR ALLOCATE_SHARED, alloc_shm info is default to set to TRUE */
    (*win_ptr)->info_args.alloc_shm = TRUE;

    if (info != NULL) {
        int alloc_shm_flag = 0;
263
        char shm_alloc_value[MPI_MAX_INFO_VAL + 1];
264 265 266 267 268 269
        MPIR_Info_get_impl(info, "alloc_shm", MPI_MAX_INFO_VAL, shm_alloc_value, &alloc_shm_flag);
        /* if value of 'alloc_shm' info is not set to true, throw an error */
        if (alloc_shm_flag == 1 && strncmp(shm_alloc_value, "true", sizeof("true")))
            MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**infoval");
    }

270 271 272 273
    mpi_errno =
        MPIDI_CH3U_Win_fns.allocate_shared(size, disp_unit, info, comm_ptr, base_ptr, win_ptr);
    if (mpi_errno != MPI_SUCCESS)
        MPIU_ERR_POP(mpi_errno);
274

275
  fn_fail:
276 277 278
    MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_ALLOCATE_SHARED);
    return mpi_errno;
}
279 280 281 282 283 284 285


#undef FUNCNAME
#define FUNCNAME win_init
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
286
                    MPID_Comm * comm_ptr, MPID_Win ** win_ptr)
287 288
{
    int mpi_errno = MPI_SUCCESS;
289
    int i;
290
    MPID_Comm *win_comm_ptr;
291
    int win_target_pool_size;
Xin Zhao's avatar
Xin Zhao committed
292
    MPIDI_RMA_Win_list_t *win_elem;
293
    MPIU_CHKPMEM_DECL(5);
294 295 296 297
    MPIDI_STATE_DECL(MPID_STATE_WIN_INIT);

    MPIDI_FUNC_ENTER(MPID_STATE_WIN_INIT);

298
    if (initRMAoptions) {
299
        MPIU_THREADSAFE_INIT_BLOCK_BEGIN(initRMAoptions);
300

Xin Zhao's avatar
Xin Zhao committed
301 302
        MPIDI_CH3_RMA_Init_sync_pvars();
        MPIDI_CH3_RMA_Init_pkthandler_pvars();
303 304 305 306 307

        MPIU_THREADSAFE_INIT_CLEAR(initRMAoptions);
        MPIU_THREADSAFE_INIT_BLOCK_END(initRMAoptions);
    }

308 309 310
    *win_ptr = (MPID_Win *) MPIU_Handle_obj_alloc(&MPID_Win_mem);
    MPIU_ERR_CHKANDJUMP1(!(*win_ptr), mpi_errno, MPI_ERR_OTHER, "**nomem",
                         "**nomem %s", "MPID_Win_mem");
311 312

    mpi_errno = MPIR_Comm_dup_impl(comm_ptr, &win_comm_ptr);
313 314
    if (mpi_errno)
        MPIU_ERR_POP(mpi_errno);
315 316 317 318 319

    MPIU_Object_set_ref(*win_ptr, 1);

    /* (*win_ptr)->errhandler is set by upper level; */
    /* (*win_ptr)->base is set by caller; */
320 321 322 323 324 325
    (*win_ptr)->size = size;
    (*win_ptr)->disp_unit = disp_unit;
    (*win_ptr)->create_flavor = create_flavor;
    (*win_ptr)->model = model;
    (*win_ptr)->attributes = NULL;
    (*win_ptr)->comm_ptr = win_comm_ptr;
326

327
    (*win_ptr)->at_completion_counter = 0;
328 329 330 331
    /* (*win_ptr)->base_addrs[] is set by caller; */
    /* (*win_ptr)->sizes[] is set by caller; */
    /* (*win_ptr)->disp_units[] is set by caller; */
    /* (*win_ptr)->all_win_handles[] is set by caller; */
332
    (*win_ptr)->current_lock_type = MPID_LOCK_NONE;
333
    (*win_ptr)->shared_lock_ref_cnt = 0;
334
    (*win_ptr)->lock_queue = NULL;
335
    (*win_ptr)->lock_queue_tail = NULL;
336
    (*win_ptr)->shm_allocated = FALSE;
337 338
    (*win_ptr)->states.access_state = MPIDI_RMA_NONE;
    (*win_ptr)->states.exposure_state = MPIDI_RMA_NONE;
339
    (*win_ptr)->non_empty_slots = 0;
340
    (*win_ptr)->accumulated_ops_cnt = 0;
341
    (*win_ptr)->active_req_cnt = 0;
342 343 344 345 346 347 348
    (*win_ptr)->fence_sync_req = MPI_REQUEST_NULL;
    (*win_ptr)->start_req = NULL;
    (*win_ptr)->start_ranks_in_win_grp = NULL;
    (*win_ptr)->start_grp_size = 0;
    (*win_ptr)->lock_all_assert = 0;
    (*win_ptr)->lock_epoch_count = 0;
    (*win_ptr)->outstanding_locks = 0;
349

350
    /* Initialize the info flags */
351
    (*win_ptr)->info_args.no_locks = 0;
352
    (*win_ptr)->info_args.accumulate_ordering = MPIDI_ACC_ORDER_RAR | MPIDI_ACC_ORDER_RAW |
353 354 355
        MPIDI_ACC_ORDER_WAR | MPIDI_ACC_ORDER_WAW;
    (*win_ptr)->info_args.accumulate_ops = MPIDI_ACC_OPS_SAME_OP_NO_OP;
    (*win_ptr)->info_args.same_size = 0;
356
    (*win_ptr)->info_args.alloc_shared_noncontig = 0;
357
    (*win_ptr)->info_args.alloc_shm = FALSE;
358

359 360 361 362 363 364 365 366 367 368
    MPIU_CHKPMEM_MALLOC((*win_ptr)->op_pool_start, struct MPIDI_RMA_Op *,
                        sizeof(MPIDI_RMA_Op_t) * MPIR_CVAR_CH3_RMA_OP_WIN_POOL_SIZE, mpi_errno,
                        "RMA op pool");
    (*win_ptr)->op_pool = NULL;
    (*win_ptr)->op_pool_tail = NULL;
    for (i = 0; i < MPIR_CVAR_CH3_RMA_OP_WIN_POOL_SIZE; i++) {
        (*win_ptr)->op_pool_start[i].pool_type = MPIDI_RMA_POOL_WIN;
        MPL_LL_APPEND((*win_ptr)->op_pool, (*win_ptr)->op_pool_tail, &((*win_ptr)->op_pool_start[i]));
    }

369 370 371 372 373 374 375 376 377 378 379
    win_target_pool_size = MPIR_MIN(MPIR_CVAR_CH3_RMA_TARGET_WIN_POOL_SIZE, MPIR_Comm_size(win_comm_ptr));
    MPIU_CHKPMEM_MALLOC((*win_ptr)->target_pool_start, struct MPIDI_RMA_Target *,
                        sizeof(MPIDI_RMA_Target_t) * win_target_pool_size,
                        mpi_errno, "RMA target pool");
    (*win_ptr)->target_pool = NULL;
    (*win_ptr)->target_pool_tail = NULL;
    for (i = 0; i < win_target_pool_size; i++) {
        (*win_ptr)->target_pool_start[i].pool_type = MPIDI_RMA_POOL_WIN;
        MPL_LL_APPEND((*win_ptr)->target_pool, (*win_ptr)->target_pool_tail, &((*win_ptr)->target_pool_start[i]));
    }

Xin Zhao's avatar
Xin Zhao committed
380 381 382 383 384 385 386 387
    (*win_ptr)->num_slots = MPIR_MIN(MPIR_CVAR_CH3_RMA_SLOTS_SIZE, MPIR_Comm_size(win_comm_ptr));
    MPIU_CHKPMEM_MALLOC((*win_ptr)->slots, struct MPIDI_RMA_Slot *,
                        sizeof(MPIDI_RMA_Slot_t) * (*win_ptr)->num_slots, mpi_errno, "RMA slots");
    for (i = 0; i < (*win_ptr)->num_slots; i++) {
        (*win_ptr)->slots[i].target_list = NULL;
        (*win_ptr)->slots[i].target_list_tail = NULL;
    }

388 389
    /* FIXME: we can optimize by letting the user to pass WIN INFO hint if they will not use passive target,
       in such case we do not need to allocate window pool for lock entries. */
390 391
    MPIU_CHKPMEM_MALLOC((*win_ptr)->lock_entry_pool_start, struct MPIDI_RMA_Lock_entry *,
                        sizeof(MPIDI_RMA_Lock_entry) * MPIR_CVAR_CH3_RMA_LOCK_ENTRY_WIN_POOL_SIZE,
392 393 394 395 396 397 398 399
                        mpi_errno, "RMA lock entry pool");
    (*win_ptr)->lock_entry_pool = NULL;
    (*win_ptr)->lock_entry_pool_tail = NULL;
    for (i = 0; i < MPIR_CVAR_CH3_RMA_LOCK_ENTRY_WIN_POOL_SIZE; i++) {
        MPL_LL_APPEND((*win_ptr)->lock_entry_pool, (*win_ptr)->lock_entry_pool_tail,
                      &((*win_ptr)->lock_entry_pool_start[i]));
    }

400 401
    MPID_WIN_FTABLE_SET_DEFAULTS(win_ptr);

Xin Zhao's avatar
Xin Zhao committed
402 403 404 405 406 407
    /* enqueue window into the global list */
    MPIU_CHKPMEM_MALLOC(win_elem, MPIDI_RMA_Win_list_t *, sizeof(MPIDI_RMA_Win_list_t), mpi_errno,
                        "Window list element");
    win_elem->win_ptr = *win_ptr;
    MPL_LL_APPEND(MPIDI_RMA_Win_list, MPIDI_RMA_Win_list_tail, win_elem);

408
  fn_exit:
409 410
    MPIDI_FUNC_EXIT(MPID_STATE_WIN_INIT);
    return mpi_errno;
411
  fn_fail:
412
    MPIU_CHKPMEM_REAP();
413 414
    goto fn_exit;
}
415 416 417 418 419 420


#undef FUNCNAME
#define FUNCNAME MPID_Win_set_info
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
421
int MPID_Win_set_info(MPID_Win * win, MPID_Info * info)
422 423 424 425 426 427 428
{
    int mpi_errno = MPI_SUCCESS;
    MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_SET_INFO);

    MPIDI_FUNC_ENTER(MPID_STATE_MPID_WIN_SET_INFO);

    mpi_errno = win->RMAFns.Win_set_info(win, info);
429 430 431
    if (mpi_errno != MPI_SUCCESS) {
        MPIU_ERR_POP(mpi_errno);
    }
432

433
  fn_exit:
434 435
    MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_SET_INFO);
    return mpi_errno;
436
  fn_fail:
437 438 439 440 441 442 443 444
    goto fn_exit;
}


#undef FUNCNAME
#define FUNCNAME MPID_Win_get_info
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
445
int MPID_Win_get_info(MPID_Win * win, MPID_Info ** info_used)
446 447 448 449 450 451 452
{
    int mpi_errno = MPI_SUCCESS;
    MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_GET_INFO);

    MPIDI_FUNC_ENTER(MPID_STATE_MPID_WIN_GET_INFO);

    mpi_errno = win->RMAFns.Win_get_info(win, info_used);
453 454 455
    if (mpi_errno != MPI_SUCCESS) {
        MPIU_ERR_POP(mpi_errno);
    }
456

457
  fn_exit:
458 459
    MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_GET_INFO);
    return mpi_errno;
460
  fn_fail:
461 462
    goto fn_exit;
}