- Remove unnecessary #include's (but still leave some that are
unnecessary for this demo component, but will generally be needed for a real coll component, by way of example) - Re-indent to 4 space tabs, since this component is used as a template - Update to new coll selection API (with the data parameter) This commit was SVN r4252.
Этот коммит содержится в:
родитель
5e47dafca6
Коммит
adf454c3c4
@ -20,9 +20,31 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign dist-bzip2
|
||||
|
||||
|
||||
EXTRA_DIST = VERSION
|
||||
|
||||
# Source files
|
||||
|
||||
sources = \
|
||||
coll_demo.h \
|
||||
coll_demo_allgather.c \
|
||||
coll_demo_allgatherv.c \
|
||||
coll_demo_allreduce.c \
|
||||
coll_demo_alltoall.c \
|
||||
coll_demo_alltoallv.c \
|
||||
coll_demo_alltoallw.c \
|
||||
coll_demo_barrier.c \
|
||||
coll_demo_bcast.c \
|
||||
coll_demo_component.c \
|
||||
coll_demo_gather.c \
|
||||
coll_demo_gatherv.c \
|
||||
coll_demo_module.c \
|
||||
coll_demo_reduce.c \
|
||||
coll_demo_reduce_scatter.c \
|
||||
coll_demo_scan.c \
|
||||
coll_demo_exscan.c \
|
||||
coll_demo_scatter.c \
|
||||
coll_demo_scatterv.c
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
@ -45,26 +67,3 @@ noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_coll_demo_la_SOURCES = $(sources)
|
||||
libmca_coll_demo_la_LIBADD = src/libmca_coll_demo.la
|
||||
libmca_coll_demo_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
# Source files
|
||||
|
||||
sources = \
|
||||
coll_demo.h \
|
||||
coll_demo.c \
|
||||
coll_demo_allgather.c \
|
||||
coll_demo_allgatherv.c \
|
||||
coll_demo_allreduce.c \
|
||||
coll_demo_alltoall.c \
|
||||
coll_demo_alltoallv.c \
|
||||
coll_demo_alltoallw.c \
|
||||
coll_demo_barrier.c \
|
||||
coll_demo_bcast.c \
|
||||
coll_demo_component.c \
|
||||
coll_demo_gather.c \
|
||||
coll_demo_gatherv.c \
|
||||
coll_demo_reduce.c \
|
||||
coll_demo_reduce_scatter.c \
|
||||
coll_demo_scan.c \
|
||||
coll_demo_exscan.c \
|
||||
coll_demo_scatter.c \
|
||||
coll_demo_scatterv.c
|
||||
|
@ -27,190 +27,183 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Globally exported variable
|
||||
*/
|
||||
/* Globally exported variables */
|
||||
|
||||
extern const mca_coll_base_component_1_0_0_t mca_coll_demo_component;
|
||||
extern int mca_coll_demo_priority_param;
|
||||
extern int mca_coll_demo_verbose_param;
|
||||
extern int mca_coll_demo_verbose;
|
||||
extern const mca_coll_base_component_1_0_0_t mca_coll_demo_component;
|
||||
extern int mca_coll_demo_priority_param;
|
||||
extern int mca_coll_demo_verbose_param;
|
||||
extern int mca_coll_demo_verbose;
|
||||
|
||||
|
||||
/*
|
||||
* coll API functions
|
||||
*/
|
||||
/* Component functions */
|
||||
|
||||
int mca_coll_demo_init_query(bool *allow_demo_user_threads,
|
||||
bool *have_hidden_threads);
|
||||
const struct mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_demo_comm_query(struct ompi_communicator_t *comm, int *priority,
|
||||
struct mca_coll_base_comm_t **data);
|
||||
|
||||
/* Module functions */
|
||||
|
||||
/* API functions */
|
||||
const struct mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_demo_module_init(struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_module_finalize(struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_init_query(bool *allow_demo_user_threads,
|
||||
bool *have_hidden_threads);
|
||||
const struct mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_demo_comm_query(struct ompi_communicator_t *comm, int *priority);
|
||||
int mca_coll_demo_comm_unquery(struct ompi_communicator_t *comm);
|
||||
|
||||
const struct mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_demo_module_init(struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_module_finalize(struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_allgather_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_allgather_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_allgatherv_intra(void *sbuf, int scount,
|
||||
int mca_coll_demo_allgather_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void * rbuf, int *rcounts, int *disps,
|
||||
void *rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_allgatherv_inter(void *sbuf, int scount,
|
||||
int mca_coll_demo_allgather_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void * rbuf, int *rcounts, int *disps,
|
||||
void *rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_allreduce_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_allreduce_inter(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_alltoall_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_alltoall_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_alltoallv_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
|
||||
int mca_coll_demo_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);
|
||||
int mca_coll_demo_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);
|
||||
|
||||
int mca_coll_demo_allreduce_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_allreduce_inter(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_alltoall_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int *rcounts, int *rdisps,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_alltoallv_inter(void *sbuf, int *scounts, int *sdisps,
|
||||
int mca_coll_demo_alltoall_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int *rcounts, int *rdisps,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_alltoallw_intra(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);
|
||||
int mca_coll_demo_alltoallw_inter(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);
|
||||
|
||||
int mca_coll_demo_barrier_intra(struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_barrier_inter(struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_bcast_intra(void *buff, int count,
|
||||
struct ompi_datatype_t *datatype,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_bcast_inter(void *buff, int count,
|
||||
struct ompi_datatype_t *datatype,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
|
||||
int mca_coll_demo_alltoallv_intra(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);
|
||||
int mca_coll_demo_alltoallv_inter(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);
|
||||
|
||||
int mca_coll_demo_alltoallw_intra(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);
|
||||
int mca_coll_demo_alltoallw_inter(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);
|
||||
|
||||
int mca_coll_demo_barrier_intra(struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_barrier_inter(struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_bcast_intra(void *buff, int count,
|
||||
struct ompi_datatype_t *datatype,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_exscan_inter(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
int mca_coll_demo_bcast_inter(void *buff, int count,
|
||||
struct ompi_datatype_t *datatype,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_gather_intra(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);
|
||||
int mca_coll_demo_gather_inter(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);
|
||||
|
||||
int mca_coll_demo_gatherv_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||
int *rcounts, int *disps,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
|
||||
int mca_coll_demo_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_gatherv_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||
int *rcounts, int *disps,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
int mca_coll_demo_exscan_inter(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_reduce_intra(void *sbuf, void* rbuf, int count,
|
||||
|
||||
int mca_coll_demo_gather_intra(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);
|
||||
int mca_coll_demo_gather_inter(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);
|
||||
|
||||
int mca_coll_demo_gatherv_intra(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);
|
||||
int mca_coll_demo_gatherv_inter(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);
|
||||
|
||||
int mca_coll_demo_reduce_intra(void *sbuf, void* rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_reduce_inter(void *sbuf, void* rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_reduce_scatter_intra(void *sbuf, void *rbuf,
|
||||
int *rcounts,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_reduce_scatter_inter(void *sbuf, void *rbuf,
|
||||
int *rcounts,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_scan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_reduce_inter(void *sbuf, void* rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
int mca_coll_demo_scan_inter(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_reduce_scatter_intra(void *sbuf, void *rbuf,
|
||||
int *rcounts,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_reduce_scatter_inter(void *sbuf, void *rbuf,
|
||||
int *rcounts,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_scan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_demo_scan_inter(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_demo_scatter_intra(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);
|
||||
int mca_coll_demo_scatter_inter(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);
|
||||
|
||||
int mca_coll_demo_scatterv_intra(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);
|
||||
int mca_coll_demo_scatterv_inter(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);
|
||||
|
||||
|
||||
|
||||
int mca_coll_demo_scatter_intra(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);
|
||||
int mca_coll_demo_scatter_inter(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);
|
||||
|
||||
int mca_coll_demo_scatterv_intra(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);
|
||||
int mca_coll_demo_scatterv_inter(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);
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -26,7 +25,7 @@
|
||||
/*
|
||||
* allgather_intra
|
||||
*
|
||||
* Function: - allgather using other MPI collections
|
||||
* Function: - allgather
|
||||
* Accepts: - same as MPI_Allgather()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -35,16 +34,16 @@ int mca_coll_demo_allgather_intra(void *sbuf, int scount,
|
||||
int rcount, struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allgather_intra");
|
||||
return comm->c_coll_basic_module->coll_allgather(sbuf, scount, sdtype, rbuf,
|
||||
rcount, rdtype, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allgather_intra");
|
||||
return comm->c_coll_basic_module->coll_allgather(sbuf, scount, sdtype, rbuf,
|
||||
rcount, rdtype, comm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* allgather_inter
|
||||
*
|
||||
* Function: - allgather using other MPI collections
|
||||
* Function: - allgather
|
||||
* Accepts: - same as MPI_Allgather()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -54,7 +53,7 @@ int mca_coll_demo_allgather_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allgather_inter");
|
||||
return comm->c_coll_basic_module->coll_allgather(sbuf, scount, sdtype, rbuf,
|
||||
rcount, rdtype, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allgather_inter");
|
||||
return comm->c_coll_basic_module->coll_allgather(sbuf, scount, sdtype, rbuf,
|
||||
rcount, rdtype, comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -26,7 +25,7 @@
|
||||
/*
|
||||
* allgatherv_intra
|
||||
*
|
||||
* Function: - allgather using other MPI collectives
|
||||
* Function: - allgather
|
||||
* Accepts: - same as MPI_Allgatherv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -36,17 +35,17 @@ int mca_coll_demo_allgatherv_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allgatherv_intra");
|
||||
return comm->c_coll_basic_module->coll_allgatherv(sbuf, scount, sdtype,
|
||||
rbuf, rcounts, disps,
|
||||
rdtype, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allgatherv_intra");
|
||||
return comm->c_coll_basic_module->coll_allgatherv(sbuf, scount, sdtype,
|
||||
rbuf, rcounts, disps,
|
||||
rdtype, comm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* allgatherv_inter
|
||||
*
|
||||
* Function: - allgather using other MPI collectives
|
||||
* Function: - allgather
|
||||
* Accepts: - same as MPI_Allgatherv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -56,8 +55,8 @@ int mca_coll_demo_allgatherv_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allgatherv_inter");
|
||||
return comm->c_coll_basic_module->coll_allgatherv(sbuf, scount, sdtype,
|
||||
rbuf, rcounts, disps,
|
||||
rdtype, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allgatherv_inter");
|
||||
return comm->c_coll_basic_module->coll_allgatherv(sbuf, scount, sdtype,
|
||||
rbuf, rcounts, disps,
|
||||
rdtype, comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -26,7 +25,7 @@
|
||||
/*
|
||||
* allreduce_intra
|
||||
*
|
||||
* Function: - allreduce using other MPI collectives
|
||||
* Function: - allreduce
|
||||
* Accepts: - same as MPI_Allreduce()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -35,9 +34,9 @@ int mca_coll_demo_allreduce_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allreduce_intra");
|
||||
return comm->c_coll_basic_module->coll_allreduce(sbuf, rbuf, count, dtype,
|
||||
op, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allreduce_intra");
|
||||
return comm->c_coll_basic_module->coll_allreduce(sbuf, rbuf, count, dtype,
|
||||
op, comm);
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +52,7 @@ int mca_coll_demo_allreduce_inter(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allreduce_inter");
|
||||
return comm->c_coll_basic_module->coll_allreduce(sbuf, rbuf, count, dtype,
|
||||
op, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo allreduce_inter");
|
||||
return comm->c_coll_basic_module->coll_allreduce(sbuf, rbuf, count, dtype,
|
||||
op, comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -36,10 +35,10 @@ int mca_coll_demo_alltoall_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoall_intra\n");
|
||||
return comm->c_coll_basic_module->coll_alltoall(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoall_intra\n");
|
||||
return comm->c_coll_basic_module->coll_alltoall(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
comm);
|
||||
}
|
||||
|
||||
|
||||
@ -56,8 +55,8 @@ int mca_coll_demo_alltoall_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoall_inter\n");
|
||||
return comm->c_coll_basic_module->coll_alltoall(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoall_inter\n");
|
||||
return comm->c_coll_basic_module->coll_alltoall(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -37,10 +36,10 @@ mca_coll_demo_alltoallv_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoallv_intra");
|
||||
return comm->c_coll_basic_module->coll_alltoallv(sbuf, scounts, sdisps,
|
||||
sdtype, rbuf, rcounts,
|
||||
rdisps, rdtype, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoallv_intra");
|
||||
return comm->c_coll_basic_module->coll_alltoallv(sbuf, scounts, sdisps,
|
||||
sdtype, rbuf, rcounts,
|
||||
rdisps, rdtype, comm);
|
||||
}
|
||||
|
||||
|
||||
@ -58,8 +57,8 @@ mca_coll_demo_alltoallv_inter(void *sbuf, int *scounts, int *sdisps,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoallv_inter");
|
||||
return comm->c_coll_basic_module->coll_alltoallv(sbuf, scounts, sdisps,
|
||||
sdtype, rbuf, rcounts,
|
||||
rdisps, rdtype, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoallv_inter");
|
||||
return comm->c_coll_basic_module->coll_alltoallv(sbuf, scounts, sdisps,
|
||||
sdtype, rbuf, rcounts,
|
||||
rdisps, rdtype, comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -26,7 +25,7 @@
|
||||
/*
|
||||
* alltoallw_intra
|
||||
*
|
||||
* Function: - MPI_Alltoallw for non-ompid RPIs
|
||||
* Function: - MPI_Alltoallw
|
||||
* Accepts: - same as MPI_Alltoallw()
|
||||
* Returns: - MPI_SUCCESS or an MPI error code
|
||||
*/
|
||||
@ -36,17 +35,17 @@ int mca_coll_demo_alltoallw_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
struct ompi_datatype_t **rdtypes,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoallw_intra");
|
||||
return comm->c_coll_basic_module->coll_alltoallw(sbuf, scounts, sdisps,
|
||||
sdtypes, rbuf, rcounts,
|
||||
rdisps, rdtypes, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoallw_intra");
|
||||
return comm->c_coll_basic_module->coll_alltoallw(sbuf, scounts, sdisps,
|
||||
sdtypes, rbuf, rcounts,
|
||||
rdisps, rdtypes, comm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* alltoallw_inter
|
||||
*
|
||||
* Function: - MPI_Alltoallw for non-lamd RPIs
|
||||
* Function: - MPI_Alltoallw
|
||||
* Accepts: - same as MPI_Alltoallw()
|
||||
* Returns: - MPI_SUCCESS or an MPI error code
|
||||
*/
|
||||
@ -56,8 +55,8 @@ int mca_coll_demo_alltoallw_inter(void *sbuf, int *scounts, int *sdisps,
|
||||
struct ompi_datatype_t **rdtypes,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoallw_inter");
|
||||
return comm->c_coll_basic_module->coll_alltoallw(sbuf, scounts, sdisps,
|
||||
sdtypes, rbuf, rcounts,
|
||||
rdisps, rdtypes, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo alltoallw_inter");
|
||||
return comm->c_coll_basic_module->coll_alltoallw(sbuf, scounts, sdisps,
|
||||
sdtypes, rbuf, rcounts,
|
||||
rdisps, rdtypes, comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -26,26 +25,26 @@
|
||||
/*
|
||||
* barrier_intra
|
||||
*
|
||||
* Function: - barrier using O(N) algorithm
|
||||
* Function: - barrier
|
||||
* Accepts: - same as MPI_Barrier()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_demo_barrier_intra(struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo barrier_intra");
|
||||
return comm->c_coll_basic_module->coll_barrier(comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo barrier_intra");
|
||||
return comm->c_coll_basic_module->coll_barrier(comm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* barrier_inter
|
||||
*
|
||||
* Function: - barrier using O(log(N)) algorithm
|
||||
* Function: - barrier
|
||||
* Accepts: - same as MPI_Barrier()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_demo_barrier_inter(struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo barrier_inter");
|
||||
return comm->c_coll_basic_module->coll_barrier(comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo barrier_inter");
|
||||
return comm->c_coll_basic_module->coll_barrier(comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -26,7 +25,7 @@
|
||||
/*
|
||||
* bcast_intra
|
||||
*
|
||||
* Function: - broadcast using O(N) algorithm
|
||||
* Function: - broadcast
|
||||
* Accepts: - same arguments as MPI_Bcast()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -34,16 +33,16 @@ int mca_coll_demo_bcast_intra(void *buff, int count,
|
||||
struct ompi_datatype_t *datatype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo bcast_intra");
|
||||
return comm->c_coll_basic_module->coll_bcast(buff, count, datatype,
|
||||
root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo bcast_intra");
|
||||
return comm->c_coll_basic_module->coll_bcast(buff, count, datatype,
|
||||
root, comm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* bcast_inter
|
||||
*
|
||||
* Function: - broadcast using O(N) algorithm
|
||||
* Function: - broadcast
|
||||
* Accepts: - same arguments as MPI_Bcast()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -51,7 +50,7 @@ int mca_coll_demo_bcast_inter(void *buff, int count,
|
||||
struct ompi_datatype_t *datatype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo bcast_inter");
|
||||
return comm->c_coll_basic_module->coll_bcast(buff, count, datatype,
|
||||
root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo bcast_inter");
|
||||
return comm->c_coll_basic_module->coll_bcast(buff, count, datatype,
|
||||
root, comm);
|
||||
}
|
||||
|
@ -19,11 +19,10 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
#include "coll-demo-version.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mca/coll/coll.h"
|
||||
#include "coll-demo-version.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
/*
|
||||
@ -44,6 +43,7 @@ int mca_coll_demo_verbose = 0;
|
||||
*/
|
||||
static int demo_open(void);
|
||||
|
||||
|
||||
/*
|
||||
* Instantiate the public struct with all of our public information
|
||||
* and pointers to our public functions in it
|
||||
@ -51,48 +51,46 @@ static int demo_open(void);
|
||||
|
||||
const mca_coll_base_component_1_0_0_t mca_coll_demo_component = {
|
||||
|
||||
/* First, the mca_component_t struct containing meta information
|
||||
about the component itself */
|
||||
/* First, the mca_component_t struct containing meta information
|
||||
about the component itself */
|
||||
|
||||
{
|
||||
/* Indicate that we are a coll v1.0.0 component (which also implies a
|
||||
specific MCA version) */
|
||||
{
|
||||
/* Indicate that we are a coll v1.0.0 component (which also
|
||||
implies a specific MCA version) */
|
||||
|
||||
MCA_COLL_BASE_VERSION_1_0_0,
|
||||
MCA_COLL_BASE_VERSION_1_0_0,
|
||||
|
||||
/* Component name and version */
|
||||
/* Component name and version */
|
||||
|
||||
"demo",
|
||||
MCA_coll_demo_MAJOR_VERSION,
|
||||
MCA_coll_demo_MINOR_VERSION,
|
||||
MCA_coll_demo_RELEASE_VERSION,
|
||||
"demo",
|
||||
MCA_coll_demo_MAJOR_VERSION,
|
||||
MCA_coll_demo_MINOR_VERSION,
|
||||
MCA_coll_demo_RELEASE_VERSION,
|
||||
|
||||
/* Component open and close functions */
|
||||
/* Component open and close functions */
|
||||
|
||||
demo_open,
|
||||
demo_open,
|
||||
NULL
|
||||
},
|
||||
|
||||
/* Next the MCA v1.0.0 component meta data */
|
||||
|
||||
{
|
||||
/* Whether the component is checkpointable or not */
|
||||
|
||||
true
|
||||
},
|
||||
|
||||
/* Initialization / querying functions */
|
||||
|
||||
mca_coll_demo_init_query,
|
||||
mca_coll_demo_comm_query,
|
||||
NULL
|
||||
},
|
||||
|
||||
/* Next the MCA v1.0.0 component meta data */
|
||||
|
||||
{
|
||||
/* Whether the component is checkpointable or not */
|
||||
|
||||
true
|
||||
},
|
||||
|
||||
/* Initialization / querying functions */
|
||||
|
||||
mca_coll_demo_init_query,
|
||||
mca_coll_demo_comm_query,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
static int demo_open(void)
|
||||
{
|
||||
/* Use a low priority, but allow other components to be lower */
|
||||
|
||||
mca_coll_demo_priority_param =
|
||||
mca_base_param_register_int("coll", "demo", "priority", NULL, 20);
|
||||
mca_coll_demo_verbose_param =
|
||||
|
@ -13,9 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -28,8 +25,8 @@
|
||||
/*
|
||||
* exscan_intra
|
||||
*
|
||||
* Function: - demo exscan operation
|
||||
* Accepts: - same arguments as MPI_Exccan()
|
||||
* Function: - exscan
|
||||
* Accepts: - same arguments as MPI_Exscan()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_demo_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||
@ -37,17 +34,17 @@ int mca_coll_demo_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo exscan_intra");
|
||||
return comm->c_coll_basic_module->coll_exscan(sbuf, rbuf, count, dtype,
|
||||
op, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo exscan_intra");
|
||||
return comm->c_coll_basic_module->coll_exscan(sbuf, rbuf, count, dtype,
|
||||
op, comm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* exscan_inter
|
||||
*
|
||||
* Function: - demo exscan operation
|
||||
* Accepts: - same arguments as MPI_Exccan()
|
||||
* Function: - exscan
|
||||
* Accepts: - same arguments as MPI_Exscan()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_demo_exscan_inter(void *sbuf, void *rbuf, int count,
|
||||
@ -55,7 +52,7 @@ int mca_coll_demo_exscan_inter(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo exscan_inter");
|
||||
return comm->c_coll_basic_module->coll_exscan(sbuf, rbuf, count, dtype,
|
||||
op, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo exscan_inter");
|
||||
return comm->c_coll_basic_module->coll_exscan(sbuf, rbuf, count, dtype,
|
||||
op, comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -25,7 +24,7 @@
|
||||
/*
|
||||
* gather_intra
|
||||
*
|
||||
* Function: - demo gather operation
|
||||
* Function: - gather
|
||||
* Accepts: - same arguments as MPI_Gather()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -35,10 +34,10 @@ int mca_coll_demo_gather_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
int root, struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo gather_intra");
|
||||
return comm->c_coll_basic_module->coll_gather(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo gather_intra");
|
||||
return comm->c_coll_basic_module->coll_gather(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
}
|
||||
|
||||
|
||||
@ -55,8 +54,8 @@ int mca_coll_demo_gather_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
int root, struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo gather_inter");
|
||||
return comm->c_coll_basic_module->coll_gather(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo gather_inter");
|
||||
return comm->c_coll_basic_module->coll_gather(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -26,8 +25,8 @@
|
||||
/*
|
||||
* gatherv_intra
|
||||
*
|
||||
* Function: - demo gatherv operation
|
||||
* Accepts: - same arguments as MPI_Bcast()
|
||||
* Function: - gatherv
|
||||
* Accepts: - same arguments as MPI_Gatherv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_demo_gatherv_intra(void *sbuf, int scount,
|
||||
@ -36,18 +35,18 @@ int mca_coll_demo_gatherv_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo gatherv_intra");
|
||||
return comm->c_coll_basic_module->coll_gatherv(sbuf, scount, sdtype,
|
||||
rbuf, rcounts, disps,
|
||||
rdtype, root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo gatherv_intra");
|
||||
return comm->c_coll_basic_module->coll_gatherv(sbuf, scount, sdtype,
|
||||
rbuf, rcounts, disps,
|
||||
rdtype, root, comm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* gatherv_inter
|
||||
*
|
||||
* Function: - demo gatherv operation
|
||||
* Accepts: - same arguments as MPI_Bcast()
|
||||
* Function: - gatherv
|
||||
* Accepts: - same arguments as MPI_Gatherv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_demo_gatherv_inter(void *sbuf, int scount,
|
||||
@ -56,8 +55,8 @@ int mca_coll_demo_gatherv_inter(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo gatherv_inter");
|
||||
return comm->c_coll_basic_module->coll_gatherv(sbuf, scount, sdtype,
|
||||
rbuf, rcounts, disps,
|
||||
rdtype, root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo gatherv_inter");
|
||||
return comm->c_coll_basic_module->coll_gatherv(sbuf, scount, sdtype,
|
||||
rbuf, rcounts, disps,
|
||||
rdtype, root, comm);
|
||||
}
|
||||
|
@ -29,29 +29,29 @@
|
||||
*/
|
||||
static const mca_coll_base_module_1_0_0_t intra = {
|
||||
|
||||
/* Initialization / finalization functions */
|
||||
/* Initialization / finalization functions */
|
||||
|
||||
mca_coll_demo_module_init,
|
||||
mca_coll_demo_module_finalize,
|
||||
mca_coll_demo_module_init,
|
||||
mca_coll_demo_module_finalize,
|
||||
|
||||
/* Collective function pointers */
|
||||
/* Collective function pointers */
|
||||
|
||||
mca_coll_demo_allgather_intra,
|
||||
mca_coll_demo_allgatherv_intra,
|
||||
mca_coll_demo_allreduce_intra,
|
||||
mca_coll_demo_alltoall_intra,
|
||||
mca_coll_demo_alltoallv_intra,
|
||||
mca_coll_demo_alltoallw_intra,
|
||||
mca_coll_demo_barrier_intra,
|
||||
mca_coll_demo_bcast_intra,
|
||||
NULL, /* Leave exscan blank just to force basic to be loaded used */
|
||||
mca_coll_demo_gather_intra,
|
||||
mca_coll_demo_gatherv_intra,
|
||||
mca_coll_demo_reduce_intra,
|
||||
mca_coll_demo_reduce_scatter_intra,
|
||||
mca_coll_demo_scan_intra,
|
||||
mca_coll_demo_scatter_intra,
|
||||
mca_coll_demo_scatterv_intra
|
||||
mca_coll_demo_allgather_intra,
|
||||
mca_coll_demo_allgatherv_intra,
|
||||
mca_coll_demo_allreduce_intra,
|
||||
mca_coll_demo_alltoall_intra,
|
||||
mca_coll_demo_alltoallv_intra,
|
||||
mca_coll_demo_alltoallw_intra,
|
||||
mca_coll_demo_barrier_intra,
|
||||
mca_coll_demo_bcast_intra,
|
||||
NULL, /* Leave exscan blank just to force basic to be used */
|
||||
mca_coll_demo_gather_intra,
|
||||
mca_coll_demo_gatherv_intra,
|
||||
mca_coll_demo_reduce_intra,
|
||||
mca_coll_demo_reduce_scatter_intra,
|
||||
mca_coll_demo_scan_intra,
|
||||
mca_coll_demo_scatter_intra,
|
||||
mca_coll_demo_scatterv_intra
|
||||
};
|
||||
|
||||
|
||||
@ -60,29 +60,29 @@ static const mca_coll_base_module_1_0_0_t intra = {
|
||||
*/
|
||||
static const mca_coll_base_module_1_0_0_t inter = {
|
||||
|
||||
/* Initialization / finalization functions */
|
||||
/* Initialization / finalization functions */
|
||||
|
||||
mca_coll_demo_module_init,
|
||||
mca_coll_demo_module_finalize,
|
||||
mca_coll_demo_module_init,
|
||||
mca_coll_demo_module_finalize,
|
||||
|
||||
/* Collective function pointers */
|
||||
/* Collective function pointers */
|
||||
|
||||
mca_coll_demo_allgather_inter,
|
||||
mca_coll_demo_allgatherv_inter,
|
||||
mca_coll_demo_allreduce_inter,
|
||||
mca_coll_demo_alltoall_inter,
|
||||
mca_coll_demo_alltoallv_inter,
|
||||
mca_coll_demo_alltoallw_inter,
|
||||
mca_coll_demo_barrier_inter,
|
||||
mca_coll_demo_bcast_inter,
|
||||
mca_coll_demo_exscan_inter,
|
||||
mca_coll_demo_gather_inter,
|
||||
mca_coll_demo_gatherv_inter,
|
||||
mca_coll_demo_reduce_inter,
|
||||
mca_coll_demo_reduce_scatter_inter,
|
||||
NULL,
|
||||
mca_coll_demo_scatter_inter,
|
||||
mca_coll_demo_scatterv_inter
|
||||
mca_coll_demo_allgather_inter,
|
||||
mca_coll_demo_allgatherv_inter,
|
||||
mca_coll_demo_allreduce_inter,
|
||||
mca_coll_demo_alltoall_inter,
|
||||
mca_coll_demo_alltoallv_inter,
|
||||
mca_coll_demo_alltoallw_inter,
|
||||
mca_coll_demo_barrier_inter,
|
||||
mca_coll_demo_bcast_inter,
|
||||
mca_coll_demo_exscan_inter,
|
||||
mca_coll_demo_gather_inter,
|
||||
mca_coll_demo_gatherv_inter,
|
||||
mca_coll_demo_reduce_inter,
|
||||
mca_coll_demo_reduce_scatter_inter,
|
||||
NULL,
|
||||
mca_coll_demo_scatter_inter,
|
||||
mca_coll_demo_scatterv_inter
|
||||
};
|
||||
|
||||
|
||||
@ -93,12 +93,12 @@ static const mca_coll_base_module_1_0_0_t inter = {
|
||||
int mca_coll_demo_init_query(bool *allow_demo_user_threads,
|
||||
bool *have_hidden_user_threads)
|
||||
{
|
||||
*allow_demo_user_threads = true;
|
||||
*have_hidden_user_threads = false;
|
||||
*allow_demo_user_threads = true;
|
||||
*have_hidden_user_threads = false;
|
||||
|
||||
/* All done */
|
||||
/* All done */
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@ -108,14 +108,15 @@ int mca_coll_demo_init_query(bool *allow_demo_user_threads,
|
||||
* priority we want to return.
|
||||
*/
|
||||
const mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_demo_comm_query(struct ompi_communicator_t *comm, int *priority)
|
||||
mca_coll_demo_comm_query(struct ompi_communicator_t *comm, int *priority,
|
||||
struct mca_coll_base_comm_t **data)
|
||||
{
|
||||
if (OMPI_SUCCESS != mca_base_param_lookup_int(mca_coll_demo_priority_param,
|
||||
priority)) {
|
||||
return NULL;
|
||||
}
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_base_param_lookup_int(mca_coll_demo_priority_param, priority)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return OMPI_COMM_IS_INTER(comm) ? &inter : &intra;
|
||||
return OMPI_COMM_IS_INTER(comm) ? &inter : &intra;
|
||||
}
|
||||
|
||||
|
||||
@ -140,5 +141,5 @@ mca_coll_demo_module_init(struct ompi_communicator_t *comm)
|
||||
*/
|
||||
int mca_coll_demo_module_finalize(struct ompi_communicator_t *comm)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
@ -13,9 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -28,7 +25,7 @@
|
||||
/*
|
||||
* reduce_intra
|
||||
*
|
||||
* Function: - reduction using O(N) algorithm
|
||||
* Function: - reduction
|
||||
* Accepts: - same as MPI_Reduce()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -37,16 +34,16 @@ int mca_coll_demo_reduce_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
int root, struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo reduce_intra");
|
||||
return comm->c_coll_basic_module->coll_reduce(sbuf, rbuf, count, dtype,
|
||||
op, root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo reduce_intra");
|
||||
return comm->c_coll_basic_module->coll_reduce(sbuf, rbuf, count, dtype,
|
||||
op, root, comm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* reduce_log_inter
|
||||
* reduce_inter
|
||||
*
|
||||
* Function: - reduction using O(N) algorithm
|
||||
* Function: - reduction
|
||||
* Accepts: - same as MPI_Reduce()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -55,7 +52,7 @@ int mca_coll_demo_reduce_inter(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
int root, struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo reduce_inter");
|
||||
return comm->c_coll_basic_module->coll_reduce(sbuf, rbuf, count, dtype,
|
||||
op, root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo reduce_inter");
|
||||
return comm->c_coll_basic_module->coll_reduce(sbuf, rbuf, count, dtype,
|
||||
op, root, comm);
|
||||
}
|
||||
|
@ -13,10 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -38,9 +34,9 @@ int mca_coll_demo_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatter_intra");
|
||||
return comm->c_coll_basic_module->coll_reduce_scatter(sbuf, rbuf, rcounts,
|
||||
dtype, op, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatter_intra");
|
||||
return comm->c_coll_basic_module->coll_reduce_scatter(sbuf, rbuf, rcounts,
|
||||
dtype, op, comm);
|
||||
}
|
||||
|
||||
|
||||
@ -56,7 +52,7 @@ int mca_coll_demo_reduce_scatter_inter(void *sbuf, void *rbuf, int *rcounts,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatter_inter");
|
||||
return comm->c_coll_basic_module->coll_reduce_scatter(sbuf, rbuf, rcounts,
|
||||
dtype, op, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatter_inter");
|
||||
return comm->c_coll_basic_module->coll_reduce_scatter(sbuf, rbuf, rcounts,
|
||||
dtype, op, comm);
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -28,7 +25,7 @@
|
||||
/*
|
||||
* scan
|
||||
*
|
||||
* Function: - demo scan operation
|
||||
* Function: - scan
|
||||
* Accepts: - same arguments as MPI_Scan()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -37,7 +34,12 @@ int mca_coll_demo_scan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scan_intra");
|
||||
return comm->c_coll_basic_module->coll_scan(sbuf, rbuf, count,
|
||||
dtype, op, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scan_intra");
|
||||
return comm->c_coll_basic_module->coll_scan(sbuf, rbuf, count,
|
||||
dtype, op, comm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* NOTE: There is no exscan defined for intercommunicators (see MPI-2).
|
||||
*/
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -37,10 +36,10 @@ int mca_coll_demo_scatter_intra(void *sbuf, int scount,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatter_intra");
|
||||
return comm->c_coll_basic_module->coll_scatter(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatter_intra");
|
||||
return comm->c_coll_basic_module->coll_scatter(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
}
|
||||
|
||||
|
||||
@ -58,8 +57,8 @@ int mca_coll_demo_scatter_inter(void *sbuf, int scount,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatter_inter");
|
||||
return comm->c_coll_basic_module->coll_scatter(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatter_inter");
|
||||
return comm->c_coll_basic_module->coll_scatter(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_demo.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
@ -27,7 +26,7 @@
|
||||
* scatterv_intra
|
||||
*
|
||||
* Function: - scatterv operation
|
||||
* Accepts: - same arguments as MPI_Scatter()
|
||||
* Accepts: - same arguments as MPI_Scatterv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_demo_scatterv_intra(void *sbuf, int *scounts,
|
||||
@ -36,10 +35,10 @@ int mca_coll_demo_scatterv_intra(void *sbuf, int *scounts,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatterv_intra");
|
||||
return comm->c_coll_basic_module->coll_scatterv(sbuf, scounts, disps,
|
||||
sdtype, rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatterv_intra");
|
||||
return comm->c_coll_basic_module->coll_scatterv(sbuf, scounts, disps,
|
||||
sdtype, rbuf, rcount,
|
||||
rdtype, root, comm);
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +46,7 @@ int mca_coll_demo_scatterv_intra(void *sbuf, int *scounts,
|
||||
* scatterv_inter
|
||||
*
|
||||
* Function: - scatterv operation
|
||||
* Accepts: - same arguments as MPI_Scatter()
|
||||
* Accepts: - same arguments as MPI_Scatterv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_demo_scatterv_inter(void *sbuf, int *scounts,
|
||||
@ -56,8 +55,8 @@ int mca_coll_demo_scatterv_inter(void *sbuf, int *scounts,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatterv_inter");
|
||||
return comm->c_coll_basic_module->coll_scatterv(sbuf, scounts, disps,
|
||||
sdtype, rbuf, rcount, rdtype,
|
||||
root, comm);
|
||||
ompi_output_verbose(10, mca_coll_base_output, "In demo scatterv_inter");
|
||||
return comm->c_coll_basic_module->coll_scatterv(sbuf, scounts, disps,
|
||||
sdtype, rbuf, rcount,
|
||||
rdtype, root, comm);
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user