2004-01-21 00:05:46 +00:00
|
|
|
/*
|
|
|
|
* $HEADERS$
|
|
|
|
*/
|
2004-06-07 15:33:53 +00:00
|
|
|
#include "ompi_config.h"
|
2004-01-21 00:05:46 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "mpi.h"
|
2004-03-17 18:45:16 +00:00
|
|
|
#include "mpi/c/bindings.h"
|
2004-03-26 20:03:38 +00:00
|
|
|
#include "communicator/communicator.h"
|
2004-01-21 00:05:46 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
2004-01-21 00:05:46 +00:00
|
|
|
#pragma weak MPI_Comm_group = PMPI_Comm_group
|
|
|
|
#endif
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#if OMPI_PROFILING_DEFINES
|
2004-04-20 18:50:43 +00:00
|
|
|
#include "mpi/c/profile/defines.h"
|
|
|
|
#endif
|
|
|
|
|
2004-07-30 02:58:53 +00:00
|
|
|
static const char FUNC_NAME[] = "MPI_Comm_group";
|
2004-06-22 20:21:35 +00:00
|
|
|
|
|
|
|
|
2004-01-21 00:05:46 +00:00
|
|
|
int MPI_Comm_group(MPI_Comm comm, MPI_Group *group) {
|
2004-03-26 20:03:38 +00:00
|
|
|
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
/* argument checking */
|
|
|
|
if ( MPI_PARAM_CHECK ) {
|
2004-06-22 20:21:35 +00:00
|
|
|
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
2004-03-26 20:03:38 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
if ( MPI_COMM_NULL == comm || ompi_comm_invalid (comm) )
|
|
|
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
2004-06-22 20:21:35 +00:00
|
|
|
FUNC_NAME);
|
2004-03-26 20:03:38 +00:00
|
|
|
|
|
|
|
if ( NULL == group )
|
2004-06-07 15:33:53 +00:00
|
|
|
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG,
|
2004-06-22 20:21:35 +00:00
|
|
|
FUNC_NAME);
|
2004-03-26 20:03:38 +00:00
|
|
|
} /* end if ( MPI_PARAM_CHECK) */
|
|
|
|
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
rc = ompi_comm_group ( (ompi_communicator_t*)comm, (ompi_group_t**)group );
|
2004-06-22 20:21:35 +00:00
|
|
|
OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME);
|
2004-01-21 00:05:46 +00:00
|
|
|
}
|