2004-01-09 08:21:01 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_COLL_H
|
|
|
|
#define MCA_COLL_H
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
#include "mpi.h"
|
|
|
|
#include "mca/mca.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "mca/base/base.h"
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2004-08-02 04:24:22 +04:00
|
|
|
* Coll component function typedefs
|
2004-01-09 08:21:01 +03:00
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_component_init_query_fn_t)
|
|
|
|
(bool *allow_multi_user_threads, bool *have_hidden_threads);
|
|
|
|
typedef const struct mca_coll_base_module_1_0_0_t *
|
|
|
|
(*mca_coll_base_component_comm_query_1_0_0_fn_t)
|
|
|
|
(struct ompi_communicator_t *comm, int *priority);
|
|
|
|
typedef int (*mca_coll_base_component_comm_unquery_fn_t)
|
2004-06-29 04:02:25 +04:00
|
|
|
(struct ompi_communicator_t *comm);
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
/*
|
|
|
|
* Coll module function typedefs
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef const struct mca_coll_base_module_1_0_0_t *
|
2004-06-29 04:02:25 +04:00
|
|
|
(*mca_coll_base_module_init_1_0_0_fn_t)(struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_finalize_fn_t)
|
|
|
|
(struct ompi_communicator_t *comm);
|
2004-01-12 00:31:52 +03:00
|
|
|
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_allgather_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_allgatherv_fn_t)
|
|
|
|
(void *sbuf, int scount, ompi_datatype_t *sdtype,
|
|
|
|
void * rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_allreduce_fn_t)
|
|
|
|
(void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
|
|
|
|
struct ompi_op_t *op, struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_alltoall_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void* rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_alltoallv_fn_t)
|
|
|
|
(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_alltoallw_fn_t)
|
|
|
|
(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t **sdtypes,
|
|
|
|
void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t **rdtypes,
|
|
|
|
struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_barrier_fn_t)
|
|
|
|
(struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_bcast_fn_t)
|
|
|
|
(void *buff, int count, struct ompi_datatype_t *datatype, int root,
|
|
|
|
struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_exscan_fn_t)
|
|
|
|
(void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
|
|
|
|
struct ompi_op_t *op, struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_gather_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
int root, struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_gatherv_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype,
|
|
|
|
int root, struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_reduce_fn_t)
|
|
|
|
(void *sbuf, void* rbuf, int count, struct ompi_datatype_t *dtype,
|
|
|
|
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_reduce_scatter_fn_t)
|
|
|
|
(void *sbuf, void *rbuf, int *rcounts, struct ompi_datatype_t *dtype,
|
|
|
|
struct ompi_op_t *op, struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_scan_fn_t)
|
|
|
|
(void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
|
|
|
|
struct ompi_op_t *op, struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_scatter_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
int root, struct ompi_communicator_t *comm);
|
|
|
|
typedef int (*mca_coll_base_module_scatterv_fn_t)
|
|
|
|
(void *sbuf, int *scounts, int *disps, struct ompi_datatype_t *sdtype,
|
|
|
|
void* rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
int root, struct ompi_communicator_t *comm);
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2004-08-02 04:24:22 +04:00
|
|
|
* Structure for coll v1.0.0 components
|
2004-01-12 00:31:52 +03:00
|
|
|
* Chained to MCA v1.0.0
|
2004-01-09 08:21:01 +03:00
|
|
|
*/
|
2004-08-02 04:24:22 +04:00
|
|
|
struct mca_coll_base_component_1_0_0_t {
|
|
|
|
mca_base_component_t collm_version;
|
|
|
|
mca_base_component_data_1_0_0_t collm_data;
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
/* Initialization / querying functions */
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_coll_base_component_init_query_fn_t collm_init_query;
|
|
|
|
mca_coll_base_component_comm_query_1_0_0_fn_t collm_comm_query;
|
|
|
|
mca_coll_base_component_comm_unquery_fn_t collm_comm_unquery;
|
2004-01-10 20:27:28 +03:00
|
|
|
};
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef struct mca_coll_base_component_1_0_0_t mca_coll_base_component_1_0_0_t;
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2004-08-02 04:24:22 +04:00
|
|
|
* This struct is hung on the communicator by the winning coll component
|
2004-01-09 20:01:57 +03:00
|
|
|
* after the negotiation. It has pointers for all the collective
|
|
|
|
* functions, as well as a "finalize" function for when the
|
|
|
|
* communicator is freed.
|
2004-01-09 08:21:01 +03:00
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
struct mca_coll_base_module_1_0_0_t {
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
/* Per-communicator initialization and finalization functions */
|
|
|
|
|
2004-06-29 04:02:25 +04:00
|
|
|
mca_coll_base_module_init_1_0_0_fn_t coll_module_init;
|
|
|
|
mca_coll_base_module_finalize_fn_t coll_module_finalize;
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
/* Collective function pointers */
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_coll_base_module_allgather_fn_t coll_allgather;
|
|
|
|
mca_coll_base_module_allgatherv_fn_t coll_allgatherv;
|
|
|
|
mca_coll_base_module_allreduce_fn_t coll_allreduce;
|
|
|
|
mca_coll_base_module_alltoall_fn_t coll_alltoall;
|
|
|
|
mca_coll_base_module_alltoallv_fn_t coll_alltoallv;
|
|
|
|
mca_coll_base_module_alltoallw_fn_t coll_alltoallw;
|
|
|
|
mca_coll_base_module_barrier_fn_t coll_barrier;
|
|
|
|
mca_coll_base_module_bcast_fn_t coll_bcast;
|
|
|
|
mca_coll_base_module_exscan_fn_t coll_exscan;
|
|
|
|
mca_coll_base_module_gather_fn_t coll_gather;
|
|
|
|
mca_coll_base_module_gatherv_fn_t coll_gatherv;
|
|
|
|
mca_coll_base_module_reduce_fn_t coll_reduce;
|
|
|
|
mca_coll_base_module_reduce_scatter_fn_t coll_reduce_scatter;
|
|
|
|
mca_coll_base_module_scan_fn_t coll_scan;
|
|
|
|
mca_coll_base_module_scatter_fn_t coll_scatter;
|
|
|
|
mca_coll_base_module_scatterv_fn_t coll_scatterv;
|
2004-01-10 20:27:28 +03:00
|
|
|
};
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef struct mca_coll_base_module_1_0_0_t mca_coll_base_module_1_0_0_t;
|
2004-01-12 00:31:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2004-08-02 04:24:22 +04:00
|
|
|
* Macro for use in components that are of type coll v1.0.0
|
2004-01-12 00:31:52 +03:00
|
|
|
*/
|
|
|
|
#define MCA_COLL_BASE_VERSION_1_0_0 \
|
|
|
|
/* coll v1.0 is chained to MCA v1.0 */ \
|
|
|
|
MCA_BASE_VERSION_1_0_0, \
|
|
|
|
/* coll v1.0 */ \
|
|
|
|
"coll", 1, 0, 0
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
#endif /* MCA_COLL_H */
|