2004-01-09 08:21:01 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
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"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
|
2005-01-30 21:42:37 +03:00
|
|
|
/*
|
|
|
|
* Forward declaration
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct mca_coll_base_comm_t;
|
|
|
|
|
|
|
|
|
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)
|
2005-03-27 17:05:23 +04:00
|
|
|
(bool enable_progress_threads, bool enable_mpi_threads);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef const struct mca_coll_base_module_1_0_0_t *
|
|
|
|
(*mca_coll_base_component_comm_query_1_0_0_fn_t)
|
2005-01-30 21:42:37 +03:00
|
|
|
(struct ompi_communicator_t *comm, int *priority,
|
|
|
|
struct mca_coll_base_comm_t **data);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_component_comm_unquery_fn_t)
|
2005-01-30 21:42:37 +03:00
|
|
|
(struct ompi_communicator_t *comm,
|
|
|
|
struct mca_coll_base_comm_t *data);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
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)
|
2004-11-05 10:52:30 +03:00
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
2004-08-02 04:24:22 +04:00
|
|
|
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 */
|