2004-01-26 01:07:54 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "lam_config.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-26 01:07:54 +03:00
|
|
|
|
|
|
|
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
|
|
|
#pragma weak MPI_Intercomm_merge = PMPI_Intercomm_merge
|
|
|
|
#endif
|
|
|
|
|
2004-04-20 22:50:43 +04:00
|
|
|
#if LAM_PROFILING_DEFINES
|
|
|
|
#include "mpi/c/profile/defines.h"
|
|
|
|
#endif
|
|
|
|
|
2004-01-26 01:07:54 +03:00
|
|
|
int MPI_Intercomm_merge(MPI_Comm intercomm, int high,
|
2004-03-26 23:03:38 +03:00
|
|
|
MPI_Comm *newcomm) {
|
|
|
|
|
|
|
|
|
|
|
|
if ( MPI_PARAM_CHECK ) {
|
|
|
|
if ( lam_mpi_finalized )
|
|
|
|
return LAM_ERRHANDLER_INVOKE ( MPI_COMM_WORLD, MPI_ERR_INTERN,
|
|
|
|
"MPI_Intercomm_merge");
|
|
|
|
|
|
|
|
if ( MPI_COMM_NULL == intercomm || lam_comm_invalid ( intercomm ) ||
|
|
|
|
!( intercomm->c_flags & LAM_COMM_INTER ) )
|
|
|
|
return LAM_ERRHANDLER_INVOKE ( MPI_COMM_WORLD, MPI_ERR_COMM,
|
|
|
|
"MPI_Intercomm_merge");
|
|
|
|
|
|
|
|
if ( NULL == newcomm )
|
|
|
|
return LAM_ERRHANDLER_INVOKE ( intercomm, MPI_ERR_ARG,
|
|
|
|
"MPI_Intercomm_merge");
|
|
|
|
}
|
|
|
|
|
2004-01-26 01:07:54 +03:00
|
|
|
return MPI_SUCCESS;
|
|
|
|
}
|