diff --git a/src/mca/coll/demo/Makefile.am b/src/mca/coll/demo/Makefile.am index a1f85f7fbb..df71c646ca 100644 --- a/src/mca/coll/demo/Makefile.am +++ b/src/mca/coll/demo/Makefile.am @@ -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__.la (for DSO builds) or libmca__.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 diff --git a/src/mca/coll/demo/coll_demo.h b/src/mca/coll/demo/coll_demo.h index efd7574a77..883ca92487 100644 --- a/src/mca/coll/demo/coll_demo.h +++ b/src/mca/coll/demo/coll_demo.h @@ -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) } diff --git a/src/mca/coll/demo/coll_demo_allgather.c b/src/mca/coll/demo/coll_demo_allgather.c index 0c72a9b23c..9d96aa9b7a 100644 --- a/src/mca/coll/demo/coll_demo_allgather.c +++ b/src/mca/coll/demo/coll_demo_allgather.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_allgatherv.c b/src/mca/coll/demo/coll_demo_allgatherv.c index 630f230550..3054da8b57 100644 --- a/src/mca/coll/demo/coll_demo_allgatherv.c +++ b/src/mca/coll/demo/coll_demo_allgatherv.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_allreduce.c b/src/mca/coll/demo/coll_demo_allreduce.c index 2c3c01b236..7561a8cbe0 100644 --- a/src/mca/coll/demo/coll_demo_allreduce.c +++ b/src/mca/coll/demo/coll_demo_allreduce.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_alltoall.c b/src/mca/coll/demo/coll_demo_alltoall.c index 88ee0229d4..deeb416985 100644 --- a/src/mca/coll/demo/coll_demo_alltoall.c +++ b/src/mca/coll/demo/coll_demo_alltoall.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_alltoallv.c b/src/mca/coll/demo/coll_demo_alltoallv.c index 55dae4f4ac..7b744f4a0b 100644 --- a/src/mca/coll/demo/coll_demo_alltoallv.c +++ b/src/mca/coll/demo/coll_demo_alltoallv.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_alltoallw.c b/src/mca/coll/demo/coll_demo_alltoallw.c index d6d0c0e274..6d57d79dde 100644 --- a/src/mca/coll/demo/coll_demo_alltoallw.c +++ b/src/mca/coll/demo/coll_demo_alltoallw.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_barrier.c b/src/mca/coll/demo/coll_demo_barrier.c index 6056e2c4ae..fc22514e3c 100644 --- a/src/mca/coll/demo/coll_demo_barrier.c +++ b/src/mca/coll/demo/coll_demo_barrier.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_bcast.c b/src/mca/coll/demo/coll_demo_bcast.c index 23fa733999..9c029e6179 100644 --- a/src/mca/coll/demo/coll_demo_bcast.c +++ b/src/mca/coll/demo/coll_demo_bcast.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_component.c b/src/mca/coll/demo/coll_demo_component.c index c51c18a806..3f7eb6fc59 100644 --- a/src/mca/coll/demo/coll_demo_component.c +++ b/src/mca/coll/demo/coll_demo_component.c @@ -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 = diff --git a/src/mca/coll/demo/coll_demo_exscan.c b/src/mca/coll/demo/coll_demo_exscan.c index cb5cb930d9..68f89be19b 100644 --- a/src/mca/coll/demo/coll_demo_exscan.c +++ b/src/mca/coll/demo/coll_demo_exscan.c @@ -13,9 +13,6 @@ */ #include "ompi_config.h" -#include "coll_demo.h" - -#include #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); } diff --git a/src/mca/coll/demo/coll_demo_gather.c b/src/mca/coll/demo/coll_demo_gather.c index 41ae266117..c464f002b4 100644 --- a/src/mca/coll/demo/coll_demo_gather.c +++ b/src/mca/coll/demo/coll_demo_gather.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_gatherv.c b/src/mca/coll/demo/coll_demo_gatherv.c index f217d2489b..a0bcada73a 100644 --- a/src/mca/coll/demo/coll_demo_gatherv.c +++ b/src/mca/coll/demo/coll_demo_gatherv.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo.c b/src/mca/coll/demo/coll_demo_module.c similarity index 53% rename from src/mca/coll/demo/coll_demo.c rename to src/mca/coll/demo/coll_demo_module.c index a3fe36ad0a..b715fc8357 100644 --- a/src/mca/coll/demo/coll_demo.c +++ b/src/mca/coll/demo/coll_demo_module.c @@ -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; } diff --git a/src/mca/coll/demo/coll_demo_reduce.c b/src/mca/coll/demo/coll_demo_reduce.c index 180c86d065..db9842d503 100644 --- a/src/mca/coll/demo/coll_demo_reduce.c +++ b/src/mca/coll/demo/coll_demo_reduce.c @@ -13,9 +13,6 @@ */ #include "ompi_config.h" -#include "coll_demo.h" - -#include #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); } diff --git a/src/mca/coll/demo/coll_demo_reduce_scatter.c b/src/mca/coll/demo/coll_demo_reduce_scatter.c index c40e369e3a..bbcb165917 100644 --- a/src/mca/coll/demo/coll_demo_reduce_scatter.c +++ b/src/mca/coll/demo/coll_demo_reduce_scatter.c @@ -13,10 +13,6 @@ */ #include "ompi_config.h" -#include "coll_demo.h" - -#include -#include #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); } diff --git a/src/mca/coll/demo/coll_demo_scan.c b/src/mca/coll/demo/coll_demo_scan.c index 0526d2b051..783235b455 100644 --- a/src/mca/coll/demo/coll_demo_scan.c +++ b/src/mca/coll/demo/coll_demo_scan.c @@ -13,9 +13,6 @@ */ #include "ompi_config.h" -#include "coll_demo.h" - -#include #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). + */ diff --git a/src/mca/coll/demo/coll_demo_scatter.c b/src/mca/coll/demo/coll_demo_scatter.c index 444888bc37..d6a238697a 100644 --- a/src/mca/coll/demo/coll_demo_scatter.c +++ b/src/mca/coll/demo/coll_demo_scatter.c @@ -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); } diff --git a/src/mca/coll/demo/coll_demo_scatterv.c b/src/mca/coll/demo/coll_demo_scatterv.c index ae1c2f1d0d..71b5e45945 100644 --- a/src/mca/coll/demo/coll_demo_scatterv.c +++ b/src/mca/coll/demo/coll_demo_scatterv.c @@ -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); }