This source file includes following definitions.
- MPI_Comm_create_group
   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/mca/pml/pml.h"
  32 #include "ompi/memchecker.h"
  33 
  34 #if OMPI_BUILD_MPI_PROFILING
  35 #if OPAL_HAVE_WEAK_SYMBOLS
  36 #pragma weak MPI_Comm_create_group = PMPI_Comm_create_group
  37 #endif
  38 #define MPI_Comm_create_group PMPI_Comm_create_group
  39 #endif
  40 
  41 static const char FUNC_NAME[] = "MPI_Comm_create_group";
  42 
  43 
  44 int MPI_Comm_create_group (MPI_Comm comm, MPI_Group group, int tag, MPI_Comm *newcomm) {
  45     int rc;
  46 
  47     MEMCHECKER(
  48         memchecker_comm(comm);
  49     );
  50 
  51     if ( MPI_PARAM_CHECK ) {
  52         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  53 
  54         if (ompi_comm_invalid (comm))
  55             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
  56                                           FUNC_NAME);
  57 
  58         if (tag < 0 || tag > mca_pml.pml_max_tag)
  59             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TAG,
  60                                           FUNC_NAME);
  61 
  62         if ( NULL == group )
  63             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_GROUP,
  64                                           FUNC_NAME);
  65 
  66         if ( NULL == newcomm )
  67             return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG,
  68                                           FUNC_NAME);
  69     }
  70 
  71     if (MPI_GROUP_NULL == group || MPI_UNDEFINED == ompi_group_rank (group)) {
  72         *newcomm = MPI_COMM_NULL;
  73         return MPI_SUCCESS;
  74     }
  75 
  76     OPAL_CR_ENTER_LIBRARY();
  77 
  78     rc = ompi_comm_create_group ((ompi_communicator_t *) comm, (ompi_group_t *) group,
  79                                  tag, (ompi_communicator_t **) newcomm);
  80     OMPI_ERRHANDLER_RETURN (rc, comm, rc, FUNC_NAME);
  81 }