From 78006f93a47a2b4d9b7cbcef07004cc0d2790e87 Mon Sep 17 00:00:00 2001 From: Joshua Hursey Date: Mon, 6 Feb 2017 21:23:23 -0600 Subject: [PATCH] coll: Move reduce_local into the coll framework * Since we are adding a new function to `mca_coll_base_module_2_1_0_t` we need to increase the version of the module structure to `2_2_0`. * Add a comment just above the PREDEFINED_COMMUNICATOR_PAD describing it's purpose and when it should change. To help future developers trying to answer the question noted in the comment. Signed-off-by: Joshua Hursey --- ompi/communicator/communicator.h | 23 +++ ompi/mca/coll/base/coll_base_comm_select.c | 25 ++- ompi/mca/coll/base/coll_base_comm_unselect.c | 3 + ompi/mca/coll/base/coll_base_functions.h | 6 + ompi/mca/coll/base/coll_base_reduce.c | 10 + ompi/mca/coll/basic/coll_basic_module.c | 3 + ompi/mca/coll/coll.h | 192 ++++++++++-------- ompi/mca/coll/inter/coll_inter.c | 3 + ompi/mca/coll/libnbc/coll_libnbc.h | 76 +++---- ompi/mca/coll/libnbc/nbc_iallgather.c | 8 +- ompi/mca/coll/libnbc/nbc_iallgatherv.c | 8 +- ompi/mca/coll/libnbc/nbc_iallreduce.c | 8 +- ompi/mca/coll/libnbc/nbc_ialltoall.c | 8 +- ompi/mca/coll/libnbc/nbc_ialltoallv.c | 8 +- ompi/mca/coll/libnbc/nbc_ialltoallw.c | 8 +- ompi/mca/coll/libnbc/nbc_ibarrier.c | 8 +- ompi/mca/coll/libnbc/nbc_ibcast.c | 7 +- ompi/mca/coll/libnbc/nbc_ibcast_inter.c | 6 +- ompi/mca/coll/libnbc/nbc_iexscan.c | 6 +- ompi/mca/coll/libnbc/nbc_igather.c | 8 +- ompi/mca/coll/libnbc/nbc_igatherv.c | 8 +- .../mca/coll/libnbc/nbc_ineighbor_allgather.c | 6 +- .../coll/libnbc/nbc_ineighbor_allgatherv.c | 6 +- ompi/mca/coll/libnbc/nbc_ineighbor_alltoall.c | 6 +- .../mca/coll/libnbc/nbc_ineighbor_alltoallv.c | 6 +- .../mca/coll/libnbc/nbc_ineighbor_alltoallw.c | 6 +- ompi/mca/coll/libnbc/nbc_ireduce.c | 7 +- ompi/mca/coll/libnbc/nbc_ireduce_scatter.c | 8 +- .../coll/libnbc/nbc_ireduce_scatter_block.c | 8 +- ompi/mca/coll/libnbc/nbc_iscan.c | 6 +- ompi/mca/coll/libnbc/nbc_iscatter.c | 8 +- ompi/mca/coll/libnbc/nbc_iscatterv.c | 8 +- ompi/mca/coll/portals4/coll_portals4.h | 7 +- .../coll/portals4/coll_portals4_allreduce.c | 5 +- .../mca/coll/portals4/coll_portals4_barrier.c | 3 +- ompi/mca/coll/portals4/coll_portals4_reduce.c | 3 +- ompi/mca/coll/self/coll_self_module.c | 4 + ompi/mpi/c/reduce_local.c | 16 +- 38 files changed, 360 insertions(+), 185 deletions(-) diff --git a/ompi/communicator/communicator.h b/ompi/communicator/communicator.h index a72e29027c..772d387435 100644 --- a/ompi/communicator/communicator.h +++ b/ompi/communicator/communicator.h @@ -20,6 +20,7 @@ * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -232,6 +233,28 @@ typedef struct ompi_communicator_t ompi_communicator_t; * size so when the bitness changes the size of the handle changes. * This is done so we don't end up needing a structure that is * incredibly larger than necessary because of the bitness. + * + * This padding mechanism works as a (likely) compile time check for when the + * size of the ompi_communicator_t exceeds the predetermined size of the + * ompi_predefined_communicator_t. It also allows us to change the size of + * the ompi_communicator_t without impacting the size of the + * ompi_predefined_communicator_t structure for some number of additions. + * + * As an example: + * If the size of ompi_communicator_t is less than the size of the _PAD then + * the _PAD ensures that the size of the ompi_predefined_communicator_t is + * whatever size is defined below in the _PAD macro. + * However, if the size of the ompi_communicator_t grows larger than the _PAD + * (say by adding a few more function pointers to the structure) then the + * 'padding' variable will be initialized to a large number often triggering + * a 'array is too large' compile time error. This signals two things: + * 1) That the _PAD should be increased. + * 2) That users need to be made aware of the size change for the + * ompi_predefined_communicator_t structure. + * + * Q: So you just made a change to communicator structure, do you need to adjust + * the PREDEFINED_COMMUNICATOR_PAD macro? + * A: Most likely not, but it would be good to check. */ #define PREDEFINED_COMMUNICATOR_PAD (sizeof(void*) * 192) diff --git a/ompi/mca/coll/base/coll_base_comm_select.c b/ompi/mca/coll/base/coll_base_comm_select.c index 6335654f3f..5d5f7e7644 100644 --- a/ompi/mca/coll/base/coll_base_comm_select.c +++ b/ompi/mca/coll/base/coll_base_comm_select.c @@ -19,7 +19,7 @@ * reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. - * Copyright (c) 2016 IBM Corporation. All rights reserved. + * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -52,7 +52,7 @@ struct avail_coll_t { opal_list_item_t super; int ac_priority; - mca_coll_base_module_2_1_0_t *ac_module; + mca_coll_base_module_2_2_0_t *ac_module; const char * ac_component_name; }; typedef struct avail_coll_t avail_coll_t; @@ -65,16 +65,16 @@ static opal_list_t *check_components(opal_list_t * components, ompi_communicator_t * comm); static int check_one_component(ompi_communicator_t * comm, const mca_base_component_t * component, - mca_coll_base_module_2_1_0_t ** module); + mca_coll_base_module_2_2_0_t ** module); static int query(const mca_base_component_t * component, ompi_communicator_t * comm, int *priority, - mca_coll_base_module_2_1_0_t ** module); + mca_coll_base_module_2_2_0_t ** module); static int query_2_0_0(const mca_coll_base_component_2_0_0_t * coll_component, ompi_communicator_t * comm, int *priority, - mca_coll_base_module_2_1_0_t ** module); + mca_coll_base_module_2_2_0_t ** module); /* * Stuff for the OBJ interface @@ -203,6 +203,8 @@ int mca_coll_base_comm_select(ompi_communicator_t * comm) COPY(avail->ac_module, comm, ineighbor_alltoall); COPY(avail->ac_module, comm, ineighbor_alltoallv); COPY(avail->ac_module, comm, ineighbor_alltoallw); + + COPY(avail->ac_module, comm, reduce_local); } /* release the original module reference and the list item */ OBJ_RELEASE(avail->ac_module); @@ -246,7 +248,8 @@ int mca_coll_base_comm_select(ompi_communicator_t * comm) CHECK_NULL(which_func, comm, ireduce_scatter) || ((OMPI_COMM_IS_INTRA(comm)) && CHECK_NULL(which_func, comm, iscan)) || CHECK_NULL(which_func, comm, iscatter) || - CHECK_NULL(which_func, comm, iscatterv)) { + CHECK_NULL(which_func, comm, iscatterv) || + CHECK_NULL(which_func, comm, reduce_local) ) { /* TODO -- Once the topology flags are set before coll_select then * check if neighborhood collectives have been set. */ @@ -285,7 +288,7 @@ static opal_list_t *check_components(opal_list_t * components, int priority; const mca_base_component_t *component; mca_base_component_list_item_t *cli; - mca_coll_base_module_2_1_0_t *module; + mca_coll_base_module_2_2_0_t *module; opal_list_t *selectable; avail_coll_t *avail; @@ -341,7 +344,7 @@ static opal_list_t *check_components(opal_list_t * components, */ static int check_one_component(ompi_communicator_t * comm, const mca_base_component_t * component, - mca_coll_base_module_2_1_0_t ** module) + mca_coll_base_module_2_2_0_t ** module) { int err; int priority = -1; @@ -375,7 +378,7 @@ static int check_one_component(ompi_communicator_t * comm, */ static int query(const mca_base_component_t * component, ompi_communicator_t * comm, - int *priority, mca_coll_base_module_2_1_0_t ** module) + int *priority, mca_coll_base_module_2_2_0_t ** module) { *module = NULL; if (2 == component->mca_type_major_version && @@ -395,9 +398,9 @@ static int query(const mca_base_component_t * component, static int query_2_0_0(const mca_coll_base_component_2_0_0_t * component, ompi_communicator_t * comm, int *priority, - mca_coll_base_module_2_1_0_t ** module) + mca_coll_base_module_2_2_0_t ** module) { - mca_coll_base_module_2_1_0_t *ret; + mca_coll_base_module_2_2_0_t *ret; /* There's currently no need for conversion */ diff --git a/ompi/mca/coll/base/coll_base_comm_unselect.c b/ompi/mca/coll/base/coll_base_comm_unselect.c index f6f7a69990..d7c4532c92 100644 --- a/ompi/mca/coll/base/coll_base_comm_unselect.c +++ b/ompi/mca/coll/base/coll_base_comm_unselect.c @@ -14,6 +14,7 @@ * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -98,6 +99,8 @@ int mca_coll_base_comm_unselect(ompi_communicator_t * comm) CLOSE(comm, ineighbor_alltoallv); CLOSE(comm, ineighbor_alltoallw); + CLOSE(comm, reduce_local); + /* All done */ return OMPI_SUCCESS; } diff --git a/ompi/mca/coll/base/coll_base_functions.h b/ompi/mca/coll/base/coll_base_functions.h index 0d1c4b34eb..5db4d4cc7c 100644 --- a/ompi/mca/coll/base/coll_base_functions.h +++ b/ompi/mca/coll/base/coll_base_functions.h @@ -16,6 +16,7 @@ * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -169,6 +170,11 @@ int ompi_coll_base_scatter_intra_binomial(SCATTER_ARGS); /* ScatterV */ +/* Reduce_local */ +int mca_coll_base_reduce_local(const void *inbuf, void *inoutbuf, int count, + struct ompi_datatype_t * dtype, struct ompi_op_t * op, + mca_coll_base_module_t *module); + END_C_DECLS #define COLL_BASE_UPDATE_BINTREE( OMPI_COMM, BASE_MODULE, ROOT ) \ diff --git a/ompi/mca/coll/base/coll_base_reduce.c b/ompi/mca/coll/base/coll_base_reduce.c index 5c5585141f..711c0dea4c 100644 --- a/ompi/mca/coll/base/coll_base_reduce.c +++ b/ompi/mca/coll/base/coll_base_reduce.c @@ -14,6 +14,7 @@ * reserved. * Copyright (c) 2015-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -34,6 +35,15 @@ #include "ompi/mca/coll/base/coll_base_functions.h" #include "coll_base_topo.h" +int mca_coll_base_reduce_local(const void *inbuf, void *inoutbuf, int count, + struct ompi_datatype_t * dtype, struct ompi_op_t * op, + mca_coll_base_module_t *module) +{ + /* XXX -- CONST -- do not cast away const -- update ompi/op/op.h */ + ompi_op_reduce(op, (void *)inbuf, inoutbuf, count, dtype); + return OMPI_SUCCESS; +} + /** * This is a generic implementation of the reduce protocol. It used the tree * provided as an argument and execute all operations using a segment of diff --git a/ompi/mca/coll/basic/coll_basic_module.c b/ompi/mca/coll/basic/coll_basic_module.c index 3473a033c5..de7d10e74d 100644 --- a/ompi/mca/coll/basic/coll_basic_module.c +++ b/ompi/mca/coll/basic/coll_basic_module.c @@ -15,6 +15,7 @@ * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -132,6 +133,8 @@ mca_coll_basic_comm_query(struct ompi_communicator_t *comm, basic_module->super.coll_neighbor_alltoallv = mca_coll_basic_neighbor_alltoallv; basic_module->super.coll_neighbor_alltoallw = mca_coll_basic_neighbor_alltoallw; + basic_module->super.coll_reduce_local = mca_coll_base_reduce_local; + return &(basic_module->super); } diff --git a/ompi/mca/coll/coll.h b/ompi/mca/coll/coll.h index 981fecf0cc..5e640e5f98 100644 --- a/ompi/mca/coll/coll.h +++ b/ompi/mca/coll/coll.h @@ -17,6 +17,7 @@ * reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -136,7 +137,7 @@ typedef int (*mca_coll_base_component_init_query_fn_t) * provide a module with the requested functionality or NULL if the * component should not be used on the given communicator. */ -typedef struct mca_coll_base_module_2_1_0_t * +typedef struct mca_coll_base_module_2_2_0_t * (*mca_coll_base_component_comm_query_2_0_0_fn_t) (struct ompi_communicator_t *comm, int *priority); @@ -176,7 +177,7 @@ typedef struct mca_coll_base_module_2_1_0_t * * @param[in] comm Communicator being created */ typedef int -(*mca_coll_base_module_enable_1_1_0_fn_t)(struct mca_coll_base_module_2_1_0_t* module, +(*mca_coll_base_module_enable_1_1_0_fn_t)(struct mca_coll_base_module_2_2_0_t* module, struct ompi_communicator_t *comm); @@ -191,147 +192,147 @@ typedef int * @param[in] comm Communicator being disabled */ typedef int -(*mca_coll_base_module_disable_1_1_0_fn_t)(struct mca_coll_base_module_2_1_0_t* module, +(*mca_coll_base_module_disable_1_2_0_fn_t)(struct mca_coll_base_module_2_2_0_t* module, struct ompi_communicator_t *comm); typedef int (*mca_coll_base_module_allgather_fn_t) (const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int rcount, struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_allgatherv_fn_t) (const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void * rbuf, const int *rcounts, const int *disps, struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_allreduce_fn_t) (const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_alltoall_fn_t) (const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void* rbuf, int rcount, struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_alltoallv_fn_t) (const void *sbuf, const int *scounts, const int *sdisps, struct ompi_datatype_t *sdtype, void *rbuf, const int *rcounts, const int *rdisps, struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_alltoallw_fn_t) (const void *sbuf, const int *scounts, const int *sdisps, struct ompi_datatype_t * const *sdtypes, void *rbuf, const int *rcounts, const int *rdisps, struct ompi_datatype_t * const *rdtypes, - struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_barrier_fn_t) - (struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + (struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_bcast_fn_t) (void *buff, int count, struct ompi_datatype_t *datatype, int root, - struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_exscan_fn_t) (const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_gather_fn_t) (const 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, struct mca_coll_base_module_2_1_0_t *module); + int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_gatherv_fn_t) (const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, const int *rcounts, const int *disps, struct ompi_datatype_t *rdtype, - int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_reduce_fn_t) (const void *sbuf, void* rbuf, int count, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_reduce_scatter_fn_t) (const void *sbuf, void *rbuf, const int *rcounts, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_reduce_scatter_block_fn_t) (const void *sbuf, void *rbuf, int rcount, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_scan_fn_t) (const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_scatter_fn_t) (const 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, struct mca_coll_base_module_2_1_0_t *module); + int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_scatterv_fn_t) (const void *sbuf, const int *scounts, const int *disps, struct ompi_datatype_t *sdtype, void* rbuf, int rcount, struct ompi_datatype_t *rdtype, - int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); /* nonblocking collectives */ typedef int (*mca_coll_base_module_iallgather_fn_t) (const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int rcount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_iallgatherv_fn_t) (const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void * rbuf, const int *rcounts, const int *disps, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_iallreduce_fn_t) (const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, - ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); + ompi_request_t ** request, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_ialltoall_fn_t) (const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void* rbuf, int rcount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_ialltoallv_fn_t) (const void *sbuf, const int *scounts, const int *sdisps, struct ompi_datatype_t *sdtype, void *rbuf, const int *rcounts, const int *rdisps, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_ialltoallw_fn_t) (const void *sbuf, const int *scounts, const int *sdisps, struct ompi_datatype_t * const *sdtypes, void *rbuf, const int *rcounts, const int *rdisps, struct ompi_datatype_t * const *rdtypes, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_ibarrier_fn_t) (struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_ibcast_fn_t) (void *buff, int count, struct ompi_datatype_t *datatype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_iexscan_fn_t) (const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_igather_fn_t) (const 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, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_igatherv_fn_t) (const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, const int *rcounts, const int *disps, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_ireduce_fn_t) (const void *sbuf, void* rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_ireduce_scatter_fn_t) (const void *sbuf, void *rbuf, const int *rcounts, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_ireduce_scatter_block_fn_t) (const void *sbuf, void *rbuf, int rcount, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_iscan_fn_t) (const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_iscatter_fn_t) (const 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, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_iscatterv_fn_t) (const void *sbuf, const int *scounts, const int *disps, struct ompi_datatype_t *sdtype, void* rbuf, int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); /* * The signature of the neighborhood alltoallw differs from alltoallw @@ -339,12 +340,24 @@ typedef int (*mca_coll_base_module_iscatterv_fn_t) typedef int (*mca_coll_base_module_neighbor_alltoallw_fn_t) (const void *sbuf, const int *scounts, const MPI_Aint *sdisps, struct ompi_datatype_t * const *sdtypes, void *rbuf, const int *rcounts, const MPI_Aint *rdisps, struct ompi_datatype_t * const *rdtypes, - struct ompi_communicator_t *comm, struct mca_coll_base_module_2_1_0_t *module); + struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module); typedef int (*mca_coll_base_module_ineighbor_alltoallw_fn_t) (const void *sbuf, const int *scounts, const MPI_Aint *sdisps, struct ompi_datatype_t * const *sdtypes, void *rbuf, const int *rcounts, const MPI_Aint *rdisps, struct ompi_datatype_t * const *rdtypes, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); + +/* + * reduce_local + * Even though this is not a collective operation, it is related to the + * collectives. Adding to the framework allows a collective component the + * option of intercepting it, if desired. + */ +typedef int (*mca_coll_base_module_reduce_local_fn_t) + (const void *inbuf, void *inoutbuf, int count, + struct ompi_datatype_t * dtype, struct ompi_op_t * op, + struct mca_coll_base_module_2_2_0_t *module); + /** * Fault Tolerance Awareness function. @@ -404,7 +417,7 @@ typedef struct mca_coll_base_component_2_0_0_t mca_coll_base_component_t; * function, so the component is free to create a structure that * inherits from this one for use as the module structure. */ -struct mca_coll_base_module_2_1_0_t { +struct mca_coll_base_module_2_2_0_t { /** Collective modules all inherit from opal_object */ opal_object_t super; @@ -468,18 +481,20 @@ struct mca_coll_base_module_2_1_0_t { /** Disable function called when a collective module will not be used for the given communicator */ - mca_coll_base_module_disable_1_1_0_fn_t coll_module_disable; + mca_coll_base_module_disable_1_2_0_fn_t coll_module_disable; + + mca_coll_base_module_reduce_local_fn_t coll_reduce_local; /** Data storage for all the algorithms defined in the base. Should not be used by other modules */ struct mca_coll_base_comm_t* base_data; }; -typedef struct mca_coll_base_module_2_1_0_t mca_coll_base_module_2_1_0_t; +typedef struct mca_coll_base_module_2_2_0_t mca_coll_base_module_2_2_0_t; /** Per guidence in mca.h, use the unversioned struct name if you just want to always keep up with the most recent version of the interace. */ -typedef struct mca_coll_base_module_2_1_0_t mca_coll_base_module_t; +typedef struct mca_coll_base_module_2_2_0_t mca_coll_base_module_t; OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_coll_base_module_t); /** @@ -493,97 +508,100 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_coll_base_module_t); */ struct mca_coll_base_comm_coll_t { mca_coll_base_module_allgather_fn_t coll_allgather; - mca_coll_base_module_2_1_0_t *coll_allgather_module; + mca_coll_base_module_2_2_0_t *coll_allgather_module; mca_coll_base_module_allgatherv_fn_t coll_allgatherv; - mca_coll_base_module_2_1_0_t *coll_allgatherv_module; + mca_coll_base_module_2_2_0_t *coll_allgatherv_module; mca_coll_base_module_allreduce_fn_t coll_allreduce; - mca_coll_base_module_2_1_0_t *coll_allreduce_module; + mca_coll_base_module_2_2_0_t *coll_allreduce_module; mca_coll_base_module_alltoall_fn_t coll_alltoall; - mca_coll_base_module_2_1_0_t *coll_alltoall_module; + mca_coll_base_module_2_2_0_t *coll_alltoall_module; mca_coll_base_module_alltoallv_fn_t coll_alltoallv; - mca_coll_base_module_2_1_0_t *coll_alltoallv_module; + mca_coll_base_module_2_2_0_t *coll_alltoallv_module; mca_coll_base_module_alltoallw_fn_t coll_alltoallw; - mca_coll_base_module_2_1_0_t *coll_alltoallw_module; + mca_coll_base_module_2_2_0_t *coll_alltoallw_module; mca_coll_base_module_barrier_fn_t coll_barrier; - mca_coll_base_module_2_1_0_t *coll_barrier_module; + mca_coll_base_module_2_2_0_t *coll_barrier_module; mca_coll_base_module_bcast_fn_t coll_bcast; - mca_coll_base_module_2_1_0_t *coll_bcast_module; + mca_coll_base_module_2_2_0_t *coll_bcast_module; mca_coll_base_module_exscan_fn_t coll_exscan; - mca_coll_base_module_2_1_0_t *coll_exscan_module; + mca_coll_base_module_2_2_0_t *coll_exscan_module; mca_coll_base_module_gather_fn_t coll_gather; - mca_coll_base_module_2_1_0_t *coll_gather_module; + mca_coll_base_module_2_2_0_t *coll_gather_module; mca_coll_base_module_gatherv_fn_t coll_gatherv; - mca_coll_base_module_2_1_0_t *coll_gatherv_module; + mca_coll_base_module_2_2_0_t *coll_gatherv_module; mca_coll_base_module_reduce_fn_t coll_reduce; - mca_coll_base_module_2_1_0_t *coll_reduce_module; + mca_coll_base_module_2_2_0_t *coll_reduce_module; mca_coll_base_module_reduce_scatter_fn_t coll_reduce_scatter; - mca_coll_base_module_2_1_0_t *coll_reduce_scatter_module; + mca_coll_base_module_2_2_0_t *coll_reduce_scatter_module; mca_coll_base_module_reduce_scatter_block_fn_t coll_reduce_scatter_block; - mca_coll_base_module_2_1_0_t *coll_reduce_scatter_block_module; + mca_coll_base_module_2_2_0_t *coll_reduce_scatter_block_module; mca_coll_base_module_scan_fn_t coll_scan; - mca_coll_base_module_2_1_0_t *coll_scan_module; + mca_coll_base_module_2_2_0_t *coll_scan_module; mca_coll_base_module_scatter_fn_t coll_scatter; - mca_coll_base_module_2_1_0_t *coll_scatter_module; + mca_coll_base_module_2_2_0_t *coll_scatter_module; mca_coll_base_module_scatterv_fn_t coll_scatterv; - mca_coll_base_module_2_1_0_t *coll_scatterv_module; + mca_coll_base_module_2_2_0_t *coll_scatterv_module; /* nonblocking collectives */ mca_coll_base_module_iallgather_fn_t coll_iallgather; - mca_coll_base_module_2_1_0_t *coll_iallgather_module; + mca_coll_base_module_2_2_0_t *coll_iallgather_module; mca_coll_base_module_iallgatherv_fn_t coll_iallgatherv; - mca_coll_base_module_2_1_0_t *coll_iallgatherv_module; + mca_coll_base_module_2_2_0_t *coll_iallgatherv_module; mca_coll_base_module_iallreduce_fn_t coll_iallreduce; - mca_coll_base_module_2_1_0_t *coll_iallreduce_module; + mca_coll_base_module_2_2_0_t *coll_iallreduce_module; mca_coll_base_module_ialltoall_fn_t coll_ialltoall; - mca_coll_base_module_2_1_0_t *coll_ialltoall_module; + mca_coll_base_module_2_2_0_t *coll_ialltoall_module; mca_coll_base_module_ialltoallv_fn_t coll_ialltoallv; - mca_coll_base_module_2_1_0_t *coll_ialltoallv_module; + mca_coll_base_module_2_2_0_t *coll_ialltoallv_module; mca_coll_base_module_ialltoallw_fn_t coll_ialltoallw; - mca_coll_base_module_2_1_0_t *coll_ialltoallw_module; + mca_coll_base_module_2_2_0_t *coll_ialltoallw_module; mca_coll_base_module_ibarrier_fn_t coll_ibarrier; - mca_coll_base_module_2_1_0_t *coll_ibarrier_module; + mca_coll_base_module_2_2_0_t *coll_ibarrier_module; mca_coll_base_module_ibcast_fn_t coll_ibcast; - mca_coll_base_module_2_1_0_t *coll_ibcast_module; + mca_coll_base_module_2_2_0_t *coll_ibcast_module; mca_coll_base_module_iexscan_fn_t coll_iexscan; - mca_coll_base_module_2_1_0_t *coll_iexscan_module; + mca_coll_base_module_2_2_0_t *coll_iexscan_module; mca_coll_base_module_igather_fn_t coll_igather; - mca_coll_base_module_2_1_0_t *coll_igather_module; + mca_coll_base_module_2_2_0_t *coll_igather_module; mca_coll_base_module_igatherv_fn_t coll_igatherv; - mca_coll_base_module_2_1_0_t *coll_igatherv_module; + mca_coll_base_module_2_2_0_t *coll_igatherv_module; mca_coll_base_module_ireduce_fn_t coll_ireduce; - mca_coll_base_module_2_1_0_t *coll_ireduce_module; + mca_coll_base_module_2_2_0_t *coll_ireduce_module; mca_coll_base_module_ireduce_scatter_fn_t coll_ireduce_scatter; - mca_coll_base_module_2_1_0_t *coll_ireduce_scatter_module; + mca_coll_base_module_2_2_0_t *coll_ireduce_scatter_module; mca_coll_base_module_ireduce_scatter_block_fn_t coll_ireduce_scatter_block; - mca_coll_base_module_2_1_0_t *coll_ireduce_scatter_block_module; + mca_coll_base_module_2_2_0_t *coll_ireduce_scatter_block_module; mca_coll_base_module_iscan_fn_t coll_iscan; - mca_coll_base_module_2_1_0_t *coll_iscan_module; + mca_coll_base_module_2_2_0_t *coll_iscan_module; mca_coll_base_module_iscatter_fn_t coll_iscatter; - mca_coll_base_module_2_1_0_t *coll_iscatter_module; + mca_coll_base_module_2_2_0_t *coll_iscatter_module; mca_coll_base_module_iscatterv_fn_t coll_iscatterv; - mca_coll_base_module_2_1_0_t *coll_iscatterv_module; + mca_coll_base_module_2_2_0_t *coll_iscatterv_module; /* neighborhood collectives */ mca_coll_base_module_allgather_fn_t coll_neighbor_allgather; - mca_coll_base_module_2_1_0_t *coll_neighbor_allgather_module; + mca_coll_base_module_2_2_0_t *coll_neighbor_allgather_module; mca_coll_base_module_allgatherv_fn_t coll_neighbor_allgatherv; - mca_coll_base_module_2_1_0_t *coll_neighbor_allgatherv_module; + mca_coll_base_module_2_2_0_t *coll_neighbor_allgatherv_module; mca_coll_base_module_alltoall_fn_t coll_neighbor_alltoall; - mca_coll_base_module_2_1_0_t *coll_neighbor_alltoall_module; + mca_coll_base_module_2_2_0_t *coll_neighbor_alltoall_module; mca_coll_base_module_alltoallv_fn_t coll_neighbor_alltoallv; - mca_coll_base_module_2_1_0_t *coll_neighbor_alltoallv_module; + mca_coll_base_module_2_2_0_t *coll_neighbor_alltoallv_module; mca_coll_base_module_neighbor_alltoallw_fn_t coll_neighbor_alltoallw; - mca_coll_base_module_2_1_0_t *coll_neighbor_alltoallw_module; + mca_coll_base_module_2_2_0_t *coll_neighbor_alltoallw_module; mca_coll_base_module_iallgather_fn_t coll_ineighbor_allgather; - mca_coll_base_module_2_1_0_t *coll_ineighbor_allgather_module; + mca_coll_base_module_2_2_0_t *coll_ineighbor_allgather_module; mca_coll_base_module_iallgatherv_fn_t coll_ineighbor_allgatherv; - mca_coll_base_module_2_1_0_t *coll_ineighbor_allgatherv_module; + mca_coll_base_module_2_2_0_t *coll_ineighbor_allgatherv_module; mca_coll_base_module_ialltoall_fn_t coll_ineighbor_alltoall; - mca_coll_base_module_2_1_0_t *coll_ineighbor_alltoall_module; + mca_coll_base_module_2_2_0_t *coll_ineighbor_alltoall_module; mca_coll_base_module_ialltoallv_fn_t coll_ineighbor_alltoallv; - mca_coll_base_module_2_1_0_t *coll_ineighbor_alltoallv_module; + mca_coll_base_module_2_2_0_t *coll_ineighbor_alltoallv_module; mca_coll_base_module_ineighbor_alltoallw_fn_t coll_ineighbor_alltoallw; - mca_coll_base_module_2_1_0_t *coll_ineighbor_alltoallw_module; + mca_coll_base_module_2_2_0_t *coll_ineighbor_alltoallw_module; + + mca_coll_base_module_reduce_local_fn_t coll_reduce_local; + mca_coll_base_module_2_2_0_t *coll_reduce_local_module; }; typedef struct mca_coll_base_comm_coll_t mca_coll_base_comm_coll_t; diff --git a/ompi/mca/coll/inter/coll_inter.c b/ompi/mca/coll/inter/coll_inter.c index 2973acdd47..834f7b89ff 100644 --- a/ompi/mca/coll/inter/coll_inter.c +++ b/ompi/mca/coll/inter/coll_inter.c @@ -12,6 +12,7 @@ * Copyright (c) 2006-2007 University of Houston. All rights reserved. * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -29,6 +30,7 @@ #include "ompi/mca/coll/coll.h" #include "ompi/mca/coll/base/base.h" +#include "ompi/mca/coll/base/coll_base_functions.h" #include "ompi/mca/coll/base/coll_tags.h" #include "ompi/mca/bml/base/base.h" @@ -133,6 +135,7 @@ mca_coll_inter_comm_query(struct ompi_communicator_t *comm, int *priority) inter_module->super.coll_scan = NULL; inter_module->super.coll_scatter = mca_coll_inter_scatter_inter; inter_module->super.coll_scatterv = mca_coll_inter_scatterv_inter; + inter_module->super.coll_reduce_local = mca_coll_base_reduce_local; return &(inter_module->super); } diff --git a/ompi/mca/coll/libnbc/coll_libnbc.h b/ompi/mca/coll/libnbc/coll_libnbc.h index c8034c5316..c7c88dc937 100644 --- a/ompi/mca/coll/libnbc/coll_libnbc.h +++ b/ompi/mca/coll/libnbc/coll_libnbc.h @@ -15,7 +15,7 @@ * reserved. * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. - * Copyright (c) 2016 IBM Corporation. All rights reserved. + * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -158,132 +158,132 @@ int NBC_Progress(NBC_Handle *handle); int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iallgatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iallreduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ialltoallv(const void* sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ialltoallw(const void *sbuf, const int *scounts, const int *sdisps, struct ompi_datatype_t * const *sdtypes, void *rbuf, const int *rcounts, const int *rdisps, struct ompi_datatype_t * const *rdtypes, struct ompi_communicator_t *comm, ompi_request_t **request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ibarrier(struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iexscan(const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t **request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_igather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_igatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ireduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ireduce_scatter(const void* sendbuf, void* recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ireduce_scatter_block(const void *sbuf, void *rbuf, int rcount, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t **request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iscan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iscatter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iscatterv(const void* sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iallgather_inter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iallgatherv_inter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iallreduce_inter(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ialltoall_inter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ialltoallv_inter(const void* sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ialltoallw_inter(const void *sbuf, const int *scounts, const int *sdisps, struct ompi_datatype_t * const *sdtypes, void *rbuf, const int *rcounts, const int *rdisps, struct ompi_datatype_t * const *rdtypes, struct ompi_communicator_t *comm, ompi_request_t **request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ibarrier_inter(struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ibcast_inter(void *buffer, int count, MPI_Datatype datatype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_igather_inter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_igatherv_inter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ireduce_inter(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ireduce_scatter_inter(const void* sendbuf, void* recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ireduce_scatter_block_inter(const void *sbuf, void *rbuf, int rcount, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t **request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iscatter_inter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_iscatterv_inter(const void* sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ineighbor_allgather(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf, int rcount, MPI_Datatype rtype, struct ompi_communicator_t *comm, - ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); + ompi_request_t ** request, struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ineighbor_allgatherv(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf, const int *rcounts, const int *displs, MPI_Datatype rtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ineighbor_alltoall(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf, int rcount, MPI_Datatype rtype, struct ompi_communicator_t *comm, - ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); + ompi_request_t ** request, struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ineighbor_alltoallv(const void *sbuf, const int *scounts, const int *sdispls, MPI_Datatype stype, void *rbuf, const int *rcounts, const int *rdispls, MPI_Datatype rtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_libnbc_ineighbor_alltoallw(const void *sbuf, const int *scounts, const MPI_Aint *sdisps, struct ompi_datatype_t * const *stypes, void *rbuf, const int *rcounts, const MPI_Aint *rdisps, struct ompi_datatype_t * const *rtypes, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); END_C_DECLS diff --git a/ompi/mca/coll/libnbc/nbc_iallgather.c b/ompi/mca/coll/libnbc/nbc_iallgather.c index c6cf9d69b4..b136d89b7a 100644 --- a/ompi/mca/coll/libnbc/nbc_iallgather.c +++ b/ompi/mca/coll/libnbc/nbc_iallgather.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -41,7 +45,7 @@ int NBC_Allgather_args_compare(NBC_Allgather_args *a, NBC_Allgather_args *b, voi * each node receives from it's left (modulo p) neighbor */ int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; MPI_Aint rcvext; @@ -170,7 +174,7 @@ int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype int ompi_coll_libnbc_iallgather_inter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int res, rsize; MPI_Aint rcvext; diff --git a/ompi/mca/coll/libnbc/nbc_iallgatherv.c b/ompi/mca/coll/libnbc/nbc_iallgatherv.c index ea3c363440..39fc662ac8 100644 --- a/ompi/mca/coll/libnbc/nbc_iallgatherv.c +++ b/ompi/mca/coll/libnbc/nbc_iallgatherv.c @@ -13,6 +13,10 @@ * reserved. * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * */ #include "nbc_internal.h" @@ -31,7 +35,7 @@ * each node receives from node (rank-2)%p recvcounts[(rank+2)%p] elements */ int ompi_coll_libnbc_iallgatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res, speer, rpeer; MPI_Aint rcvext; @@ -115,7 +119,7 @@ int ompi_coll_libnbc_iallgatherv(const void* sendbuf, int sendcount, MPI_Datatyp int ompi_coll_libnbc_iallgatherv_inter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int res, rsize; MPI_Aint rcvext; diff --git a/ompi/mca/coll/libnbc/nbc_iallreduce.c b/ompi/mca/coll/libnbc/nbc_iallreduce.c index 6b6b9c7fc0..a1d98ec33b 100644 --- a/ompi/mca/coll/libnbc/nbc_iallreduce.c +++ b/ompi/mca/coll/libnbc/nbc_iallreduce.c @@ -9,6 +9,10 @@ * reserved. * Copyright (c) 2014-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -50,7 +54,7 @@ int NBC_Allreduce_args_compare(NBC_Allreduce_args *a, NBC_Allreduce_args *b, voi int ompi_coll_libnbc_iallreduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; OPAL_PTRDIFF_TYPE ext, lb; @@ -198,7 +202,7 @@ int ompi_coll_libnbc_iallreduce(const void* sendbuf, void* recvbuf, int count, M int ompi_coll_libnbc_iallreduce_inter(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, res, rsize; size_t size; diff --git a/ompi/mca/coll/libnbc/nbc_ialltoall.c b/ompi/mca/coll/libnbc/nbc_ialltoall.c index 66b178b8ab..45d38a8735 100644 --- a/ompi/mca/coll/libnbc/nbc_ialltoall.c +++ b/ompi/mca/coll/libnbc/nbc_ialltoall.c @@ -10,6 +10,10 @@ * Copyright (c) 2014 NVIDIA Corporation. All rights reserved. * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -51,7 +55,7 @@ int NBC_Alltoall_args_compare(NBC_Alltoall_args *a, NBC_Alltoall_args *b, void * /* simple linear MPI_Ialltoall the (simple) algorithm just sends to all nodes */ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res, datasize; size_t a2asize, sndsize; @@ -282,7 +286,7 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype int ompi_coll_libnbc_ialltoall_inter (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int res, rsize; MPI_Aint sndext, rcvext; diff --git a/ompi/mca/coll/libnbc/nbc_ialltoallv.c b/ompi/mca/coll/libnbc/nbc_ialltoallv.c index d714dea4c5..ebe7bf44dc 100644 --- a/ompi/mca/coll/libnbc/nbc_ialltoallv.c +++ b/ompi/mca/coll/libnbc/nbc_ialltoallv.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015-2017 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -39,7 +43,7 @@ static inline int a2av_sched_inplace(int rank, int p, NBC_Schedule *schedule, int ompi_coll_libnbc_ialltoallv(const void* sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; MPI_Aint sndext, rcvext; @@ -141,7 +145,7 @@ int ompi_coll_libnbc_ialltoallv(const void* sendbuf, const int *sendcounts, cons int ompi_coll_libnbc_ialltoallv_inter (const void* sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int res, rsize; MPI_Aint sndext, rcvext; diff --git a/ompi/mca/coll/libnbc/nbc_ialltoallw.c b/ompi/mca/coll/libnbc/nbc_ialltoallw.c index 1dadf98149..1a852b7aff 100644 --- a/ompi/mca/coll/libnbc/nbc_ialltoallw.c +++ b/ompi/mca/coll/libnbc/nbc_ialltoallw.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015-2017 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -39,7 +43,7 @@ static inline int a2aw_sched_inplace(int rank, int p, NBC_Schedule *schedule, int ompi_coll_libnbc_ialltoallw(const void* sendbuf, const int *sendcounts, const int *sdispls, struct ompi_datatype_t * const *sendtypes, void* recvbuf, const int *recvcounts, const int *rdispls, struct ompi_datatype_t * const *recvtypes, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; NBC_Schedule *schedule; @@ -126,7 +130,7 @@ int ompi_coll_libnbc_ialltoallw(const void* sendbuf, const int *sendcounts, cons int ompi_coll_libnbc_ialltoallw_inter (const void* sendbuf, const int *sendcounts, const int *sdispls, struct ompi_datatype_t * const *sendtypes, void* recvbuf, const int *recvcounts, const int *rdispls, struct ompi_datatype_t * const *recvtypes, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int res, rsize; NBC_Schedule *schedule; diff --git a/ompi/mca/coll/libnbc/nbc_ibarrier.c b/ompi/mca/coll/libnbc/nbc_ibarrier.c index 9d2c2f2c45..2a0a14072f 100644 --- a/ompi/mca/coll/libnbc/nbc_ibarrier.c +++ b/ompi/mca/coll/libnbc/nbc_ibarrier.c @@ -10,6 +10,10 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Mellanox Technologies. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -18,7 +22,7 @@ /* Dissemination implementation of MPI_Ibarrier */ int ompi_coll_libnbc_ibarrier(struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, maxround, res, recvpeer, sendpeer; NBC_Schedule *schedule; @@ -110,7 +114,7 @@ int ompi_coll_libnbc_ibarrier(struct ompi_communicator_t *comm, ompi_request_t * } int ompi_coll_libnbc_ibarrier_inter(struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, res, rsize; NBC_Schedule *schedule; diff --git a/ompi/mca/coll/libnbc/nbc_ibcast.c b/ompi/mca/coll/libnbc/nbc_ibcast.c index b2ef870dce..ec28465a70 100644 --- a/ompi/mca/coll/libnbc/nbc_ibcast.c +++ b/ompi/mca/coll/libnbc/nbc_ibcast.c @@ -9,7 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2016 IBM Corporation. All rights reserved. + * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -43,7 +46,7 @@ int NBC_Bcast_args_compare(NBC_Bcast_args *a, NBC_Bcast_args *b, void *param) { int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res, segsize; size_t size; diff --git a/ompi/mca/coll/libnbc/nbc_ibcast_inter.c b/ompi/mca/coll/libnbc/nbc_ibcast_inter.c index 8188ec6573..9b59135614 100644 --- a/ompi/mca/coll/libnbc/nbc_ibcast_inter.c +++ b/ompi/mca/coll/libnbc/nbc_ibcast_inter.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -17,7 +21,7 @@ int ompi_coll_libnbc_ibcast_inter(void *buffer, int count, MPI_Datatype datatype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int res; NBC_Schedule *schedule; NBC_Handle *handle; diff --git a/ompi/mca/coll/libnbc/nbc_iexscan.c b/ompi/mca/coll/libnbc/nbc_iexscan.c index d43edebcc6..3ae838a29f 100644 --- a/ompi/mca/coll/libnbc/nbc_iexscan.c +++ b/ompi/mca/coll/libnbc/nbc_iexscan.c @@ -9,6 +9,10 @@ * reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -43,7 +47,7 @@ int NBC_Scan_args_compare(NBC_Scan_args *a, NBC_Scan_args *b, void *param) { */ int ompi_coll_libnbc_iexscan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; ptrdiff_t gap, span; NBC_Schedule *schedule; diff --git a/ompi/mca/coll/libnbc/nbc_igather.c b/ompi/mca/coll/libnbc/nbc_igather.c index edb334a7ea..b1971dda96 100644 --- a/ompi/mca/coll/libnbc/nbc_igather.c +++ b/ompi/mca/coll/libnbc/nbc_igather.c @@ -12,6 +12,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -42,7 +46,7 @@ int NBC_Gather_args_compare(NBC_Gather_args *a, NBC_Gather_args *b, void *param) int ompi_coll_libnbc_igather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; MPI_Aint rcvext = 0; NBC_Schedule *schedule; @@ -177,7 +181,7 @@ int ompi_coll_libnbc_igather(const void* sendbuf, int sendcount, MPI_Datatype se int ompi_coll_libnbc_igather_inter (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int res, rsize; MPI_Aint rcvext = 0; NBC_Schedule *schedule; diff --git a/ompi/mca/coll/libnbc/nbc_igatherv.c b/ompi/mca/coll/libnbc/nbc_igatherv.c index 1b55002c4b..57d2ddbbef 100644 --- a/ompi/mca/coll/libnbc/nbc_igatherv.c +++ b/ompi/mca/coll/libnbc/nbc_igatherv.c @@ -13,6 +13,10 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2015 Mellanox Technologies. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -27,7 +31,7 @@ int ompi_coll_libnbc_igatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; MPI_Aint rcvext = 0; NBC_Schedule *schedule; @@ -112,7 +116,7 @@ int ompi_coll_libnbc_igatherv(const void* sendbuf, int sendcount, MPI_Datatype s int ompi_coll_libnbc_igatherv_inter (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int res, rsize; MPI_Aint rcvext; NBC_Schedule *schedule; diff --git a/ompi/mca/coll/libnbc/nbc_ineighbor_allgather.c b/ompi/mca/coll/libnbc/nbc_ineighbor_allgather.c index e9ae7b388a..eeb6371730 100644 --- a/ompi/mca/coll/libnbc/nbc_ineighbor_allgather.c +++ b/ompi/mca/coll/libnbc/nbc_ineighbor_allgather.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -41,7 +45,7 @@ int NBC_Ineighbor_allgather_args_compare(NBC_Ineighbor_allgather_args *a, NBC_In int ompi_coll_libnbc_ineighbor_allgather(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf, int rcount, MPI_Datatype rtype, struct ompi_communicator_t *comm, - ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module) { + ompi_request_t ** request, struct mca_coll_base_module_2_2_0_t *module) { int res, indegree, outdegree, *srcs, *dsts; MPI_Aint rcvext; NBC_Handle *handle; diff --git a/ompi/mca/coll/libnbc/nbc_ineighbor_allgatherv.c b/ompi/mca/coll/libnbc/nbc_ineighbor_allgatherv.c index 50d85ee406..e89d197272 100644 --- a/ompi/mca/coll/libnbc/nbc_ineighbor_allgatherv.c +++ b/ompi/mca/coll/libnbc/nbc_ineighbor_allgatherv.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -42,7 +46,7 @@ int NBC_Ineighbor_allgatherv_args_compare(NBC_Ineighbor_allgatherv_args *a, NBC_ int ompi_coll_libnbc_ineighbor_allgatherv(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf, const int *rcounts, const int *displs, MPI_Datatype rtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int res, indegree, outdegree, *srcs, *dsts; MPI_Aint rcvext; NBC_Handle *handle; diff --git a/ompi/mca/coll/libnbc/nbc_ineighbor_alltoall.c b/ompi/mca/coll/libnbc/nbc_ineighbor_alltoall.c index 3d8b34a191..f4bdc7259f 100644 --- a/ompi/mca/coll/libnbc/nbc_ineighbor_alltoall.c +++ b/ompi/mca/coll/libnbc/nbc_ineighbor_alltoall.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -38,7 +42,7 @@ int NBC_Ineighbor_alltoall_args_compare(NBC_Ineighbor_alltoall_args *a, NBC_Inei int ompi_coll_libnbc_ineighbor_alltoall(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf, int rcount, MPI_Datatype rtype, struct ompi_communicator_t *comm, - ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module) { + ompi_request_t ** request, struct mca_coll_base_module_2_2_0_t *module) { int res, indegree, outdegree, *srcs, *dsts; MPI_Aint sndext, rcvext; NBC_Handle *handle; diff --git a/ompi/mca/coll/libnbc/nbc_ineighbor_alltoallv.c b/ompi/mca/coll/libnbc/nbc_ineighbor_alltoallv.c index 52983b1632..8f2e99522d 100644 --- a/ompi/mca/coll/libnbc/nbc_ineighbor_alltoallv.c +++ b/ompi/mca/coll/libnbc/nbc_ineighbor_alltoallv.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -42,7 +46,7 @@ int NBC_Ineighbor_alltoallv_args_compare(NBC_Ineighbor_alltoallv_args *a, NBC_In int ompi_coll_libnbc_ineighbor_alltoallv(const void *sbuf, const int *scounts, const int *sdispls, MPI_Datatype stype, void *rbuf, const int *rcounts, const int *rdispls, MPI_Datatype rtype, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int res, indegree, outdegree, *srcs, *dsts; MPI_Aint sndext, rcvext; NBC_Handle *handle; diff --git a/ompi/mca/coll/libnbc/nbc_ineighbor_alltoallw.c b/ompi/mca/coll/libnbc/nbc_ineighbor_alltoallw.c index 8bab6a0081..c434815c38 100644 --- a/ompi/mca/coll/libnbc/nbc_ineighbor_alltoallw.c +++ b/ompi/mca/coll/libnbc/nbc_ineighbor_alltoallw.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -41,7 +45,7 @@ int NBC_Ineighbor_alltoallw_args_compare(NBC_Ineighbor_alltoallw_args *a, NBC_In int ompi_coll_libnbc_ineighbor_alltoallw(const void *sbuf, const int *scounts, const MPI_Aint *sdisps, struct ompi_datatype_t * const *stypes, void *rbuf, const int *rcounts, const MPI_Aint *rdisps, struct ompi_datatype_t * const *rtypes, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int res, indegree, outdegree, *srcs, *dsts; NBC_Handle *handle; ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module; diff --git a/ompi/mca/coll/libnbc/nbc_ireduce.c b/ompi/mca/coll/libnbc/nbc_ireduce.c index 5b5cbc031a..377ebe0266 100644 --- a/ompi/mca/coll/libnbc/nbc_ireduce.c +++ b/ompi/mca/coll/libnbc/nbc_ireduce.c @@ -10,6 +10,9 @@ * Copyright (c) 2014-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -51,7 +54,7 @@ int NBC_Reduce_args_compare(NBC_Reduce_args *a, NBC_Reduce_args *b, void *param) /* the non-blocking reduce */ int ompi_coll_libnbc_ireduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res, segsize; size_t size; MPI_Aint ext; @@ -211,7 +214,7 @@ int ompi_coll_libnbc_ireduce(const void* sendbuf, void* recvbuf, int count, MPI_ int ompi_coll_libnbc_ireduce_inter(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int rank, res, rsize; NBC_Schedule *schedule; NBC_Handle *handle; diff --git a/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c b/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c index 58ce533419..ffc9506ec2 100644 --- a/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c +++ b/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c @@ -12,6 +12,10 @@ * Copyright (c) 2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -39,7 +43,7 @@ int ompi_coll_libnbc_ireduce_scatter(const void* sendbuf, void* recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int peer, rank, maxr, p, res, count; MPI_Aint ext; ptrdiff_t gap, span, span_align; @@ -205,7 +209,7 @@ int ompi_coll_libnbc_ireduce_scatter(const void* sendbuf, void* recvbuf, const i int ompi_coll_libnbc_ireduce_scatter_inter (const void* sendbuf, void* recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int rank, res, count, lsize, rsize; MPI_Aint ext; ptrdiff_t gap, span, span_align; diff --git a/ompi/mca/coll/libnbc/nbc_ireduce_scatter_block.c b/ompi/mca/coll/libnbc/nbc_ireduce_scatter_block.c index f05c9d5cb0..f3fb6213f4 100644 --- a/ompi/mca/coll/libnbc/nbc_ireduce_scatter_block.c +++ b/ompi/mca/coll/libnbc/nbc_ireduce_scatter_block.c @@ -10,6 +10,10 @@ * reserved. * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -37,7 +41,7 @@ int ompi_coll_libnbc_ireduce_scatter_block(const void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int peer, rank, maxr, p, res, count; MPI_Aint ext; ptrdiff_t gap, span; @@ -207,7 +211,7 @@ int ompi_coll_libnbc_ireduce_scatter_block(const void* sendbuf, void* recvbuf, i int ompi_coll_libnbc_ireduce_scatter_block_inter(const void *sendbuf, void *recvbuf, int rcount, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, - ompi_request_t **request, struct mca_coll_base_module_2_1_0_t *module) { + ompi_request_t **request, struct mca_coll_base_module_2_2_0_t *module) { int rank, res, count, lsize, rsize; MPI_Aint ext; ptrdiff_t gap, span, span_align; diff --git a/ompi/mca/coll/libnbc/nbc_iscan.c b/ompi/mca/coll/libnbc/nbc_iscan.c index 5b8b0bbdc1..f99404d2cc 100644 --- a/ompi/mca/coll/libnbc/nbc_iscan.c +++ b/ompi/mca/coll/libnbc/nbc_iscan.c @@ -9,6 +9,10 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -43,7 +47,7 @@ int NBC_Scan_args_compare(NBC_Scan_args *a, NBC_Scan_args *b, void *param) { */ int ompi_coll_libnbc_iscan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; ptrdiff_t gap, span; NBC_Schedule *schedule; diff --git a/ompi/mca/coll/libnbc/nbc_iscatter.c b/ompi/mca/coll/libnbc/nbc_iscatter.c index 9fc405e305..ecd887c090 100644 --- a/ompi/mca/coll/libnbc/nbc_iscatter.c +++ b/ompi/mca/coll/libnbc/nbc_iscatter.c @@ -12,6 +12,10 @@ * reserved. * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -43,7 +47,7 @@ int NBC_Scatter_args_compare(NBC_Scatter_args *a, NBC_Scatter_args *b, void *par int ompi_coll_libnbc_iscatter (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; MPI_Aint sndext = 0; NBC_Schedule *schedule; @@ -174,7 +178,7 @@ int ompi_coll_libnbc_iscatter (const void* sendbuf, int sendcount, MPI_Datatype int ompi_coll_libnbc_iscatter_inter (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int res, rsize; MPI_Aint sndext; NBC_Schedule *schedule; diff --git a/ompi/mca/coll/libnbc/nbc_iscatterv.c b/ompi/mca/coll/libnbc/nbc_iscatterv.c index 14ad8a5336..3772fc9014 100644 --- a/ompi/mca/coll/libnbc/nbc_iscatterv.c +++ b/ompi/mca/coll/libnbc/nbc_iscatterv.c @@ -12,6 +12,10 @@ * reserved. * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow * * Author(s): Torsten Hoefler * @@ -26,7 +30,7 @@ int ompi_coll_libnbc_iscatterv(const void* sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int rank, p, res; MPI_Aint sndext; NBC_Schedule *schedule; @@ -109,7 +113,7 @@ int ompi_coll_libnbc_iscatterv(const void* sendbuf, const int *sendcounts, const int ompi_coll_libnbc_iscatterv_inter (const void* sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, - struct mca_coll_base_module_2_1_0_t *module) { + struct mca_coll_base_module_2_2_0_t *module) { int res, rsize; MPI_Aint sndext; NBC_Schedule *schedule; diff --git a/ompi/mca/coll/portals4/coll_portals4.h b/ompi/mca/coll/portals4/coll_portals4.h index 3e898eab99..e1cbfc2bd7 100644 --- a/ompi/mca/coll/portals4/coll_portals4.h +++ b/ompi/mca/coll/portals4/coll_portals4.h @@ -5,6 +5,7 @@ * Copyright (c) 2015 Bull SAS. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -205,18 +206,18 @@ int ompi_coll_portals4_ireduce_intra(const void* sendbuf, void* recvbuf, int cou int root, struct ompi_communicator_t *comm, ompi_request_t ** ompi_request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_portals4_ireduce_intra_fini(struct ompi_coll_portals4_request_t *request); int ompi_coll_portals4_allreduce_intra(const void* sendbuf, void* recvbuf, int count, MPI_Datatype dtype, MPI_Op op, struct ompi_communicator_t *comm, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_portals4_iallreduce_intra(const void* sendbuf, void* recvbuf, int count, MPI_Datatype dtype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** ompi_request, - struct mca_coll_base_module_2_1_0_t *module); + struct mca_coll_base_module_2_2_0_t *module); int ompi_coll_portals4_iallreduce_intra_fini(struct ompi_coll_portals4_request_t *request); diff --git a/ompi/mca/coll/portals4/coll_portals4_allreduce.c b/ompi/mca/coll/portals4/coll_portals4_allreduce.c index e80c3b4985..935ce6cd9d 100644 --- a/ompi/mca/coll/portals4/coll_portals4_allreduce.c +++ b/ompi/mca/coll/portals4/coll_portals4_allreduce.c @@ -3,6 +3,7 @@ * Copyright (c) 2015 Bull SAS. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -359,7 +360,7 @@ allreduce_kary_tree_bottom(ompi_coll_portals4_request_t *request) int ompi_coll_portals4_allreduce_intra(const void* sendbuf, void* recvbuf, int count, MPI_Datatype dtype, MPI_Op op, struct ompi_communicator_t *comm, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { mca_coll_portals4_module_t *portals4_module = (mca_coll_portals4_module_t*) module; ompi_coll_portals4_request_t *request; @@ -389,7 +390,7 @@ int ompi_coll_portals4_iallreduce_intra(const void* sendbuf, void* recvbuf, int MPI_Datatype dtype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** ompi_request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { mca_coll_portals4_module_t *portals4_module = (mca_coll_portals4_module_t*) module; ompi_coll_portals4_request_t *request; diff --git a/ompi/mca/coll/portals4/coll_portals4_barrier.c b/ompi/mca/coll/portals4/coll_portals4_barrier.c index c3bc6a460d..9d5c4f3c16 100644 --- a/ompi/mca/coll/portals4/coll_portals4_barrier.c +++ b/ompi/mca/coll/portals4/coll_portals4_barrier.c @@ -3,6 +3,7 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Bull SAS. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -268,7 +269,7 @@ ompi_coll_portals4_barrier_intra(struct ompi_communicator_t *comm, int ompi_coll_portals4_ibarrier_intra(struct ompi_communicator_t *comm, ompi_request_t **ompi_req, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int ret; mca_coll_portals4_module_t *portals4_module = (mca_coll_portals4_module_t*) module; diff --git a/ompi/mca/coll/portals4/coll_portals4_reduce.c b/ompi/mca/coll/portals4/coll_portals4_reduce.c index 5f41e75655..1a55a5c3f7 100644 --- a/ompi/mca/coll/portals4/coll_portals4_reduce.c +++ b/ompi/mca/coll/portals4/coll_portals4_reduce.c @@ -3,6 +3,7 @@ * Copyright (c) 2015 Bull SAS. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -401,7 +402,7 @@ ompi_coll_portals4_ireduce_intra(const void* sendbuf, void* recvbuf, int count, int root, struct ompi_communicator_t *comm, ompi_request_t ** ompi_request, - struct mca_coll_base_module_2_1_0_t *module) + struct mca_coll_base_module_2_2_0_t *module) { int ret; mca_coll_portals4_module_t *portals4_module = (mca_coll_portals4_module_t*) module; diff --git a/ompi/mca/coll/self/coll_self_module.c b/ompi/mca/coll/self/coll_self_module.c index bda707d180..1d81fecbf1 100644 --- a/ompi/mca/coll/self/coll_self_module.c +++ b/ompi/mca/coll/self/coll_self_module.c @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -25,6 +26,7 @@ #include "ompi/communicator/communicator.h" #include "ompi/mca/coll/coll.h" #include "ompi/mca/coll/base/base.h" +#include "ompi/mca/coll/base/coll_base_functions.h" #include "coll_self.h" @@ -79,6 +81,8 @@ mca_coll_self_comm_query(struct ompi_communicator_t *comm, module->super.coll_scatter = mca_coll_self_scatter_intra; module->super.coll_scatterv = mca_coll_self_scatterv_intra; + module->super.coll_reduce_local = mca_coll_base_reduce_local; + return &(module->super); } diff --git a/ompi/mpi/c/reduce_local.c b/ompi/mpi/c/reduce_local.c index 1c31f70083..5581ac8baf 100644 --- a/ompi/mpi/c/reduce_local.c +++ b/ompi/mpi/c/reduce_local.c @@ -15,6 +15,7 @@ * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -45,13 +46,15 @@ static const char FUNC_NAME[] = "MPI_Reduce_local"; int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op) { + int err; + MEMCHECKER( memchecker_datatype(datatype); ); if (MPI_PARAM_CHECK) { char *msg; - int err = MPI_SUCCESS; + err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (MPI_OP_NULL == op || NULL == op) { @@ -75,9 +78,14 @@ int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, /* Invoke the op component to perform the back-end operation */ OBJ_RETAIN(op); - /* XXX -- CONST -- do not cast away const -- update mca/coll */ - ompi_op_reduce(op,(void *) inbuf, inoutbuf, count, datatype); + OBJ_RETAIN(datatype); + // Since there is no 'comm' parameter to this interface use 'self' since + // this is a local operation to this process. + ompi_communicator_t *comm = &ompi_mpi_comm_self.comm; + err = comm->c_coll.coll_reduce_local(inbuf, inoutbuf, count, datatype, op, + comm->c_coll.coll_reduce_local_module); + OBJ_RELEASE(datatype); OBJ_RELEASE(op); - return MPI_SUCCESS; + OMPI_ERRHANDLER_RETURN(err, MPI_COMM_WORLD, err, FUNC_NAME); }