2004-01-12 00:26:55 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-02-15 00:26:30 +03:00
|
|
|
#include "coll_basic.h"
|
2004-01-12 00:26:55 +03:00
|
|
|
|
|
|
|
#include "mpi.h"
|
2004-06-29 04:02:25 +04:00
|
|
|
#include "include/constants.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "communicator/communicator.h"
|
|
|
|
#include "mca/coll/coll.h"
|
|
|
|
#include "mca/coll/base/coll_tags.h"
|
2004-01-12 00:26:55 +03:00
|
|
|
#include "coll_basic.h"
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2004-06-29 04:02:25 +04:00
|
|
|
* allgatherv_intra
|
2004-01-12 00:26:55 +03:00
|
|
|
*
|
|
|
|
* Function: - allgather using other MPI collectives
|
|
|
|
* Accepts: - same as MPI_Allgatherv()
|
|
|
|
* Returns: - MPI_SUCCESS or error code
|
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
int mca_coll_basic_allgatherv_intra(void *sbuf, int scount,
|
|
|
|
struct ompi_datatype_t *sdtype,
|
|
|
|
void * rbuf, int *rcounts, int *disps,
|
|
|
|
struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm)
|
2004-01-12 00:26:55 +03:00
|
|
|
{
|
|
|
|
int i, size;
|
|
|
|
int err;
|
|
|
|
|
|
|
|
/* Collect all values at each process, one at a time. */
|
|
|
|
|
2004-06-29 04:02:25 +04:00
|
|
|
size = ompi_comm_size(comm);
|
2004-01-12 00:26:55 +03:00
|
|
|
for (i = 0; i < size; ++i) {
|
2004-06-29 04:02:25 +04:00
|
|
|
err = comm->c_coll.coll_gatherv(sbuf, scount, sdtype, rbuf,
|
|
|
|
rcounts, disps, rdtype, i, comm);
|
|
|
|
if (MPI_SUCCESS != err) {
|
|
|
|
printf("allgatherv barfed: errcode %d\n", err);
|
2004-01-12 00:26:55 +03:00
|
|
|
return err;
|
2004-06-29 04:02:25 +04:00
|
|
|
}
|
2004-01-12 00:26:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
return MPI_SUCCESS;
|
2004-06-29 04:02:25 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* allgatherv_inter
|
|
|
|
*
|
|
|
|
* Function: - allgather using other MPI collectives
|
|
|
|
* Accepts: - same as MPI_Allgatherv()
|
|
|
|
* Returns: - MPI_SUCCESS or error code
|
|
|
|
*/
|
|
|
|
int mca_coll_basic_allgatherv_inter(void *sbuf, int scount,
|
|
|
|
struct ompi_datatype_t *sdtype,
|
|
|
|
void * rbuf, int *rcounts, int *disps,
|
|
|
|
struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm)
|
|
|
|
{
|
|
|
|
/* Need to implement this */
|
|
|
|
|
|
|
|
return OMPI_ERR_NOT_IMPLEMENTED;
|
2004-01-12 00:26:55 +03:00
|
|
|
}
|