This source file includes following definitions.
- ompi_unpack_f
   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 "ompi/mpi/fortran/mpif-h/bindings.h"
  25 #include "ompi/mpi/fortran/base/constants.h"
  26 
  27 #if OMPI_BUILD_MPI_PROFILING
  28 #if OPAL_HAVE_WEAK_SYMBOLS
  29 #pragma weak PMPI_UNPACK = ompi_unpack_f
  30 #pragma weak pmpi_unpack = ompi_unpack_f
  31 #pragma weak pmpi_unpack_ = ompi_unpack_f
  32 #pragma weak pmpi_unpack__ = ompi_unpack_f
  33 
  34 #pragma weak PMPI_Unpack_f = ompi_unpack_f
  35 #pragma weak PMPI_Unpack_f08 = ompi_unpack_f
  36 #else
  37 OMPI_GENERATE_F77_BINDINGS (PMPI_UNPACK,
  38                            pmpi_unpack,
  39                            pmpi_unpack_,
  40                            pmpi_unpack__,
  41                            pompi_unpack_f,
  42                            (char *inbuf, MPI_Fint *insize, MPI_Fint *position, char *outbuf, MPI_Fint *outcount, MPI_Fint *datatype, MPI_Fint *comm, MPI_Fint *ierr),
  43                            (inbuf, insize, position, outbuf, outcount, datatype, comm, ierr) )
  44 #endif
  45 #endif
  46 
  47 #if OPAL_HAVE_WEAK_SYMBOLS
  48 #pragma weak MPI_UNPACK = ompi_unpack_f
  49 #pragma weak mpi_unpack = ompi_unpack_f
  50 #pragma weak mpi_unpack_ = ompi_unpack_f
  51 #pragma weak mpi_unpack__ = ompi_unpack_f
  52 
  53 #pragma weak MPI_Unpack_f = ompi_unpack_f
  54 #pragma weak MPI_Unpack_f08 = ompi_unpack_f
  55 #else
  56 #if ! OMPI_BUILD_MPI_PROFILING
  57 OMPI_GENERATE_F77_BINDINGS (MPI_UNPACK,
  58                            mpi_unpack,
  59                            mpi_unpack_,
  60                            mpi_unpack__,
  61                            ompi_unpack_f,
  62                            (char *inbuf, MPI_Fint *insize, MPI_Fint *position, char *outbuf, MPI_Fint *outcount, MPI_Fint *datatype, MPI_Fint *comm, MPI_Fint *ierr),
  63                            (inbuf, insize, position, outbuf, outcount, datatype, comm, ierr) )
  64 #else
  65 #define ompi_unpack_f pompi_unpack_f
  66 #endif
  67 #endif
  68 
  69 
  70 void ompi_unpack_f(char *inbuf, MPI_Fint *insize, MPI_Fint *position,
  71                   char *outbuf, MPI_Fint *outcount, MPI_Fint *datatype,
  72                   MPI_Fint *comm, MPI_Fint *ierr)
  73 {
  74    int c_ierr;
  75    MPI_Comm c_comm;
  76    MPI_Datatype c_type;
  77    OMPI_SINGLE_NAME_DECL(position);
  78 
  79    c_comm = PMPI_Comm_f2c(*comm);
  80    c_type = PMPI_Type_f2c(*datatype);
  81    OMPI_SINGLE_FINT_2_INT(position);
  82 
  83    c_ierr = PMPI_Unpack(inbuf, OMPI_FINT_2_INT(*insize),
  84                        OMPI_SINGLE_NAME_CONVERT(position),
  85                        OMPI_F2C_BOTTOM(outbuf), OMPI_FINT_2_INT(*outcount),
  86                        c_type, c_comm);
  87    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  88 
  89    if (MPI_SUCCESS == c_ierr) {
  90         OMPI_SINGLE_INT_2_FINT(position);
  91     }
  92 }