This source file includes following definitions.
- MPI_Put
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 #include "ompi_config.h"
  25 #include <stdio.h>
  26 
  27 #include "ompi/mpi/c/bindings.h"
  28 #include "ompi/runtime/params.h"
  29 #include "ompi/communicator/communicator.h"
  30 #include "ompi/errhandler/errhandler.h"
  31 #include "ompi/win/win.h"
  32 #include "ompi/mca/osc/osc.h"
  33 #include "ompi/datatype/ompi_datatype.h"
  34 #include "ompi/runtime/ompi_spc.h"
  35 
  36 #if OMPI_BUILD_MPI_PROFILING
  37 #if OPAL_HAVE_WEAK_SYMBOLS
  38 #pragma weak MPI_Put = PMPI_Put
  39 #endif
  40 #define MPI_Put PMPI_Put
  41 #endif
  42 
  43 static const char FUNC_NAME[] = "MPI_Put";
  44 
  45 
  46 int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
  47             int target_rank, 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_PUT, 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 (NULL == target_datatype ||
  67                    MPI_DATATYPE_NULL == target_datatype) {
  68             rc = MPI_ERR_TYPE;
  69         } else if ( MPI_WIN_FLAVOR_DYNAMIC != win->w_flavor && target_disp < 0 ) {
  70             rc = MPI_ERR_DISP;
  71         } else {
  72             OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, origin_datatype, origin_count);
  73             if (OMPI_SUCCESS == rc) {
  74                 OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, target_datatype, target_count);
  75             }
  76         }
  77         OMPI_ERRHANDLER_CHECK(rc, win, rc, FUNC_NAME);
  78     }
  79 
  80     if (MPI_PROC_NULL == target_rank) return MPI_SUCCESS;
  81 
  82     OPAL_CR_ENTER_LIBRARY();
  83 
  84     rc = win->w_osc_module->osc_put(origin_addr, origin_count, origin_datatype,
  85                                     target_rank, target_disp, target_count,
  86                                     target_datatype, win);
  87     OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME);
  88 }