This source file includes following definitions.
- MPI_Pack_external
   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/datatype/ompi_datatype.h"
  32 #include "opal/datatype/opal_convertor.h"
  33 #include "ompi/memchecker.h"
  34 
  35 #if OMPI_BUILD_MPI_PROFILING
  36 #if OPAL_HAVE_WEAK_SYMBOLS
  37 #pragma weak MPI_Pack_external = PMPI_Pack_external
  38 #endif
  39 #define MPI_Pack_external PMPI_Pack_external
  40 #endif
  41 
  42 static const char FUNC_NAME[] = "MPI_Pack_external";
  43 
  44 
  45 int MPI_Pack_external(const char datarep[], const void *inbuf, int incount,
  46                       MPI_Datatype datatype, void *outbuf,
  47                       MPI_Aint outsize, MPI_Aint *position)
  48 {
  49     int rc = MPI_SUCCESS;
  50 
  51     MEMCHECKER(
  52         memchecker_datatype(datatype);
  53         memchecker_call(&opal_memchecker_base_isdefined, inbuf, incount, datatype);
  54     );
  55 
  56     if (MPI_PARAM_CHECK) {
  57         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  58         if ((NULL == outbuf) || (NULL == position)) {  
  59             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME);
  60         } else if (incount < 0) {
  61             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COUNT, FUNC_NAME);
  62         } else if (outsize < 0) {
  63             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME);
  64         }
  65         OMPI_CHECK_DATATYPE_FOR_SEND(rc, datatype, incount);
  66         OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
  67         OMPI_CHECK_USER_BUFFER(rc, inbuf, datatype, incount);
  68         OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
  69     }
  70 
  71     OPAL_CR_ENTER_LIBRARY();
  72 
  73     rc = ompi_datatype_pack_external(datarep, inbuf, incount,
  74                                      datatype, outbuf, 
  75                                      outsize, position);
  76 
  77     OPAL_CR_EXIT_LIBRARY();
  78 
  79     OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
  80 }