2004-01-21 03:05:46 +03:00
|
|
|
/*
|
|
|
|
* $HEADERS$
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-01-21 03:05:46 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "mpi.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "mpi/c/bindings.h"
|
2004-06-16 05:41:01 +04:00
|
|
|
#include "runtime/runtime.h"
|
|
|
|
#include "communicator/communicator.h"
|
2004-01-21 03:05:46 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
2004-01-21 03:05:46 +03:00
|
|
|
#pragma weak MPI_Comm_join = PMPI_Comm_join
|
|
|
|
#endif
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#if OMPI_PROFILING_DEFINES
|
2004-04-20 22:50:43 +04:00
|
|
|
#include "mpi/c/profile/defines.h"
|
|
|
|
#endif
|
|
|
|
|
2004-06-16 05:41:01 +04:00
|
|
|
int MPI_Comm_join(int fd, MPI_Comm *intercomm)
|
|
|
|
{
|
|
|
|
if ( MPI_PARAM_CHECK ) {
|
|
|
|
if ( ompi_mpi_finalized )
|
|
|
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
|
|
|
"MPI_Comm_join");
|
|
|
|
if ( NULL == intercomm )
|
|
|
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
|
|
|
"MPI_Comm_join");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* sendrecv OOB-name (port-name) through the socket connection.
|
|
|
|
Need to determine somehow how to avoid a potential deadlock
|
|
|
|
here. *o/
|
|
|
|
/* if proc unknown, set up the proc-structure */
|
|
|
|
/* setup the intercomm-structure using ompi_comm_set (); */
|
|
|
|
/* setup comm_cid: need a separate routine for that,
|
|
|
|
since it is so trivial ? How about multi-threaded case ? */
|
|
|
|
/* PROBLEM: do we have to re-start some low level stuff
|
|
|
|
to enable the usage of fast communication devices
|
|
|
|
between the two worlds ? */
|
|
|
|
|
2004-01-21 03:05:46 +03:00
|
|
|
return MPI_SUCCESS;
|
|
|
|
}
|