2004-01-21 03:05:46 +03:00
|
|
|
/*
|
|
|
|
* $HEADERS$
|
|
|
|
*/
|
|
|
|
#include "lam_config.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "mpi.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "mpi/c/bindings.h"
|
2004-03-26 23:03:38 +03:00
|
|
|
#include "runtime/runtime.h"
|
|
|
|
#include "communicator/communicator.h"
|
2004-01-21 03:05:46 +03:00
|
|
|
|
|
|
|
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
|
|
|
#pragma weak MPI_Comm_group = PMPI_Comm_group
|
|
|
|
#endif
|
|
|
|
|
2004-04-20 22:50:43 +04:00
|
|
|
#if LAM_PROFILING_DEFINES
|
|
|
|
#include "mpi/c/profile/defines.h"
|
|
|
|
#endif
|
|
|
|
|
2004-01-21 03:05:46 +03:00
|
|
|
int MPI_Comm_group(MPI_Comm comm, MPI_Group *group) {
|
2004-03-26 23:03:38 +03:00
|
|
|
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
/* argument checking */
|
|
|
|
if ( MPI_PARAM_CHECK ) {
|
|
|
|
if ( lam_mpi_finalized )
|
|
|
|
return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
|
|
|
"MPI_Comm_group");
|
|
|
|
|
|
|
|
if ( MPI_COMM_NULL == comm || lam_comm_invalid (comm) )
|
|
|
|
return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
|
|
|
"MPI_Comm_group");
|
|
|
|
|
|
|
|
if ( NULL == group )
|
|
|
|
return LAM_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG,
|
|
|
|
"MPI_Comm_group");
|
|
|
|
} /* end if ( MPI_PARAM_CHECK) */
|
|
|
|
|
|
|
|
|
2004-03-28 18:25:27 +04:00
|
|
|
rc = lam_comm_group ( (lam_communicator_t*)comm, (lam_group_t**)group );
|
2004-03-26 23:03:38 +03:00
|
|
|
LAM_ERRHANDLER_RETURN ( rc, comm, rc, "MPI_Comm_group");
|
2004-01-21 03:05:46 +03:00
|
|
|
}
|