This source file includes following definitions.
- MPI_Win_create
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 #include "ompi_config.h"
  23 
  24 #include <stdio.h>
  25 
  26 #include "ompi/mpi/c/bindings.h"
  27 #include "ompi/runtime/params.h"
  28 #include "ompi/communicator/communicator.h"
  29 #include "ompi/errhandler/errhandler.h"
  30 #include "ompi/info/info.h"
  31 #include "ompi/win/win.h"
  32 #include "ompi/memchecker.h"
  33 
  34 #if OMPI_BUILD_MPI_PROFILING
  35 #if OPAL_HAVE_WEAK_SYMBOLS
  36 #pragma weak MPI_Win_create = PMPI_Win_create
  37 #endif
  38 #define MPI_Win_create PMPI_Win_create
  39 #endif
  40 
  41 static const char FUNC_NAME[] = "MPI_Win_create";
  42 
  43 
  44 int MPI_Win_create(void *base, MPI_Aint size, int disp_unit,
  45                    MPI_Info info, MPI_Comm comm, MPI_Win *win)
  46 {
  47     int ret = MPI_SUCCESS;
  48 
  49     MEMCHECKER(
  50         memchecker_comm(comm);
  51     );
  52     
  53     if (MPI_PARAM_CHECK) {
  54         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  55 
  56         if (ompi_comm_invalid (comm)) {
  57             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
  58                                           FUNC_NAME);
  59 
  60         } else if (NULL == info || ompi_info_is_freed(info)) {
  61             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_INFO,
  62                                           FUNC_NAME);
  63 
  64         } else if (NULL == win) {
  65             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_WIN, FUNC_NAME);
  66         } else if ( size < 0 ) {
  67             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_SIZE, FUNC_NAME);
  68         } else if ( disp_unit <= 0 ) {
  69             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_DISP, FUNC_NAME);
  70         }
  71     }
  72 
  73     
  74     if (OMPI_COMM_IS_INTER(comm)) {
  75         return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_COMM, FUNC_NAME);
  76     }
  77 
  78     OPAL_CR_ENTER_LIBRARY();
  79 
  80     
  81     ret = ompi_win_create(base, (size_t)size, disp_unit, comm,
  82                           &(info->super), win);
  83     if (OMPI_SUCCESS != ret) {
  84         *win = MPI_WIN_NULL;
  85         OPAL_CR_EXIT_LIBRARY();
  86         return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_WIN, FUNC_NAME);
  87     }
  88 
  89     OPAL_CR_EXIT_LIBRARY();
  90     return MPI_SUCCESS;
  91 }