This source file includes following definitions.
- MPIX_Alltoall_init
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25 
  26 #include "ompi_config.h"
  27 #include <stdio.h>
  28 
  29 #include "ompi/mpi/c/bindings.h"
  30 #include "ompi/runtime/params.h"
  31 #include "ompi/communicator/communicator.h"
  32 #include "ompi/errhandler/errhandler.h"
  33 #include "ompi/datatype/ompi_datatype.h"
  34 #include "ompi/memchecker.h"
  35 #include "ompi/mpiext/pcollreq/c/mpiext_pcollreq_c.h"
  36 #include "ompi/runtime/ompi_spc.h"
  37 
  38 #if OMPI_BUILD_MPI_PROFILING
  39 #if OPAL_HAVE_WEAK_SYMBOLS
  40 #pragma weak MPIX_Alltoall_init = PMPIX_Alltoall_init
  41 #endif
  42 #define MPIX_Alltoall_init PMPIX_Alltoall_init
  43 #endif
  44 
  45 static const char FUNC_NAME[] = "MPIX_Alltoall_init";
  46 
  47 
  48 int MPIX_Alltoall_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
  49                        void *recvbuf, int recvcount, MPI_Datatype recvtype,
  50                        MPI_Comm comm, MPI_Info info, MPI_Request *request)
  51 {
  52     size_t sendtype_size, recvtype_size;
  53     int err;
  54 
  55     SPC_RECORD(OMPI_SPC_ALLTOALL_INIT, 1);
  56 
  57     MEMCHECKER(
  58         memchecker_comm(comm);
  59         if (MPI_IN_PLACE != sendbuf) {
  60             memchecker_datatype(sendtype);
  61             memchecker_call(&opal_memchecker_base_isdefined, (void *)sendbuf, sendcount, sendtype);
  62         }
  63         memchecker_datatype(recvtype);
  64         memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, recvtype);
  65     );
  66 
  67     if (MPI_PARAM_CHECK) {
  68 
  69         
  70 
  71 
  72         err = MPI_SUCCESS;
  73         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  74         if (ompi_comm_invalid(comm)) {
  75             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
  76                                           FUNC_NAME);
  77         } else if ((MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
  78                    MPI_IN_PLACE == recvbuf) {
  79             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
  80                                           FUNC_NAME);
  81         } else {
  82             if (MPI_IN_PLACE != sendbuf) {
  83                 OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
  84                 OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
  85             }
  86             OMPI_CHECK_DATATYPE_FOR_RECV(err, recvtype, recvcount);
  87             OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
  88         }
  89 
  90         if (MPI_IN_PLACE != sendbuf && !OMPI_COMM_IS_INTER(comm)) {
  91             ompi_datatype_type_size(sendtype, &sendtype_size);
  92             ompi_datatype_type_size(recvtype, &recvtype_size);
  93             if ((sendtype_size*sendcount) != (recvtype_size*recvcount)) {
  94                 return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TRUNCATE, FUNC_NAME);
  95             }
  96         }
  97     }
  98 
  99     OPAL_CR_ENTER_LIBRARY();
 100 
 101     
 102     err = comm->c_coll->coll_alltoall_init(sendbuf, sendcount, sendtype,
 103                                            recvbuf, recvcount, recvtype, comm, info,
 104                                            request, comm->c_coll->coll_alltoall_init_module);
 105     OMPI_ERRHANDLER_RETURN(err, comm, err, FUNC_NAME);
 106 }