This source file includes following definitions.
- MPI_Get
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 #include "ompi_config.h"
  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/win/win.h"
  31 #include "ompi/mca/osc/osc.h"
  32 #include "ompi/datatype/ompi_datatype.h"
  33 #include "ompi/runtime/ompi_spc.h"
  34 
  35 #if OMPI_BUILD_MPI_PROFILING
  36 #if OPAL_HAVE_WEAK_SYMBOLS
  37 #pragma weak MPI_Get = PMPI_Get
  38 #endif
  39 #define MPI_Get PMPI_Get
  40 #endif
  41 
  42 static const char FUNC_NAME[] = "MPI_Get";
  43 
  44 
  45 int MPI_Get(void *origin_addr, int origin_count,
  46             MPI_Datatype origin_datatype, int target_rank,
  47             MPI_Aint target_disp, int target_count,
  48             MPI_Datatype target_datatype, MPI_Win win)
  49 {
  50     int rc;
  51 
  52     SPC_RECORD(OMPI_SPC_GET, 1);
  53 
  54     if (MPI_PARAM_CHECK) {
  55         rc = OMPI_SUCCESS;
  56 
  57         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  58 
  59         if (ompi_win_invalid(win)) {
  60             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME);
  61         } else if (origin_count < 0 || target_count < 0) {
  62             rc = MPI_ERR_COUNT;
  63         } else if (ompi_win_peer_invalid(win, target_rank) &&
  64                    (MPI_PROC_NULL != target_rank)) {
  65             rc = MPI_ERR_RANK;
  66         } else if ( MPI_WIN_FLAVOR_DYNAMIC != win->w_flavor && target_disp < 0 ) {
  67             rc = MPI_ERR_DISP;
  68         } else {
  69             OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, origin_datatype, origin_count);
  70             if (OMPI_SUCCESS == rc) {
  71                 OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, target_datatype, target_count);
  72             }
  73         }
  74         OMPI_ERRHANDLER_CHECK(rc, win, rc, FUNC_NAME);
  75     }
  76 
  77     if (MPI_PROC_NULL == target_rank) return MPI_SUCCESS;
  78 
  79     OPAL_CR_ENTER_LIBRARY();
  80 
  81     rc = win->w_osc_module->osc_get(origin_addr, origin_count, origin_datatype,
  82                                     target_rank, target_disp, target_count,
  83                                     target_datatype, win);
  84     OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME);
  85 }