root/ompi/mpi/c/win_set_info.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. MPI_Win_set_info

   1 /*
   2  * Copyright (c) 2013      Sandia National Laboratories.  All rights reserved.
   3  * Copyright (c) 2015      Research Organization for Information Science
   4  *                         and Technology (RIST). All rights reserved.
   5  * Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 #include "ompi_config.h"
  14 
  15 #include "ompi/mpi/c/bindings.h"
  16 #include "ompi/runtime/params.h"
  17 #include "ompi/errhandler/errhandler.h"
  18 #include "ompi/win/win.h"
  19 #include "ompi/communicator/communicator.h"
  20 #include "opal/util/info_subscriber.h"
  21 
  22 #if OMPI_BUILD_MPI_PROFILING
  23 #if OPAL_HAVE_WEAK_SYMBOLS
  24 #pragma weak MPI_Win_set_info = PMPI_Win_set_info
  25 #endif
  26 #define MPI_Win_set_info PMPI_Win_set_info
  27 #endif
  28 
  29 static const char FUNC_NAME[] = "MPI_Win_set_info";
  30 
  31 
  32 int MPI_Win_set_info(MPI_Win win, MPI_Info info)
  33 {
  34     int ret;
  35 
  36     if (MPI_PARAM_CHECK) {
  37         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  38 
  39         if (ompi_win_invalid(win)) {
  40             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME);
  41         }
  42 
  43         if (NULL == info || MPI_INFO_NULL == info ||
  44             ompi_info_is_freed(info)) {
  45             return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_INFO, FUNC_NAME);
  46         }
  47     }
  48 
  49     OPAL_CR_ENTER_LIBRARY();
  50 
  51     ret = opal_infosubscribe_change_info(&(win->super), &(info->super));
  52 
  53     OMPI_ERRHANDLER_RETURN(ret, win, ret, FUNC_NAME);
  54 }

/* [<][>][^][v][top][bottom][index][help] */