This source file includes following definitions.
- MPI_Comm_split_type
   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/info/info.h"
  32 #include "ompi/memchecker.h"
  33 
  34 #if OMPI_BUILD_MPI_PROFILING
  35 #if OPAL_HAVE_WEAK_SYMBOLS
  36 #pragma weak MPI_Comm_split_type = PMPI_Comm_split_type
  37 #endif
  38 #define MPI_Comm_split_type PMPI_Comm_split_type
  39 #endif
  40 
  41 static const char FUNC_NAME[] = "MPI_Comm_split_type";
  42 
  43 
  44 int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key,
  45                         MPI_Info info, MPI_Comm *newcomm) {
  46 
  47     int rc;
  48 
  49     MEMCHECKER(
  50         memchecker_comm(comm);
  51     );
  52 
  53     if ( MPI_PARAM_CHECK ) {
  54         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  55 
  56         if ( ompi_comm_invalid ( comm )) {
  57             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
  58                                           FUNC_NAME);
  59         }
  60 
  61         if (NULL == info || ompi_info_is_freed(info)) {
  62             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_INFO,
  63                                           FUNC_NAME);
  64         }
  65 
  66         if ( MPI_COMM_TYPE_SHARED != split_type && 
  67              OMPI_COMM_TYPE_CLUSTER != split_type &&
  68              OMPI_COMM_TYPE_CU != split_type &&
  69              OMPI_COMM_TYPE_HOST != split_type &&
  70              OMPI_COMM_TYPE_BOARD != split_type &&
  71              OMPI_COMM_TYPE_NODE != split_type && 
  72              OMPI_COMM_TYPE_NUMA != split_type &&
  73              OMPI_COMM_TYPE_SOCKET != split_type &&
  74              OMPI_COMM_TYPE_L3CACHE != split_type &&
  75              OMPI_COMM_TYPE_L2CACHE != split_type &&
  76              OMPI_COMM_TYPE_L1CACHE != split_type &&
  77              OMPI_COMM_TYPE_CORE != split_type &&
  78              OMPI_COMM_TYPE_HWTHREAD != split_type &&
  79              MPI_UNDEFINED != split_type ) {
  80             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG,
  81                                           FUNC_NAME);
  82         }
  83 
  84         if ( NULL == newcomm ) {
  85             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG,
  86                                           FUNC_NAME);
  87         }
  88     }
  89 
  90     OPAL_CR_ENTER_LIBRARY();
  91 
  92     if( (MPI_COMM_SELF == comm) && (MPI_UNDEFINED == split_type) ) {
  93         *newcomm = MPI_COMM_NULL;
  94         rc = MPI_SUCCESS;
  95     } else {
  96         rc = ompi_comm_split_type( (ompi_communicator_t*)comm, split_type, key, &(info->super),
  97                                    (ompi_communicator_t**)newcomm);
  98     }
  99     OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME);
 100 }