Merge pull request #4618 from ggouaillardet/topic/pcoll
Add the persistent collectives feature
Этот коммит содержится в:
Коммит
a8da78eeaa
2
.gitignore
поставляемый
2
.gitignore
поставляемый
@ -250,6 +250,8 @@ ompi/mpiext/example/tests/progress_usempif08
|
||||
ompi/mpiext/cuda/c/MPIX_Query_cuda_support.3
|
||||
ompi/mpiext/cuda/c/mpiext_cuda_c.h
|
||||
|
||||
ompi/mpiext/pcollreq/c/MPIX_*.3
|
||||
|
||||
ompi/tools/mpisync/mpisync
|
||||
ompi/tools/mpisync/mpirun_prof
|
||||
ompi/tools/mpisync/ompi_timing_post
|
||||
|
8
README
8
README
@ -717,6 +717,14 @@ Open MPI Extensions
|
||||
|
||||
- The following extensions are included in this version of Open MPI:
|
||||
|
||||
- pcollreq: Provides routines for persistent collective
|
||||
communication operations and persistent neighborhood collective
|
||||
communication operations, which are proposed in the MPI Forum as
|
||||
of June 2018. The function names are prefixed with MPIX_ instead
|
||||
of MPI_, like MPIX_Barrier_init, because they are not standardized
|
||||
yet. Future versions of Open MPI will switch to the MPI_ prefix
|
||||
once the MPI Standard which includes this feature is published.
|
||||
See their man page for more details.
|
||||
- affinity: Provides the OMPI_Affinity_str() routine on retrieving
|
||||
a string that contains what resources a process is bound to. See
|
||||
its man page for more details.
|
||||
|
@ -20,6 +20,7 @@
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -52,7 +53,7 @@ struct avail_coll_t {
|
||||
opal_list_item_t super;
|
||||
|
||||
int ac_priority;
|
||||
mca_coll_base_module_2_2_0_t *ac_module;
|
||||
mca_coll_base_module_2_3_0_t *ac_module;
|
||||
const char * ac_component_name;
|
||||
};
|
||||
typedef struct avail_coll_t avail_coll_t;
|
||||
@ -65,16 +66,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_2_0_t ** module);
|
||||
mca_coll_base_module_2_3_0_t ** module);
|
||||
|
||||
static int query(const mca_base_component_t * component,
|
||||
ompi_communicator_t * comm, int *priority,
|
||||
mca_coll_base_module_2_2_0_t ** module);
|
||||
mca_coll_base_module_2_3_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_2_0_t ** module);
|
||||
mca_coll_base_module_2_3_0_t ** module);
|
||||
|
||||
/*
|
||||
* Stuff for the OBJ interface
|
||||
@ -190,6 +191,24 @@ int mca_coll_base_comm_select(ompi_communicator_t * comm)
|
||||
COPY(avail->ac_module, comm, iscatter);
|
||||
COPY(avail->ac_module, comm, iscatterv);
|
||||
|
||||
COPY(avail->ac_module, comm, allgather_init);
|
||||
COPY(avail->ac_module, comm, allgatherv_init);
|
||||
COPY(avail->ac_module, comm, allreduce_init);
|
||||
COPY(avail->ac_module, comm, alltoall_init);
|
||||
COPY(avail->ac_module, comm, alltoallv_init);
|
||||
COPY(avail->ac_module, comm, alltoallw_init);
|
||||
COPY(avail->ac_module, comm, barrier_init);
|
||||
COPY(avail->ac_module, comm, bcast_init);
|
||||
COPY(avail->ac_module, comm, exscan_init);
|
||||
COPY(avail->ac_module, comm, gather_init);
|
||||
COPY(avail->ac_module, comm, gatherv_init);
|
||||
COPY(avail->ac_module, comm, reduce_init);
|
||||
COPY(avail->ac_module, comm, reduce_scatter_block_init);
|
||||
COPY(avail->ac_module, comm, reduce_scatter_init);
|
||||
COPY(avail->ac_module, comm, scan_init);
|
||||
COPY(avail->ac_module, comm, scatter_init);
|
||||
COPY(avail->ac_module, comm, scatterv_init);
|
||||
|
||||
/* We can not reliably check if this comm has a topology
|
||||
* at this time. The flags are set *after* coll_select */
|
||||
COPY(avail->ac_module, comm, neighbor_allgather);
|
||||
@ -204,6 +223,12 @@ int mca_coll_base_comm_select(ompi_communicator_t * comm)
|
||||
COPY(avail->ac_module, comm, ineighbor_alltoallv);
|
||||
COPY(avail->ac_module, comm, ineighbor_alltoallw);
|
||||
|
||||
COPY(avail->ac_module, comm, neighbor_allgather_init);
|
||||
COPY(avail->ac_module, comm, neighbor_allgatherv_init);
|
||||
COPY(avail->ac_module, comm, neighbor_alltoall_init);
|
||||
COPY(avail->ac_module, comm, neighbor_alltoallv_init);
|
||||
COPY(avail->ac_module, comm, neighbor_alltoallw_init);
|
||||
|
||||
COPY(avail->ac_module, comm, reduce_local);
|
||||
}
|
||||
/* release the original module reference and the list item */
|
||||
@ -249,6 +274,23 @@ int mca_coll_base_comm_select(ompi_communicator_t * comm)
|
||||
((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, allgather_init) ||
|
||||
CHECK_NULL(which_func, comm, allgatherv_init) ||
|
||||
CHECK_NULL(which_func, comm, allreduce_init) ||
|
||||
CHECK_NULL(which_func, comm, alltoall_init) ||
|
||||
CHECK_NULL(which_func, comm, alltoallv_init) ||
|
||||
CHECK_NULL(which_func, comm, alltoallw_init) ||
|
||||
CHECK_NULL(which_func, comm, barrier_init) ||
|
||||
CHECK_NULL(which_func, comm, bcast_init) ||
|
||||
((OMPI_COMM_IS_INTRA(comm)) && CHECK_NULL(which_func, comm, exscan_init)) ||
|
||||
CHECK_NULL(which_func, comm, gather_init) ||
|
||||
CHECK_NULL(which_func, comm, gatherv_init) ||
|
||||
CHECK_NULL(which_func, comm, reduce_init) ||
|
||||
CHECK_NULL(which_func, comm, reduce_scatter_block_init) ||
|
||||
CHECK_NULL(which_func, comm, reduce_scatter_init) ||
|
||||
((OMPI_COMM_IS_INTRA(comm)) && CHECK_NULL(which_func, comm, scan_init)) ||
|
||||
CHECK_NULL(which_func, comm, scatter_init) ||
|
||||
CHECK_NULL(which_func, comm, scatterv_init) ||
|
||||
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. */
|
||||
@ -288,7 +330,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_2_0_t *module;
|
||||
mca_coll_base_module_2_3_0_t *module;
|
||||
opal_list_t *selectable;
|
||||
avail_coll_t *avail;
|
||||
|
||||
@ -344,7 +386,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_2_0_t ** module)
|
||||
mca_coll_base_module_2_3_0_t ** module)
|
||||
{
|
||||
int err;
|
||||
int priority = -1;
|
||||
@ -378,7 +420,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_2_0_t ** module)
|
||||
int *priority, mca_coll_base_module_2_3_0_t ** module)
|
||||
{
|
||||
*module = NULL;
|
||||
if (2 == component->mca_type_major_version &&
|
||||
@ -398,9 +440,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_2_0_t ** module)
|
||||
mca_coll_base_module_2_3_0_t ** module)
|
||||
{
|
||||
mca_coll_base_module_2_2_0_t *ret;
|
||||
mca_coll_base_module_2_3_0_t *ret;
|
||||
|
||||
/* There's currently no need for conversion */
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -85,6 +86,24 @@ int mca_coll_base_comm_unselect(ompi_communicator_t * comm)
|
||||
CLOSE(comm, iscatter);
|
||||
CLOSE(comm, iscatterv);
|
||||
|
||||
CLOSE(comm, allgather_init);
|
||||
CLOSE(comm, allgatherv_init);
|
||||
CLOSE(comm, allreduce_init);
|
||||
CLOSE(comm, alltoall_init);
|
||||
CLOSE(comm, alltoallv_init);
|
||||
CLOSE(comm, alltoallw_init);
|
||||
CLOSE(comm, barrier_init);
|
||||
CLOSE(comm, bcast_init);
|
||||
CLOSE(comm, exscan_init);
|
||||
CLOSE(comm, gather_init);
|
||||
CLOSE(comm, gatherv_init);
|
||||
CLOSE(comm, reduce_init);
|
||||
CLOSE(comm, reduce_scatter_block_init);
|
||||
CLOSE(comm, reduce_scatter_init);
|
||||
CLOSE(comm, scan_init);
|
||||
CLOSE(comm, scatter_init);
|
||||
CLOSE(comm, scatterv_init);
|
||||
|
||||
CLOSE(comm, neighbor_allgather);
|
||||
CLOSE(comm, neighbor_allgatherv);
|
||||
CLOSE(comm, neighbor_alltoall);
|
||||
@ -97,6 +116,12 @@ int mca_coll_base_comm_unselect(ompi_communicator_t * comm)
|
||||
CLOSE(comm, ineighbor_alltoallv);
|
||||
CLOSE(comm, ineighbor_alltoallw);
|
||||
|
||||
CLOSE(comm, neighbor_allgather_init);
|
||||
CLOSE(comm, neighbor_allgatherv_init);
|
||||
CLOSE(comm, neighbor_alltoall_init);
|
||||
CLOSE(comm, neighbor_alltoallv_init);
|
||||
CLOSE(comm, neighbor_alltoallw_init);
|
||||
|
||||
CLOSE(comm, reduce_local);
|
||||
|
||||
free(comm->c_coll);
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "ompi/mca/coll/base/base.h"
|
||||
#include "ompi/mca/mca.h"
|
||||
#include "ompi/mca/coll/coll.h"
|
||||
#include "ompi/info/info.h"
|
||||
#include "ompi/request/request.h"
|
||||
|
||||
/* need to include our own topo prototypes so we can malloc data on the comm correctly */
|
||||
@ -135,6 +136,29 @@ typedef enum COLLTYPE {
|
||||
#define INEIGHBOR_ALLTOALLV_ARGS NEIGHBOR_ALLTOALLV_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define INEIGHBOR_ALLTOALLW_ARGS NEIGHBOR_ALLTOALLW_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
|
||||
#define ALLGATHER_INIT_ARGS ALLGATHER_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define ALLGATHERV_INIT_ARGS ALLGATHERV_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define ALLREDUCE_INIT_ARGS ALLREDUCE_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define ALLTOALL_INIT_ARGS ALLTOALL_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define ALLTOALLV_INIT_ARGS ALLTOALLV_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define ALLTOALLW_INIT_ARGS ALLTOALLW_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define BARRIER_INIT_ARGS BARRIER_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define BCAST_INIT_ARGS BCAST_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define EXSCAN_INIT_ARGS EXSCAN_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define GATHER_INIT_ARGS GATHER_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define GATHERV_INIT_ARGS GATHERV_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define REDUCE_INIT_ARGS REDUCE_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define REDUCESCATTER_INIT_ARGS REDUCESCATTER_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define REDUCESCATTERBLOCK_INIT_ARGS REDUCESCATTERBLOCK_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define SCAN_INIT_ARGS SCAN_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define SCATTER_INIT_ARGS SCATTER_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define SCATTERV_INIT_ARGS SCATTERV_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define NEIGHBOR_ALLGATHER_INIT_ARGS NEIGHBOR_ALLGATHER_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define NEIGHBOR_ALLGATHERV_INIT_ARGS NEIGHBOR_ALLGATHERV_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define NEIGHBOR_ALLTOALL_INIT_ARGS NEIGHBOR_ALLTOALL_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define NEIGHBOR_ALLTOALLV_INIT_ARGS NEIGHBOR_ALLTOALLV_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
#define NEIGHBOR_ALLTOALLW_INIT_ARGS NEIGHBOR_ALLTOALLW_BASE_ARGS, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module
|
||||
|
||||
#define ALLGATHER_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm
|
||||
#define ALLGATHERV_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm
|
||||
#define ALLREDUCE_BASE_ARG_NAMES sendbuf, recvbuf, count, datatype, op, comm
|
||||
|
@ -18,6 +18,7 @@
|
||||
* 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 (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -137,7 +138,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_2_0_t *
|
||||
typedef struct mca_coll_base_module_2_3_0_t *
|
||||
(*mca_coll_base_component_comm_query_2_0_0_fn_t)
|
||||
(struct ompi_communicator_t *comm, int *priority);
|
||||
|
||||
@ -177,7 +178,7 @@ typedef struct mca_coll_base_module_2_2_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_2_0_t* module,
|
||||
(*mca_coll_base_module_enable_1_1_0_fn_t)(struct mca_coll_base_module_2_3_0_t* module,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
|
||||
@ -192,147 +193,225 @@ typedef int
|
||||
* @param[in] comm Communicator being disabled
|
||||
*/
|
||||
typedef int
|
||||
(*mca_coll_base_module_disable_1_2_0_fn_t)(struct mca_coll_base_module_2_2_0_t* module,
|
||||
(*mca_coll_base_module_disable_1_2_0_fn_t)(struct mca_coll_base_module_2_3_0_t* module,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
|
||||
/* blocking collectives */
|
||||
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_2_0_t *module);
|
||||
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_barrier_fn_t)
|
||||
(struct ompi_communicator_t *comm, struct mca_coll_base_module_2_2_0_t *module);
|
||||
(struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
ompi_request_t ** request, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
|
||||
/* persistent collectives */
|
||||
typedef int (*mca_coll_base_module_allgather_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_allgatherv_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_allreduce_init_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 ompi_info_t *info,
|
||||
ompi_request_t ** request, struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_alltoall_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_alltoallv_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_alltoallw_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_barrier_init_fn_t)
|
||||
(struct ompi_communicator_t *comm, struct ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_bcast_init_fn_t)
|
||||
(void *buff, int count, struct ompi_datatype_t *datatype, int root,
|
||||
struct ompi_communicator_t *comm, struct ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_exscan_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_gather_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_gatherv_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_reduce_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_reduce_scatter_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_reduce_scatter_block_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_scan_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_scatter_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_scatterv_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
|
||||
/*
|
||||
* The signature of the neighborhood alltoallw differs from alltoallw
|
||||
@ -340,12 +419,17 @@ 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_2_0_t *module);
|
||||
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
typedef int (*mca_coll_base_module_neighbor_alltoallw_init_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 ompi_info_t *info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
|
||||
/*
|
||||
* reduce_local
|
||||
@ -356,7 +440,7 @@ typedef int (*mca_coll_base_module_ineighbor_alltoallw_fn_t)
|
||||
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);
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
|
||||
|
||||
/**
|
||||
@ -417,7 +501,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_2_0_t {
|
||||
struct mca_coll_base_module_2_3_0_t {
|
||||
/** Collective modules all inherit from opal_object */
|
||||
opal_object_t super;
|
||||
|
||||
@ -426,6 +510,7 @@ struct mca_coll_base_module_2_2_0_t {
|
||||
mca_coll_base_module_enable_1_1_0_fn_t coll_module_enable;
|
||||
|
||||
/* Collective function pointers */
|
||||
|
||||
/* blocking functions */
|
||||
mca_coll_base_module_allgather_fn_t coll_allgather;
|
||||
mca_coll_base_module_allgatherv_fn_t coll_allgatherv;
|
||||
@ -444,6 +529,7 @@ struct mca_coll_base_module_2_2_0_t {
|
||||
mca_coll_base_module_scan_fn_t coll_scan;
|
||||
mca_coll_base_module_scatter_fn_t coll_scatter;
|
||||
mca_coll_base_module_scatterv_fn_t coll_scatterv;
|
||||
|
||||
/* nonblocking functions */
|
||||
mca_coll_base_module_iallgather_fn_t coll_iallgather;
|
||||
mca_coll_base_module_iallgatherv_fn_t coll_iallgatherv;
|
||||
@ -463,6 +549,25 @@ struct mca_coll_base_module_2_2_0_t {
|
||||
mca_coll_base_module_iscatter_fn_t coll_iscatter;
|
||||
mca_coll_base_module_iscatterv_fn_t coll_iscatterv;
|
||||
|
||||
/* persistent functions */
|
||||
mca_coll_base_module_allgather_init_fn_t coll_allgather_init;
|
||||
mca_coll_base_module_allgatherv_init_fn_t coll_allgatherv_init;
|
||||
mca_coll_base_module_allreduce_init_fn_t coll_allreduce_init;
|
||||
mca_coll_base_module_alltoall_init_fn_t coll_alltoall_init;
|
||||
mca_coll_base_module_alltoallv_init_fn_t coll_alltoallv_init;
|
||||
mca_coll_base_module_alltoallw_init_fn_t coll_alltoallw_init;
|
||||
mca_coll_base_module_barrier_init_fn_t coll_barrier_init;
|
||||
mca_coll_base_module_bcast_init_fn_t coll_bcast_init;
|
||||
mca_coll_base_module_exscan_init_fn_t coll_exscan_init;
|
||||
mca_coll_base_module_gather_init_fn_t coll_gather_init;
|
||||
mca_coll_base_module_gatherv_init_fn_t coll_gatherv_init;
|
||||
mca_coll_base_module_reduce_init_fn_t coll_reduce_init;
|
||||
mca_coll_base_module_reduce_scatter_init_fn_t coll_reduce_scatter_init;
|
||||
mca_coll_base_module_reduce_scatter_block_init_fn_t coll_reduce_scatter_block_init;
|
||||
mca_coll_base_module_scan_init_fn_t coll_scan_init;
|
||||
mca_coll_base_module_scatter_init_fn_t coll_scatter_init;
|
||||
mca_coll_base_module_scatterv_init_fn_t coll_scatterv_init;
|
||||
|
||||
/* neighborhood functions */
|
||||
mca_coll_base_module_allgather_fn_t coll_neighbor_allgather;
|
||||
mca_coll_base_module_allgatherv_fn_t coll_neighbor_allgatherv;
|
||||
@ -470,12 +575,20 @@ struct mca_coll_base_module_2_2_0_t {
|
||||
mca_coll_base_module_alltoallv_fn_t coll_neighbor_alltoallv;
|
||||
mca_coll_base_module_neighbor_alltoallw_fn_t coll_neighbor_alltoallw;
|
||||
|
||||
/* nonblocking neighborhood functions */
|
||||
mca_coll_base_module_iallgather_fn_t coll_ineighbor_allgather;
|
||||
mca_coll_base_module_iallgatherv_fn_t coll_ineighbor_allgatherv;
|
||||
mca_coll_base_module_ialltoall_fn_t coll_ineighbor_alltoall;
|
||||
mca_coll_base_module_ialltoallv_fn_t coll_ineighbor_alltoallv;
|
||||
mca_coll_base_module_ineighbor_alltoallw_fn_t coll_ineighbor_alltoallw;
|
||||
|
||||
/* persistent neighborhood functions */
|
||||
mca_coll_base_module_allgather_init_fn_t coll_neighbor_allgather_init;
|
||||
mca_coll_base_module_allgatherv_init_fn_t coll_neighbor_allgatherv_init;
|
||||
mca_coll_base_module_alltoall_init_fn_t coll_neighbor_alltoall_init;
|
||||
mca_coll_base_module_alltoallv_init_fn_t coll_neighbor_alltoallv_init;
|
||||
mca_coll_base_module_neighbor_alltoallw_init_fn_t coll_neighbor_alltoallw_init;
|
||||
|
||||
/** Fault tolerance event trigger function */
|
||||
mca_coll_base_module_ft_event_fn_t ft_event;
|
||||
|
||||
@ -489,12 +602,12 @@ struct mca_coll_base_module_2_2_0_t {
|
||||
not be used by other modules */
|
||||
struct mca_coll_base_comm_t* base_data;
|
||||
};
|
||||
typedef struct mca_coll_base_module_2_2_0_t mca_coll_base_module_2_2_0_t;
|
||||
typedef struct mca_coll_base_module_2_3_0_t mca_coll_base_module_2_3_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_2_0_t mca_coll_base_module_t;
|
||||
typedef struct mca_coll_base_module_2_3_0_t mca_coll_base_module_t;
|
||||
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_coll_base_module_t);
|
||||
|
||||
/**
|
||||
@ -507,101 +620,153 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_coll_base_module_t);
|
||||
* component.
|
||||
*/
|
||||
struct mca_coll_base_comm_coll_t {
|
||||
|
||||
/* blocking collectives */
|
||||
mca_coll_base_module_allgather_fn_t coll_allgather;
|
||||
mca_coll_base_module_2_2_0_t *coll_allgather_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_allgather_module;
|
||||
mca_coll_base_module_allgatherv_fn_t coll_allgatherv;
|
||||
mca_coll_base_module_2_2_0_t *coll_allgatherv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_allgatherv_module;
|
||||
mca_coll_base_module_allreduce_fn_t coll_allreduce;
|
||||
mca_coll_base_module_2_2_0_t *coll_allreduce_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_allreduce_module;
|
||||
mca_coll_base_module_alltoall_fn_t coll_alltoall;
|
||||
mca_coll_base_module_2_2_0_t *coll_alltoall_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_alltoall_module;
|
||||
mca_coll_base_module_alltoallv_fn_t coll_alltoallv;
|
||||
mca_coll_base_module_2_2_0_t *coll_alltoallv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_alltoallv_module;
|
||||
mca_coll_base_module_alltoallw_fn_t coll_alltoallw;
|
||||
mca_coll_base_module_2_2_0_t *coll_alltoallw_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_alltoallw_module;
|
||||
mca_coll_base_module_barrier_fn_t coll_barrier;
|
||||
mca_coll_base_module_2_2_0_t *coll_barrier_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_barrier_module;
|
||||
mca_coll_base_module_bcast_fn_t coll_bcast;
|
||||
mca_coll_base_module_2_2_0_t *coll_bcast_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_bcast_module;
|
||||
mca_coll_base_module_exscan_fn_t coll_exscan;
|
||||
mca_coll_base_module_2_2_0_t *coll_exscan_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_exscan_module;
|
||||
mca_coll_base_module_gather_fn_t coll_gather;
|
||||
mca_coll_base_module_2_2_0_t *coll_gather_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_gather_module;
|
||||
mca_coll_base_module_gatherv_fn_t coll_gatherv;
|
||||
mca_coll_base_module_2_2_0_t *coll_gatherv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_gatherv_module;
|
||||
mca_coll_base_module_reduce_fn_t coll_reduce;
|
||||
mca_coll_base_module_2_2_0_t *coll_reduce_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_reduce_module;
|
||||
mca_coll_base_module_reduce_scatter_fn_t coll_reduce_scatter;
|
||||
mca_coll_base_module_2_2_0_t *coll_reduce_scatter_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_reduce_scatter_module;
|
||||
mca_coll_base_module_reduce_scatter_block_fn_t coll_reduce_scatter_block;
|
||||
mca_coll_base_module_2_2_0_t *coll_reduce_scatter_block_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_reduce_scatter_block_module;
|
||||
mca_coll_base_module_scan_fn_t coll_scan;
|
||||
mca_coll_base_module_2_2_0_t *coll_scan_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_scan_module;
|
||||
mca_coll_base_module_scatter_fn_t coll_scatter;
|
||||
mca_coll_base_module_2_2_0_t *coll_scatter_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_scatter_module;
|
||||
mca_coll_base_module_scatterv_fn_t coll_scatterv;
|
||||
mca_coll_base_module_2_2_0_t *coll_scatterv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_scatterv_module;
|
||||
|
||||
/* nonblocking collectives */
|
||||
mca_coll_base_module_iallgather_fn_t coll_iallgather;
|
||||
mca_coll_base_module_2_2_0_t *coll_iallgather_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_iallgather_module;
|
||||
mca_coll_base_module_iallgatherv_fn_t coll_iallgatherv;
|
||||
mca_coll_base_module_2_2_0_t *coll_iallgatherv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_iallgatherv_module;
|
||||
mca_coll_base_module_iallreduce_fn_t coll_iallreduce;
|
||||
mca_coll_base_module_2_2_0_t *coll_iallreduce_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_iallreduce_module;
|
||||
mca_coll_base_module_ialltoall_fn_t coll_ialltoall;
|
||||
mca_coll_base_module_2_2_0_t *coll_ialltoall_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ialltoall_module;
|
||||
mca_coll_base_module_ialltoallv_fn_t coll_ialltoallv;
|
||||
mca_coll_base_module_2_2_0_t *coll_ialltoallv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ialltoallv_module;
|
||||
mca_coll_base_module_ialltoallw_fn_t coll_ialltoallw;
|
||||
mca_coll_base_module_2_2_0_t *coll_ialltoallw_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ialltoallw_module;
|
||||
mca_coll_base_module_ibarrier_fn_t coll_ibarrier;
|
||||
mca_coll_base_module_2_2_0_t *coll_ibarrier_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ibarrier_module;
|
||||
mca_coll_base_module_ibcast_fn_t coll_ibcast;
|
||||
mca_coll_base_module_2_2_0_t *coll_ibcast_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ibcast_module;
|
||||
mca_coll_base_module_iexscan_fn_t coll_iexscan;
|
||||
mca_coll_base_module_2_2_0_t *coll_iexscan_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_iexscan_module;
|
||||
mca_coll_base_module_igather_fn_t coll_igather;
|
||||
mca_coll_base_module_2_2_0_t *coll_igather_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_igather_module;
|
||||
mca_coll_base_module_igatherv_fn_t coll_igatherv;
|
||||
mca_coll_base_module_2_2_0_t *coll_igatherv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_igatherv_module;
|
||||
mca_coll_base_module_ireduce_fn_t coll_ireduce;
|
||||
mca_coll_base_module_2_2_0_t *coll_ireduce_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ireduce_module;
|
||||
mca_coll_base_module_ireduce_scatter_fn_t coll_ireduce_scatter;
|
||||
mca_coll_base_module_2_2_0_t *coll_ireduce_scatter_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ireduce_scatter_module;
|
||||
mca_coll_base_module_ireduce_scatter_block_fn_t coll_ireduce_scatter_block;
|
||||
mca_coll_base_module_2_2_0_t *coll_ireduce_scatter_block_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ireduce_scatter_block_module;
|
||||
mca_coll_base_module_iscan_fn_t coll_iscan;
|
||||
mca_coll_base_module_2_2_0_t *coll_iscan_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_iscan_module;
|
||||
mca_coll_base_module_iscatter_fn_t coll_iscatter;
|
||||
mca_coll_base_module_2_2_0_t *coll_iscatter_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_iscatter_module;
|
||||
mca_coll_base_module_iscatterv_fn_t coll_iscatterv;
|
||||
mca_coll_base_module_2_2_0_t *coll_iscatterv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_iscatterv_module;
|
||||
|
||||
/* neighborhood collectives */
|
||||
/* persistent collectives */
|
||||
mca_coll_base_module_allgather_init_fn_t coll_allgather_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_allgather_init_module;
|
||||
mca_coll_base_module_allgatherv_init_fn_t coll_allgatherv_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_allgatherv_init_module;
|
||||
mca_coll_base_module_allreduce_init_fn_t coll_allreduce_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_allreduce_init_module;
|
||||
mca_coll_base_module_alltoall_init_fn_t coll_alltoall_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_alltoall_init_module;
|
||||
mca_coll_base_module_alltoallv_init_fn_t coll_alltoallv_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_alltoallv_init_module;
|
||||
mca_coll_base_module_alltoallw_init_fn_t coll_alltoallw_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_alltoallw_init_module;
|
||||
mca_coll_base_module_barrier_init_fn_t coll_barrier_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_barrier_init_module;
|
||||
mca_coll_base_module_bcast_init_fn_t coll_bcast_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_bcast_init_module;
|
||||
mca_coll_base_module_exscan_init_fn_t coll_exscan_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_exscan_init_module;
|
||||
mca_coll_base_module_gather_init_fn_t coll_gather_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_gather_init_module;
|
||||
mca_coll_base_module_gatherv_init_fn_t coll_gatherv_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_gatherv_init_module;
|
||||
mca_coll_base_module_reduce_init_fn_t coll_reduce_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_reduce_init_module;
|
||||
mca_coll_base_module_reduce_scatter_init_fn_t coll_reduce_scatter_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_reduce_scatter_init_module;
|
||||
mca_coll_base_module_reduce_scatter_block_init_fn_t coll_reduce_scatter_block_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_reduce_scatter_block_init_module;
|
||||
mca_coll_base_module_scan_init_fn_t coll_scan_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_scan_init_module;
|
||||
mca_coll_base_module_scatter_init_fn_t coll_scatter_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_scatter_init_module;
|
||||
mca_coll_base_module_scatterv_init_fn_t coll_scatterv_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_scatterv_init_module;
|
||||
|
||||
/* blocking neighborhood collectives */
|
||||
mca_coll_base_module_allgather_fn_t coll_neighbor_allgather;
|
||||
mca_coll_base_module_2_2_0_t *coll_neighbor_allgather_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_allgather_module;
|
||||
mca_coll_base_module_allgatherv_fn_t coll_neighbor_allgatherv;
|
||||
mca_coll_base_module_2_2_0_t *coll_neighbor_allgatherv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_allgatherv_module;
|
||||
mca_coll_base_module_alltoall_fn_t coll_neighbor_alltoall;
|
||||
mca_coll_base_module_2_2_0_t *coll_neighbor_alltoall_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_alltoall_module;
|
||||
mca_coll_base_module_alltoallv_fn_t coll_neighbor_alltoallv;
|
||||
mca_coll_base_module_2_2_0_t *coll_neighbor_alltoallv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_alltoallv_module;
|
||||
mca_coll_base_module_neighbor_alltoallw_fn_t coll_neighbor_alltoallw;
|
||||
mca_coll_base_module_2_2_0_t *coll_neighbor_alltoallw_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_alltoallw_module;
|
||||
|
||||
/* nonblocking neighborhood collectives */
|
||||
mca_coll_base_module_iallgather_fn_t coll_ineighbor_allgather;
|
||||
mca_coll_base_module_2_2_0_t *coll_ineighbor_allgather_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ineighbor_allgather_module;
|
||||
mca_coll_base_module_iallgatherv_fn_t coll_ineighbor_allgatherv;
|
||||
mca_coll_base_module_2_2_0_t *coll_ineighbor_allgatherv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ineighbor_allgatherv_module;
|
||||
mca_coll_base_module_ialltoall_fn_t coll_ineighbor_alltoall;
|
||||
mca_coll_base_module_2_2_0_t *coll_ineighbor_alltoall_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ineighbor_alltoall_module;
|
||||
mca_coll_base_module_ialltoallv_fn_t coll_ineighbor_alltoallv;
|
||||
mca_coll_base_module_2_2_0_t *coll_ineighbor_alltoallv_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ineighbor_alltoallv_module;
|
||||
mca_coll_base_module_ineighbor_alltoallw_fn_t coll_ineighbor_alltoallw;
|
||||
mca_coll_base_module_2_2_0_t *coll_ineighbor_alltoallw_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_ineighbor_alltoallw_module;
|
||||
|
||||
/* persistent neighborhood collectives */
|
||||
mca_coll_base_module_allgather_init_fn_t coll_neighbor_allgather_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_allgather_init_module;
|
||||
mca_coll_base_module_allgatherv_init_fn_t coll_neighbor_allgatherv_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_allgatherv_init_module;
|
||||
mca_coll_base_module_alltoall_init_fn_t coll_neighbor_alltoall_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_alltoall_init_module;
|
||||
mca_coll_base_module_alltoallv_init_fn_t coll_neighbor_alltoallv_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_alltoallv_init_module;
|
||||
mca_coll_base_module_neighbor_alltoallw_init_fn_t coll_neighbor_alltoallw_init;
|
||||
mca_coll_base_module_2_3_0_t *coll_neighbor_alltoallw_init_module;
|
||||
|
||||
mca_coll_base_module_reduce_local_fn_t coll_reduce_local;
|
||||
mca_coll_base_module_2_2_0_t *coll_reduce_local_module;
|
||||
mca_coll_base_module_2_3_0_t *coll_reduce_local_module;
|
||||
};
|
||||
typedef struct mca_coll_base_comm_coll_t mca_coll_base_comm_coll_t;
|
||||
|
||||
|
@ -13,9 +13,10 @@
|
||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -116,6 +117,7 @@ struct ompi_coll_libnbc_request_t {
|
||||
ompi_request_t super;
|
||||
MPI_Comm comm;
|
||||
long row_offset;
|
||||
bool nbc_complete; /* status in libnbc level */
|
||||
int tag;
|
||||
volatile int req_count;
|
||||
ompi_request_t **req_array;
|
||||
@ -131,15 +133,13 @@ OBJ_CLASS_DECLARATION(ompi_coll_libnbc_request_t);
|
||||
typedef ompi_coll_libnbc_request_t NBC_Handle;
|
||||
|
||||
|
||||
#define OMPI_COLL_LIBNBC_REQUEST_ALLOC(comm, req) \
|
||||
#define OMPI_COLL_LIBNBC_REQUEST_ALLOC(comm, persistent, req) \
|
||||
do { \
|
||||
opal_free_list_item_t *item; \
|
||||
item = opal_free_list_wait (&mca_coll_libnbc_component.requests); \
|
||||
req = (ompi_coll_libnbc_request_t*) item; \
|
||||
OMPI_REQUEST_INIT(&req->super, false); \
|
||||
OMPI_REQUEST_INIT(&req->super, persistent); \
|
||||
req->super.req_mpi_object.comm = comm; \
|
||||
req->super.req_complete = false; \
|
||||
req->super.req_state = OMPI_REQUEST_ACTIVE; \
|
||||
} while (0)
|
||||
|
||||
#define OMPI_COLL_LIBNBC_REQUEST_RETURN(req) \
|
||||
@ -157,132 +157,258 @@ 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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_ibarrier(struct ompi_communicator_t *comm, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_ibarrier_inter(struct ompi_communicator_t *comm, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
ompi_request_t ** request, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
ompi_request_t ** request, struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
|
||||
int ompi_coll_libnbc_allgather_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_allgatherv_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_allreduce_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_alltoall_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_alltoallv_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_alltoallw_init(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, MPI_Info info, ompi_request_t **request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_barrier_init(struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_bcast_init(void *buffer, int count, MPI_Datatype datatype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_exscan_init(const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t **request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_gather_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_gatherv_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_reduce_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
|
||||
MPI_Op op, int root, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_reduce_scatter_init(const void* sendbuf, void* recvbuf, const int *recvcounts, MPI_Datatype datatype,
|
||||
MPI_Op op, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_reduce_scatter_block_init(const void *sbuf, void *rbuf, int rcount, struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t **request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_scan_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_scatter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
void* recvbuf, int recvcount, MPI_Datatype recvtype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_scatterv_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
|
||||
int ompi_coll_libnbc_allgather_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_allgatherv_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_allreduce_inter_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_alltoall_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_alltoallv_inter_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_alltoallw_inter_init(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, MPI_Info info, ompi_request_t **request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_barrier_inter_init(struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_bcast_inter_init(void *buffer, int count, MPI_Datatype datatype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_gather_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_gatherv_inter_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_reduce_inter_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
|
||||
MPI_Op op, int root, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_reduce_scatter_inter_init(const void* sendbuf, void* recvbuf, const int *recvcounts, MPI_Datatype datatype,
|
||||
MPI_Op op, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_reduce_scatter_block_inter_init(const void *sbuf, void *rbuf, int rcount, struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op, struct ompi_communicator_t *comm,
|
||||
MPI_Info info, ompi_request_t **request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_scatter_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
void* recvbuf, int recvcount, MPI_Datatype recvtype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_scatterv_inter_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
|
||||
int ompi_coll_libnbc_neighbor_allgather_init(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf,
|
||||
int rcount, MPI_Datatype rtype, struct ompi_communicator_t *comm,
|
||||
MPI_Info info, ompi_request_t ** request, struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_neighbor_allgatherv_init(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf,
|
||||
const int *rcounts, const int *displs, MPI_Datatype rtype,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_neighbor_alltoall_init(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf,
|
||||
int rcount, MPI_Datatype rtype, struct ompi_communicator_t *comm, MPI_Info info,
|
||||
ompi_request_t ** request, struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_neighbor_alltoallv_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int ompi_coll_libnbc_neighbor_alltoallw_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
|
||||
|
||||
END_C_DECLS
|
||||
|
@ -13,9 +13,12 @@
|
||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* Copyright (c) 2016-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2017 Ian Bradley Morgan and Anthony Skjellum. All
|
||||
* rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -26,6 +29,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "coll_libnbc.h"
|
||||
#include "nbc_internal.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "ompi/mca/coll/coll.h"
|
||||
@ -207,6 +211,24 @@ libnbc_comm_query(struct ompi_communicator_t *comm,
|
||||
module->super.coll_iscan = NULL;
|
||||
module->super.coll_iscatter = ompi_coll_libnbc_iscatter_inter;
|
||||
module->super.coll_iscatterv = ompi_coll_libnbc_iscatterv_inter;
|
||||
|
||||
module->super.coll_allgather_init = ompi_coll_libnbc_allgather_inter_init;
|
||||
module->super.coll_allgatherv_init = ompi_coll_libnbc_allgatherv_inter_init;
|
||||
module->super.coll_allreduce_init = ompi_coll_libnbc_allreduce_inter_init;
|
||||
module->super.coll_alltoall_init = ompi_coll_libnbc_alltoall_inter_init;
|
||||
module->super.coll_alltoallv_init = ompi_coll_libnbc_alltoallv_inter_init;
|
||||
module->super.coll_alltoallw_init = ompi_coll_libnbc_alltoallw_inter_init;
|
||||
module->super.coll_barrier_init = ompi_coll_libnbc_barrier_inter_init;
|
||||
module->super.coll_bcast_init = ompi_coll_libnbc_bcast_inter_init;
|
||||
module->super.coll_exscan_init = NULL;
|
||||
module->super.coll_gather_init = ompi_coll_libnbc_gather_inter_init;
|
||||
module->super.coll_gatherv_init = ompi_coll_libnbc_gatherv_inter_init;
|
||||
module->super.coll_reduce_init = ompi_coll_libnbc_reduce_inter_init;
|
||||
module->super.coll_reduce_scatter_init = ompi_coll_libnbc_reduce_scatter_inter_init;
|
||||
module->super.coll_reduce_scatter_block_init = ompi_coll_libnbc_reduce_scatter_block_inter_init;
|
||||
module->super.coll_scan_init = NULL;
|
||||
module->super.coll_scatter_init = ompi_coll_libnbc_scatter_inter_init;
|
||||
module->super.coll_scatterv_init = ompi_coll_libnbc_scatterv_inter_init;
|
||||
} else {
|
||||
module->super.coll_iallgather = ompi_coll_libnbc_iallgather;
|
||||
module->super.coll_iallgatherv = ompi_coll_libnbc_iallgatherv;
|
||||
@ -231,6 +253,30 @@ libnbc_comm_query(struct ompi_communicator_t *comm,
|
||||
module->super.coll_ineighbor_alltoall = ompi_coll_libnbc_ineighbor_alltoall;
|
||||
module->super.coll_ineighbor_alltoallv = ompi_coll_libnbc_ineighbor_alltoallv;
|
||||
module->super.coll_ineighbor_alltoallw = ompi_coll_libnbc_ineighbor_alltoallw;
|
||||
|
||||
module->super.coll_allgather_init = ompi_coll_libnbc_allgather_init;
|
||||
module->super.coll_allgatherv_init = ompi_coll_libnbc_allgatherv_init;
|
||||
module->super.coll_allreduce_init = ompi_coll_libnbc_allreduce_init;
|
||||
module->super.coll_alltoall_init = ompi_coll_libnbc_alltoall_init;
|
||||
module->super.coll_alltoallv_init = ompi_coll_libnbc_alltoallv_init;
|
||||
module->super.coll_alltoallw_init = ompi_coll_libnbc_alltoallw_init;
|
||||
module->super.coll_barrier_init = ompi_coll_libnbc_barrier_init;
|
||||
module->super.coll_bcast_init = ompi_coll_libnbc_bcast_init;
|
||||
module->super.coll_exscan_init = ompi_coll_libnbc_exscan_init;
|
||||
module->super.coll_gather_init = ompi_coll_libnbc_gather_init;
|
||||
module->super.coll_gatherv_init = ompi_coll_libnbc_gatherv_init;
|
||||
module->super.coll_reduce_init = ompi_coll_libnbc_reduce_init;
|
||||
module->super.coll_reduce_scatter_init = ompi_coll_libnbc_reduce_scatter_init;
|
||||
module->super.coll_reduce_scatter_block_init = ompi_coll_libnbc_reduce_scatter_block_init;
|
||||
module->super.coll_scan_init = ompi_coll_libnbc_scan_init;
|
||||
module->super.coll_scatter_init = ompi_coll_libnbc_scatter_init;
|
||||
module->super.coll_scatterv_init = ompi_coll_libnbc_scatterv_init;
|
||||
|
||||
module->super.coll_neighbor_allgather_init = ompi_coll_libnbc_neighbor_allgather_init;
|
||||
module->super.coll_neighbor_allgatherv_init = ompi_coll_libnbc_neighbor_allgatherv_init;
|
||||
module->super.coll_neighbor_alltoall_init = ompi_coll_libnbc_neighbor_alltoall_init;
|
||||
module->super.coll_neighbor_alltoallv_init = ompi_coll_libnbc_neighbor_alltoallv_init;
|
||||
module->super.coll_neighbor_alltoallw_init = ompi_coll_libnbc_neighbor_alltoallw_init;
|
||||
}
|
||||
|
||||
module->super.ft_event = NULL;
|
||||
@ -291,7 +337,13 @@ ompi_coll_libnbc_progress(void)
|
||||
else {
|
||||
request->super.req_status.MPI_ERROR = res;
|
||||
}
|
||||
ompi_request_complete(&request->super, true);
|
||||
if(request->super.req_persistent) {
|
||||
/* reset for the next communication */
|
||||
request->row_offset = 0;
|
||||
}
|
||||
if(!request->super.req_persistent || !REQUEST_COMPLETE(&request->super)) {
|
||||
ompi_request_complete(&request->super, true);
|
||||
}
|
||||
}
|
||||
OPAL_THREAD_LOCK(&mca_coll_libnbc_component.lock);
|
||||
}
|
||||
@ -333,6 +385,44 @@ OBJ_CLASS_INSTANCE(ompi_coll_libnbc_module_t,
|
||||
libnbc_module_destruct);
|
||||
|
||||
|
||||
static int
|
||||
request_start(size_t count, ompi_request_t ** requests)
|
||||
{
|
||||
int i, res;
|
||||
|
||||
NBC_DEBUG(5, " ** request_start **\n");
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
NBC_Handle *handle = (NBC_Handle *) requests[i];
|
||||
NBC_Schedule *schedule = handle->schedule;
|
||||
|
||||
NBC_DEBUG(5, "--------------------------------\n");
|
||||
NBC_DEBUG(5, "schedule %p size %u\n", &schedule, sizeof(schedule));
|
||||
NBC_DEBUG(5, "handle %p size %u\n", &handle, sizeof(handle));
|
||||
NBC_DEBUG(5, "data %p size %u\n", &schedule->data, sizeof(schedule->data));
|
||||
NBC_DEBUG(5, "req_array %p size %u\n", &handle->req_array, sizeof(handle->req_array));
|
||||
NBC_DEBUG(5, "row_offset=%u address=%p size=%u\n", handle->row_offset, &handle->row_offset, sizeof(handle->row_offset));
|
||||
NBC_DEBUG(5, "req_count=%u address=%p size=%u\n", handle->req_count, &handle->req_count, sizeof(handle->req_count));
|
||||
NBC_DEBUG(5, "tmpbuf address=%p size=%u\n", handle->tmpbuf, sizeof(handle->tmpbuf));
|
||||
NBC_DEBUG(5, "--------------------------------\n");
|
||||
|
||||
handle->super.req_complete = REQUEST_PENDING;
|
||||
handle->nbc_complete = false;
|
||||
|
||||
res = NBC_Start(handle);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_DEBUG(5, " ** bad result from NBC_Start **\n");
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
NBC_DEBUG(5, " ** LEAVING request_start **\n");
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
request_cancel(struct ompi_request_t *request, int complete)
|
||||
{
|
||||
@ -351,7 +441,6 @@ request_free(struct ompi_request_t **ompi_req)
|
||||
}
|
||||
|
||||
OMPI_COLL_LIBNBC_REQUEST_RETURN(request);
|
||||
|
||||
*ompi_req = MPI_REQUEST_NULL;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
@ -363,6 +452,7 @@ request_construct(ompi_coll_libnbc_request_t *request)
|
||||
{
|
||||
request->super.req_type = OMPI_REQUEST_COLL;
|
||||
request->super.req_status._cancelled = 0;
|
||||
request->super.req_start = request_start;
|
||||
request->super.req_free = request_free;
|
||||
request->super.req_cancel = request_cancel;
|
||||
}
|
||||
|
@ -17,7 +17,12 @@
|
||||
*
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2017 Ian Bradley Morgan and Anthony Skjellum. All
|
||||
* rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*/
|
||||
#include "nbc_internal.h"
|
||||
#include "ompi/mca/coll/base/coll_tags.h"
|
||||
@ -316,8 +321,7 @@ int NBC_Progress(NBC_Handle *handle) {
|
||||
int i;
|
||||
ompi_status_public_t status;
|
||||
|
||||
/* the handle is done if there is no schedule attached */
|
||||
if (NULL == handle->schedule) {
|
||||
if (handle->nbc_complete) {
|
||||
return NBC_OK;
|
||||
}
|
||||
|
||||
@ -383,7 +387,10 @@ int NBC_Progress(NBC_Handle *handle) {
|
||||
/* this was the last round - we're done */
|
||||
NBC_DEBUG(5, "NBC_Progress last round finished - we're done\n");
|
||||
|
||||
NBC_Free(handle);
|
||||
handle->nbc_complete = true;
|
||||
if (!handle->super.req_persistent) {
|
||||
NBC_Free(handle);
|
||||
}
|
||||
|
||||
return NBC_OK;
|
||||
}
|
||||
@ -581,60 +588,6 @@ static inline int NBC_Start_round(NBC_Handle *handle) {
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int NBC_Init_handle(struct ompi_communicator_t *comm, ompi_coll_libnbc_request_t **request, ompi_coll_libnbc_module_t *comminfo)
|
||||
{
|
||||
int tmp_tag;
|
||||
bool need_register = false;
|
||||
ompi_coll_libnbc_request_t *handle;
|
||||
|
||||
OMPI_COLL_LIBNBC_REQUEST_ALLOC(comm, handle);
|
||||
if (NULL == handle) return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
*request = handle;
|
||||
|
||||
handle->tmpbuf = NULL;
|
||||
handle->req_count = 0;
|
||||
handle->req_array = NULL;
|
||||
handle->comm = comm;
|
||||
handle->schedule = NULL;
|
||||
handle->row_offset = 0;
|
||||
|
||||
/******************** Do the tag and shadow comm administration ... ***************/
|
||||
|
||||
OPAL_THREAD_LOCK(&comminfo->mutex);
|
||||
tmp_tag = comminfo->tag--;
|
||||
if (tmp_tag == MCA_COLL_BASE_TAG_NONBLOCKING_END) {
|
||||
tmp_tag = comminfo->tag = MCA_COLL_BASE_TAG_NONBLOCKING_BASE;
|
||||
NBC_DEBUG(2,"resetting tags ...\n");
|
||||
}
|
||||
|
||||
if (true != comminfo->comm_registered) {
|
||||
comminfo->comm_registered = true;
|
||||
need_register = true;
|
||||
}
|
||||
OPAL_THREAD_UNLOCK(&comminfo->mutex);
|
||||
|
||||
handle->tag = tmp_tag;
|
||||
|
||||
/* register progress */
|
||||
if (need_register) {
|
||||
int32_t tmp =
|
||||
OPAL_THREAD_ADD_FETCH32(&mca_coll_libnbc_component.active_comms, 1);
|
||||
if (tmp == 1) {
|
||||
opal_progress_register(ompi_coll_libnbc_progress);
|
||||
}
|
||||
}
|
||||
|
||||
handle->comm=comm;
|
||||
/*printf("got comminfo: %lu tag: %i\n", comminfo, comminfo->tag);*/
|
||||
|
||||
/******************** end of tag and shadow comm administration ... ***************/
|
||||
handle->comminfo = comminfo;
|
||||
|
||||
NBC_DEBUG(3, "got tag %i\n", handle->tag);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
void NBC_Return_handle(ompi_coll_libnbc_request_t *request) {
|
||||
NBC_Free (request);
|
||||
OMPI_COLL_LIBNBC_REQUEST_RETURN(request);
|
||||
@ -692,16 +645,21 @@ int NBC_Init_comm(MPI_Comm comm, NBC_Comminfo *comminfo) {
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int NBC_Start(NBC_Handle *handle, NBC_Schedule *schedule) {
|
||||
int NBC_Start(NBC_Handle *handle) {
|
||||
int res;
|
||||
|
||||
handle->schedule = schedule;
|
||||
/* bozo case */
|
||||
if ((ompi_request_t *)handle == &ompi_request_empty) {
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/* kick off first round */
|
||||
handle->super.req_state = OMPI_REQUEST_ACTIVE;
|
||||
res = NBC_Start_round(handle);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
OPAL_THREAD_LOCK(&mca_coll_libnbc_component.lock);
|
||||
opal_list_append(&mca_coll_libnbc_component.active_requests, &(handle->super.super.super));
|
||||
OPAL_THREAD_UNLOCK(&mca_coll_libnbc_component.lock);
|
||||
@ -709,22 +667,85 @@ int NBC_Start(NBC_Handle *handle, NBC_Schedule *schedule) {
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int NBC_Schedule_request(NBC_Schedule *schedule, ompi_communicator_t *comm, ompi_coll_libnbc_module_t *module, ompi_request_t **request, void *tmpbuf) {
|
||||
int res;
|
||||
NBC_Handle *handle;
|
||||
res = NBC_Init_handle (comm, &handle, module);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
int NBC_Schedule_request(NBC_Schedule *schedule, ompi_communicator_t *comm,
|
||||
ompi_coll_libnbc_module_t *module, bool persistent,
|
||||
ompi_request_t **request, void *tmpbuf) {
|
||||
int ret, tmp_tag;
|
||||
bool need_register = false;
|
||||
ompi_coll_libnbc_request_t *handle;
|
||||
|
||||
/* no operation (e.g. one process barrier)? */
|
||||
if (((int *)schedule->data)[0] == 0 && schedule->data[sizeof(int)] == 0) {
|
||||
ret = nbc_get_noop_request(persistent, request);
|
||||
if (OMPI_SUCCESS != ret) {
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
/* update the module->tag here because other processes may have operations
|
||||
* and they may update the module->tag */
|
||||
OPAL_THREAD_LOCK(&module->mutex);
|
||||
tmp_tag = module->tag--;
|
||||
if (tmp_tag == MCA_COLL_BASE_TAG_NONBLOCKING_END) {
|
||||
tmp_tag = module->tag = MCA_COLL_BASE_TAG_NONBLOCKING_BASE;
|
||||
NBC_DEBUG(2,"resetting tags ...\n");
|
||||
}
|
||||
OPAL_THREAD_UNLOCK(&module->mutex);
|
||||
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
OMPI_COLL_LIBNBC_REQUEST_ALLOC(comm, persistent, handle);
|
||||
if (NULL == handle) return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
|
||||
handle->tmpbuf = NULL;
|
||||
handle->req_count = 0;
|
||||
handle->req_array = NULL;
|
||||
handle->comm = comm;
|
||||
handle->schedule = NULL;
|
||||
handle->row_offset = 0;
|
||||
handle->nbc_complete = persistent ? true : false;
|
||||
|
||||
/******************** Do the tag and shadow comm administration ... ***************/
|
||||
|
||||
OPAL_THREAD_LOCK(&module->mutex);
|
||||
tmp_tag = module->tag--;
|
||||
if (tmp_tag == MCA_COLL_BASE_TAG_NONBLOCKING_END) {
|
||||
tmp_tag = module->tag = MCA_COLL_BASE_TAG_NONBLOCKING_BASE;
|
||||
NBC_DEBUG(2,"resetting tags ...\n");
|
||||
}
|
||||
|
||||
if (true != module->comm_registered) {
|
||||
module->comm_registered = true;
|
||||
need_register = true;
|
||||
}
|
||||
OPAL_THREAD_UNLOCK(&module->mutex);
|
||||
|
||||
handle->tag = tmp_tag;
|
||||
|
||||
/* register progress */
|
||||
if (need_register) {
|
||||
int32_t tmp =
|
||||
OPAL_THREAD_ADD_FETCH32(&mca_coll_libnbc_component.active_comms, 1);
|
||||
if (tmp == 1) {
|
||||
opal_progress_register(ompi_coll_libnbc_progress);
|
||||
}
|
||||
}
|
||||
|
||||
handle->comm=comm;
|
||||
/*printf("got module: %lu tag: %i\n", module, module->tag);*/
|
||||
|
||||
/******************** end of tag and shadow comm administration ... ***************/
|
||||
handle->comminfo = module;
|
||||
|
||||
NBC_DEBUG(3, "got tag %i\n", handle->tag);
|
||||
|
||||
handle->tmpbuf = tmpbuf;
|
||||
|
||||
res = NBC_Start (handle, schedule);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return res;
|
||||
}
|
||||
|
||||
handle->schedule = schedule;
|
||||
*request = (ompi_request_t *) handle;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -43,9 +44,9 @@ int NBC_Allgather_args_compare(NBC_Allgather_args *a, NBC_Allgather_args *b, voi
|
||||
* the algorithm uses p-1 rounds
|
||||
* each node sends the packet it received last round (or has in round 0) to it's right neighbor (modulo p)
|
||||
* 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_2_0_t *module)
|
||||
static int nbc_allgather_init(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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, p, res;
|
||||
MPI_Aint rcvext;
|
||||
@ -69,7 +70,7 @@ int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
if (inplace) {
|
||||
sendtype = recvtype;
|
||||
sendcount = recvcount;
|
||||
} else {
|
||||
} else if (!persistent) { /* for persistent, the copy must be scheduled */
|
||||
/* copy my data to receive buffer */
|
||||
rbuf = (char *) recvbuf + rank * recvcount * rcvext;
|
||||
res = NBC_Copy (sendbuf, sendcount, sendtype, rbuf, recvcount, recvtype, comm);
|
||||
@ -77,9 +78,8 @@ int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
return res;
|
||||
}
|
||||
}
|
||||
if (1 == p) {
|
||||
*request = &ompi_request_empty;
|
||||
return OMPI_SUCCESS;
|
||||
if (1 == p && (!persistent || inplace)) {
|
||||
return nbc_get_noop_request(persistent, request);
|
||||
}
|
||||
|
||||
#ifdef NBC_CACHE_SCHEDULE
|
||||
@ -99,6 +99,17 @@ int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
}
|
||||
|
||||
sbuf = (char *)recvbuf + rank * recvcount * rcvext;
|
||||
|
||||
if (persistent && !inplace) { /* for nonblocking, data has been copied already */
|
||||
/* copy my data to receive buffer (= send buffer of NBC_Sched_send) */
|
||||
res = NBC_Sched_copy ((void *)sendbuf, false, sendcount, sendtype,
|
||||
sbuf, false, recvcount, recvtype, schedule, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
/* do p-1 rounds */
|
||||
for(int r = 0 ; r < p ; ++r) {
|
||||
if(r != rank) {
|
||||
@ -154,7 +165,7 @@ int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -163,9 +174,29 @@ int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_2_0_t *module)
|
||||
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_3_0_t *module)
|
||||
{
|
||||
int res = nbc_allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (*(ompi_coll_libnbc_request_t **)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_allgather_inter_init(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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int res, rsize;
|
||||
MPI_Aint rcvext;
|
||||
@ -211,7 +242,7 @@ int ompi_coll_libnbc_iallgather_inter(const void* sendbuf, int sendcount, MPI_Da
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -219,3 +250,46 @@ int ompi_coll_libnbc_iallgather_inter(const void* sendbuf, int sendcount, MPI_Da
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_allgather_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (*(ompi_coll_libnbc_request_t **)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_allgather_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_allgather_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_allgather_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -33,9 +34,9 @@
|
||||
* second round:
|
||||
* each node sends to node (rank+2)%p sendcount elements
|
||||
* 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_2_0_t *module)
|
||||
static int nbc_allgatherv_init(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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, p, res, speer, rpeer;
|
||||
MPI_Aint rcvext;
|
||||
@ -57,7 +58,7 @@ int ompi_coll_libnbc_iallgatherv(const void* sendbuf, int sendcount, MPI_Datatyp
|
||||
if (inplace) {
|
||||
sendtype = recvtype;
|
||||
sendcount = recvcounts[rank];
|
||||
} else {
|
||||
} else if (!persistent) { /* for persistent, the copy must be scheduled */
|
||||
/* copy my data to receive buffer */
|
||||
rbuf = (char *) recvbuf + displs[rank] * rcvext;
|
||||
res = NBC_Copy (sendbuf, sendcount, sendtype, rbuf, recvcounts[rank], recvtype, comm);
|
||||
@ -73,6 +74,16 @@ int ompi_coll_libnbc_iallgatherv(const void* sendbuf, int sendcount, MPI_Datatyp
|
||||
|
||||
sbuf = (char *) recvbuf + displs[rank] * rcvext;
|
||||
|
||||
if (persistent && !inplace) { /* for nonblocking, data has been copied already */
|
||||
/* copy my data to receive buffer (= send buffer of NBC_Sched_send) */
|
||||
res = NBC_Sched_copy ((void *)sendbuf, false, sendcount, sendtype,
|
||||
sbuf, false, recvcounts[rank], recvtype, schedule, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
/* do p-1 rounds */
|
||||
for (int r = 1 ; r < p ; ++r) {
|
||||
speer = (rank + r) % p;
|
||||
@ -99,7 +110,7 @@ int ompi_coll_libnbc_iallgatherv(const void* sendbuf, int sendcount, MPI_Datatyp
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request (schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request (schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -108,9 +119,28 @@ int ompi_coll_libnbc_iallgatherv(const void* sendbuf, int sendcount, MPI_Datatyp
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_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_3_0_t *module) {
|
||||
int res = nbc_allgatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_allgatherv_inter_init(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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int res, rsize;
|
||||
MPI_Aint rcvext;
|
||||
@ -159,7 +189,7 @@ int ompi_coll_libnbc_iallgatherv_inter(const void* sendbuf, int sendcount, MPI_D
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -167,3 +197,46 @@ int ompi_coll_libnbc_iallgatherv_inter(const void* sendbuf, int sendcount, MPI_D
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_allgatherv_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_allgatherv_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_allgatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_allgatherv_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int *recvcounts, const int *displs,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_allgatherv_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -52,9 +53,9 @@ int NBC_Allreduce_args_compare(NBC_Allreduce_args *a, NBC_Allreduce_args *b, voi
|
||||
}
|
||||
#endif
|
||||
|
||||
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_2_0_t *module)
|
||||
static int nbc_allreduce_init(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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, p, res;
|
||||
ptrdiff_t ext, lb;
|
||||
@ -86,7 +87,7 @@ int ompi_coll_libnbc_iallreduce(const void* sendbuf, void* recvbuf, int count, M
|
||||
return res;
|
||||
}
|
||||
|
||||
if (1 == p) {
|
||||
if (1 == p && (!persistent || inplace)) {
|
||||
if (!inplace) {
|
||||
/* for a single node - copy data to receivebuf */
|
||||
res = NBC_Copy(sendbuf, count, datatype, recvbuf, count, datatype, comm);
|
||||
@ -94,8 +95,7 @@ int ompi_coll_libnbc_iallreduce(const void* sendbuf, void* recvbuf, int count, M
|
||||
return res;
|
||||
}
|
||||
}
|
||||
*request = &ompi_request_empty;
|
||||
return OMPI_SUCCESS;
|
||||
return nbc_get_noop_request(persistent, request);
|
||||
}
|
||||
|
||||
span = opal_datatype_span(&datatype->super, count, &gap);
|
||||
@ -127,13 +127,18 @@ int ompi_coll_libnbc_iallreduce(const void* sendbuf, void* recvbuf, int count, M
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
switch(alg) {
|
||||
case NBC_ARED_BINOMIAL:
|
||||
res = allred_sched_diss(rank, p, count, datatype, gap, sendbuf, recvbuf, op, inplace, schedule, tmpbuf);
|
||||
break;
|
||||
case NBC_ARED_RING:
|
||||
res = allred_sched_ring(rank, p, count, datatype, sendbuf, recvbuf, op, size, ext, schedule, tmpbuf);
|
||||
break;
|
||||
if (p == 1) {
|
||||
res = NBC_Sched_copy((void *)sendbuf, false, count, datatype,
|
||||
recvbuf, false, count, datatype, schedule, false);
|
||||
} else {
|
||||
switch(alg) {
|
||||
case NBC_ARED_BINOMIAL:
|
||||
res = allred_sched_diss(rank, p, count, datatype, gap, sendbuf, recvbuf, op, inplace, schedule, tmpbuf);
|
||||
break;
|
||||
case NBC_ARED_RING:
|
||||
res = allred_sched_ring(rank, p, count, datatype, sendbuf, recvbuf, op, size, ext, schedule, tmpbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
@ -180,7 +185,7 @@ int ompi_coll_libnbc_iallreduce(const void* sendbuf, void* recvbuf, int count, M
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request (schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request (schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -190,9 +195,28 @@ int ompi_coll_libnbc_iallreduce(const void* sendbuf, void* recvbuf, int count, M
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_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_3_0_t *module) {
|
||||
int res = nbc_allreduce_init(sendbuf, recvbuf, count, datatype, op,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_allreduce_inter_init(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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, res, rsize;
|
||||
size_t size;
|
||||
@ -244,7 +268,7 @@ int ompi_coll_libnbc_iallreduce_inter(const void* sendbuf, void* recvbuf, int co
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -254,6 +278,24 @@ int ompi_coll_libnbc_iallreduce_inter(const void* sendbuf, void* recvbuf, int co
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_allreduce_inter_init(sendbuf, recvbuf, count, datatype, op,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/* binomial allreduce (binomial tree up and binomial bcast down)
|
||||
* working principle:
|
||||
@ -311,7 +353,9 @@ static inline int allred_sched_diss(int rank, int p, int count, MPI_Datatype dat
|
||||
rbuf = recvbuf;
|
||||
tmprbuf = false;
|
||||
if (inplace) {
|
||||
res = NBC_Copy(rbuf, count, datatype, ((char *)tmpbuf) - gap, count, datatype, MPI_COMM_SELF);
|
||||
res = NBC_Sched_copy(rbuf, false, count, datatype,
|
||||
((char *)tmpbuf) - gap, false, count, datatype,
|
||||
schedule, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
@ -690,3 +734,28 @@ static inline int allred_sched_linear(int rank, int rsize, const void *sendbuf,
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_allreduce_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_allreduce_init(sendbuf, recvbuf, count, datatype, op,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_allreduce_inter_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_allreduce_inter_init(sendbuf, recvbuf, count, datatype, op,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -53,9 +54,9 @@ int NBC_Alltoall_args_compare(NBC_Alltoall_args *a, NBC_Alltoall_args *b, void *
|
||||
#endif
|
||||
|
||||
/* 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_2_0_t *module)
|
||||
static int nbc_alltoall_init(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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, p, res, datasize;
|
||||
size_t a2asize, sndsize;
|
||||
@ -109,16 +110,6 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
} else
|
||||
alg = NBC_A2A_LINEAR; /*NBC_A2A_PAIRWISE;*/
|
||||
|
||||
if (!inplace) {
|
||||
/* copy my data to receive buffer */
|
||||
rbuf = (char *) recvbuf + rank * recvcount * rcvext;
|
||||
sbuf = (char *) sendbuf + rank * sendcount * sndext;
|
||||
res = NBC_Copy (sbuf, sendcount, sendtype, rbuf, recvcount, recvtype, comm);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
/* allocate temp buffer if we need one */
|
||||
if (alg == NBC_A2A_INPLACE) {
|
||||
span = opal_datatype_span(&recvtype->super, recvcount, &gap);
|
||||
@ -127,7 +118,10 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
} else if (alg == NBC_A2A_DISS) {
|
||||
/* only A2A_DISS needs buffers */
|
||||
/* persistent operation is not supported currently for this algorithm;
|
||||
* we need to replace PMPI_Pack, PMPI_Unpack, and mempcy */
|
||||
assert(! persistent);
|
||||
|
||||
if(NBC_Type_intrinsic(sendtype)) {
|
||||
datasize = sndext * sendcount;
|
||||
} else {
|
||||
@ -204,6 +198,19 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
if (!inplace) {
|
||||
/* copy my data to receive buffer */
|
||||
rbuf = (char *) recvbuf + rank * recvcount * rcvext;
|
||||
sbuf = (char *) sendbuf + rank * sendcount * sndext;
|
||||
res = NBC_Sched_copy (sbuf, false, sendcount, sendtype,
|
||||
rbuf, false, recvcount, recvtype, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
switch(alg) {
|
||||
case NBC_A2A_INPLACE:
|
||||
res = a2a_sched_inplace(rank, p, schedule, recvbuf, recvcount, recvtype, rcvext, gap, comm);
|
||||
@ -264,7 +271,7 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -274,9 +281,28 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_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_3_0_t *module) {
|
||||
int res = nbc_alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_alltoall_inter_init (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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int res, rsize;
|
||||
MPI_Aint sndext, rcvext;
|
||||
@ -330,7 +356,7 @@ int ompi_coll_libnbc_ialltoall_inter (const void* sendbuf, int sendcount, MPI_Da
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -339,6 +365,25 @@ int ompi_coll_libnbc_ialltoall_inter (const void* sendbuf, int sendcount, MPI_Da
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_alltoall_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static inline int a2a_sched_pairwise(int rank, int p, MPI_Aint sndext, MPI_Aint rcvext, NBC_Schedule* schedule,
|
||||
const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, MPI_Comm comm) {
|
||||
@ -544,3 +589,27 @@ static inline int a2a_sched_inplace(int rank, int p, NBC_Schedule* schedule, voi
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_alltoall_init (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_alltoall_inter_init (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
|
||||
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_alltoall_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015-2017 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,10 +41,10 @@ static inline int a2av_sched_inplace(int rank, int p, NBC_Schedule *schedule,
|
||||
* would not be sufficient ... we simply do not cache it */
|
||||
|
||||
/* simple linear Alltoallv */
|
||||
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_2_0_t *module)
|
||||
static int nbc_alltoallv_init(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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, p, res;
|
||||
MPI_Aint sndext, rcvext;
|
||||
@ -74,8 +75,7 @@ int ompi_coll_libnbc_ialltoallv(const void* sendbuf, const int *sendcounts, cons
|
||||
}
|
||||
span = opal_datatype_span(&recvtype->super, count, &gap);
|
||||
if (OPAL_UNLIKELY(0 == span)) {
|
||||
*request = &ompi_request_empty;
|
||||
return MPI_SUCCESS;
|
||||
return nbc_get_noop_request(persistent, request);
|
||||
}
|
||||
tmpbuf = malloc(span);
|
||||
if (OPAL_UNLIKELY(NULL == tmpbuf)) {
|
||||
@ -89,14 +89,6 @@ int ompi_coll_libnbc_ialltoallv(const void* sendbuf, const int *sendcounts, cons
|
||||
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
|
||||
return res;
|
||||
}
|
||||
if (sendcounts[rank] != 0) {
|
||||
rbuf = (char *) recvbuf + rdispls[rank] * rcvext;
|
||||
sbuf = (char *) sendbuf + sdispls[rank] * sndext;
|
||||
res = NBC_Copy (sbuf, sendcounts[rank], sendtype, rbuf, recvcounts[rank], recvtype, comm);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
schedule = OBJ_NEW(NBC_Schedule);
|
||||
@ -106,6 +98,17 @@ int ompi_coll_libnbc_ialltoallv(const void* sendbuf, const int *sendcounts, cons
|
||||
}
|
||||
|
||||
|
||||
if (!inplace && sendcounts[rank] != 0) {
|
||||
rbuf = (char *) recvbuf + rdispls[rank] * rcvext;
|
||||
sbuf = (char *) sendbuf + sdispls[rank] * sndext;
|
||||
res = NBC_Sched_copy (sbuf, false, sendcounts[rank], sendtype,
|
||||
rbuf, false, recvcounts[rank], recvtype, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
if (inplace) {
|
||||
res = a2av_sched_inplace(rank, p, schedule, recvbuf, recvcounts,
|
||||
rdispls, rcvext, recvtype, gap);
|
||||
@ -127,7 +130,7 @@ int ompi_coll_libnbc_ialltoallv(const void* sendbuf, const int *sendcounts, cons
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -137,11 +140,32 @@ int ompi_coll_libnbc_ialltoallv(const void* sendbuf, const int *sendcounts, cons
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_alltoallv_init(sendbuf, sendcounts, sdispls, sendtype,
|
||||
recvbuf, recvcounts, rdispls, recvtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/* simple linear Alltoallv */
|
||||
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_2_0_t *module)
|
||||
static int nbc_alltoallv_inter_init (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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int res, rsize;
|
||||
MPI_Aint sndext, rcvext;
|
||||
@ -195,7 +219,7 @@ int ompi_coll_libnbc_ialltoallv_inter (const void* sendbuf, const int *sendcount
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -204,6 +228,27 @@ int ompi_coll_libnbc_ialltoallv_inter (const void* sendbuf, const int *sendcount
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_alltoallv_inter_init(sendbuf, sendcounts, sdispls, sendtype,
|
||||
recvbuf, recvcounts, rdispls, recvtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
__opal_attribute_unused__
|
||||
static inline int a2av_sched_linear(int rank, int p, NBC_Schedule *schedule,
|
||||
const void *sendbuf, const int *sendcounts, const int *sdispls,
|
||||
@ -342,3 +387,29 @@ static inline int a2av_sched_inplace(int rank, int p, NBC_Schedule *schedule,
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_alltoallv_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_alltoallv_init(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_alltoallv_inter_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_alltoallv_inter_init(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015-2017 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,10 +41,10 @@ static inline int a2aw_sched_inplace(int rank, int p, NBC_Schedule *schedule,
|
||||
* would not be sufficient ... we simply do not cache it */
|
||||
|
||||
/* simple linear Alltoallw */
|
||||
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_2_0_t *module)
|
||||
static int nbc_alltoallw_init(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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, p, res;
|
||||
NBC_Schedule *schedule;
|
||||
@ -67,8 +68,7 @@ int ompi_coll_libnbc_ialltoallw(const void* sendbuf, const int *sendcounts, cons
|
||||
}
|
||||
}
|
||||
if (OPAL_UNLIKELY(0 == span)) {
|
||||
*request = &ompi_request_empty;
|
||||
return OMPI_SUCCESS;
|
||||
return nbc_get_noop_request(persistent, request);
|
||||
}
|
||||
tmpbuf = malloc(span);
|
||||
if (OPAL_UNLIKELY(NULL == tmpbuf)) {
|
||||
@ -77,13 +77,6 @@ int ompi_coll_libnbc_ialltoallw(const void* sendbuf, const int *sendcounts, cons
|
||||
sendcounts = recvcounts;
|
||||
sdispls = rdispls;
|
||||
sendtypes = recvtypes;
|
||||
} else if (sendcounts[rank] != 0) {
|
||||
rbuf = (char *) recvbuf + rdispls[rank];
|
||||
sbuf = (char *) sendbuf + sdispls[rank];
|
||||
res = NBC_Copy(sbuf, sendcounts[rank], sendtypes[rank], rbuf, recvcounts[rank], recvtypes[rank], comm);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
schedule = OBJ_NEW(NBC_Schedule);
|
||||
@ -92,6 +85,16 @@ int ompi_coll_libnbc_ialltoallw(const void* sendbuf, const int *sendcounts, cons
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
if (!inplace && sendcounts[rank] != 0) {
|
||||
rbuf = (char *) recvbuf + rdispls[rank];
|
||||
sbuf = (char *) sendbuf + sdispls[rank];
|
||||
res = NBC_Sched_copy(sbuf, false, sendcounts[rank], sendtypes[rank],
|
||||
rbuf, false, recvcounts[rank], recvtypes[rank], schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
if (inplace) {
|
||||
res = a2aw_sched_inplace(rank, p, schedule, recvbuf,
|
||||
recvcounts, rdispls, recvtypes);
|
||||
@ -113,7 +116,7 @@ int ompi_coll_libnbc_ialltoallw(const void* sendbuf, const int *sendcounts, cons
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -123,11 +126,32 @@ int ompi_coll_libnbc_ialltoallw(const void* sendbuf, const int *sendcounts, cons
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes,
|
||||
recvbuf, recvcounts, rdispls, recvtypes,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/* simple linear Alltoallw */
|
||||
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_2_0_t *module)
|
||||
static int nbc_alltoallw_inter_init (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_3_0_t *module, bool persistent)
|
||||
{
|
||||
int res, rsize;
|
||||
NBC_Schedule *schedule;
|
||||
@ -168,7 +192,7 @@ int ompi_coll_libnbc_ialltoallw_inter (const void* sendbuf, const int *sendcount
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -177,6 +201,27 @@ int ompi_coll_libnbc_ialltoallw_inter (const void* sendbuf, const int *sendcount
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_alltoallw_inter_init(sendbuf, sendcounts, sdispls, sendtypes,
|
||||
recvbuf, recvcounts, rdispls, recvtypes,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static inline int a2aw_sched_linear(int rank, int p, NBC_Schedule *schedule,
|
||||
const void *sendbuf, const int *sendcounts, const int *sdispls,
|
||||
struct ompi_datatype_t * const * sendtypes,
|
||||
@ -316,3 +361,29 @@ static inline int a2aw_sched_inplace(int rank, int p, NBC_Schedule *schedule,
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_alltoallw_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_alltoallw_inter_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_alltoallw_inter_init(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2015 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -21,22 +22,16 @@
|
||||
#include "nbc_internal.h"
|
||||
|
||||
/* 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_2_0_t *module)
|
||||
static int nbc_barrier_init(struct ompi_communicator_t *comm, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, p, maxround, res, recvpeer, sendpeer;
|
||||
NBC_Schedule *schedule;
|
||||
NBC_Handle *handle;
|
||||
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
|
||||
|
||||
rank = ompi_comm_rank (comm);
|
||||
p = ompi_comm_size (comm);
|
||||
|
||||
res = NBC_Init_handle(comm, &handle, libnbc_module);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifdef NBC_CACHE_SCHEDULE
|
||||
/* there only one argument set per communicator -> hang it directly at
|
||||
* the tree-position, NBC_Dict_size[...] is 0 for not initialized and
|
||||
@ -47,13 +42,9 @@ int ompi_coll_libnbc_ibarrier(struct ompi_communicator_t *comm, ompi_request_t *
|
||||
#endif
|
||||
schedule = OBJ_NEW(NBC_Schedule);
|
||||
if (OPAL_UNLIKELY(NULL == schedule)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
/* ensure the schedule is released with the handle on error */
|
||||
handle->schedule = schedule;
|
||||
|
||||
maxround = (int)ceil((log((double)p)/LOG2)-1);
|
||||
|
||||
for (int round = 0 ; round <= maxround ; ++round) {
|
||||
@ -64,86 +55,88 @@ int ompi_coll_libnbc_ibarrier(struct ompi_communicator_t *comm, ompi_request_t *
|
||||
/* send msg to sendpeer */
|
||||
res = NBC_Sched_send (NULL, false, 0, MPI_BYTE, sendpeer, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* recv msg from recvpeer */
|
||||
res = NBC_Sched_recv (NULL, false, 0, MPI_BYTE, recvpeer, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* end communication round */
|
||||
if (round < maxround) {
|
||||
res = NBC_Sched_barrier (schedule);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
res = NBC_Sched_commit (schedule);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifdef NBC_CACHE_SCHEDULE
|
||||
/* add it */
|
||||
libnbc_module->NBC_Dict[NBC_BARRIER] = (hb_tree *) schedule;
|
||||
libnbc_module->NBC_Dict_size[NBC_BARRIER] = 1;
|
||||
} else {
|
||||
/* we found it */
|
||||
handle->schedule = schedule = (NBC_Schedule *) libnbc_module->NBC_Dict[NBC_BARRIER];
|
||||
}
|
||||
OBJ_RETAIN(schedule);
|
||||
#endif
|
||||
|
||||
res = NBC_Start (handle, schedule);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
|
||||
*request = (ompi_request_t *) handle;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_ibarrier_inter(struct ompi_communicator_t *comm, ompi_request_t ** request,
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_barrier_init(comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_barrier_inter_init(struct ompi_communicator_t *comm, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, res, rsize;
|
||||
NBC_Schedule *schedule;
|
||||
NBC_Handle *handle;
|
||||
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
|
||||
|
||||
rank = ompi_comm_rank (comm);
|
||||
rsize = ompi_comm_remote_size (comm);
|
||||
|
||||
res = NBC_Init_handle(comm, &handle, libnbc_module);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
schedule = OBJ_NEW(NBC_Schedule);
|
||||
if (OPAL_UNLIKELY(NULL == schedule)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
/* ensure the schedule is released with the handle on error */
|
||||
handle->schedule = schedule;
|
||||
|
||||
if (0 == rank) {
|
||||
for (int peer = 1 ; peer < rsize ; ++peer) {
|
||||
res = NBC_Sched_recv (NULL, false, 0, MPI_BYTE, peer, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -151,47 +144,81 @@ int ompi_coll_libnbc_ibarrier_inter(struct ompi_communicator_t *comm, ompi_reque
|
||||
/* synchronize with the remote root */
|
||||
res = NBC_Sched_recv (NULL, false, 0, MPI_BYTE, 0, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Sched_send (NULL, false, 0, MPI_BYTE, 0, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
|
||||
if (0 == rank) {
|
||||
/* wait for the remote root */
|
||||
res = NBC_Sched_barrier (schedule);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* inform remote peers that all local peers have entered the barrier */
|
||||
for (int peer = 1; peer < rsize ; ++peer) {
|
||||
res = NBC_Sched_send (NULL, false, 0, MPI_BYTE, peer, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
res = NBC_Sched_commit (schedule);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start (handle, schedule);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle (handle);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
|
||||
*request = (ompi_request_t *) handle;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_ibarrier_inter(struct ompi_communicator_t *comm, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_barrier_inter_init(comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_barrier_init(struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_barrier_init(comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_barrier_inter_init(struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_barrier_inter_init(comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -44,9 +45,9 @@ int NBC_Bcast_args_compare(NBC_Bcast_args *a, NBC_Bcast_args *b, void *param) {
|
||||
}
|
||||
#endif
|
||||
|
||||
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_2_0_t *module)
|
||||
static int nbc_bcast_init(void *buffer, int count, MPI_Datatype datatype, int root,
|
||||
struct ompi_communicator_t *comm, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module, bool persistent)
|
||||
{
|
||||
int rank, p, res, segsize;
|
||||
size_t size;
|
||||
@ -61,8 +62,7 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int
|
||||
p = ompi_comm_size (comm);
|
||||
|
||||
if (1 == p) {
|
||||
*request = &ompi_request_empty;
|
||||
return OMPI_SUCCESS;
|
||||
return nbc_get_noop_request(persistent, request);
|
||||
}
|
||||
|
||||
res = ompi_datatype_type_size(datatype, &size);
|
||||
@ -162,7 +162,7 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -171,6 +171,25 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module)
|
||||
{
|
||||
int res = nbc_bcast_init(buffer, count, datatype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/* better binomial bcast
|
||||
* working principle:
|
||||
* - each node gets a virtual rank vrank
|
||||
@ -323,9 +342,9 @@ static inline int bcast_sched_chain(int rank, int p, int root, NBC_Schedule *sch
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_bcast_inter_init(void *buffer, int count, MPI_Datatype datatype, int root,
|
||||
struct ompi_communicator_t *comm, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module, bool persistent) {
|
||||
int res;
|
||||
NBC_Schedule *schedule;
|
||||
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
|
||||
@ -366,7 +385,7 @@ int ompi_coll_libnbc_ibcast_inter(void *buffer, int count, MPI_Datatype datatype
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -374,3 +393,46 @@ int ompi_coll_libnbc_ibcast_inter(void *buffer, int count, MPI_Datatype datatype
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_bcast_inter_init(buffer, count, datatype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_bcast_init(void *buffer, int count, MPI_Datatype datatype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_bcast_init(buffer, count, datatype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_bcast_inter_init(void *buffer, int count, MPI_Datatype datatype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_bcast_inter_init(buffer, count, datatype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -45,9 +46,9 @@ int NBC_Scan_args_compare(NBC_Scan_args *a, NBC_Scan_args *b, void *param) {
|
||||
* 3. all but rank p-1 do sends to it's right neigbor and exits
|
||||
*
|
||||
*/
|
||||
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_2_0_t *module) {
|
||||
static int nbc_exscan_init(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_3_0_t *module, bool persistent) {
|
||||
int rank, p, res;
|
||||
ptrdiff_t gap, span;
|
||||
NBC_Schedule *schedule;
|
||||
@ -63,23 +64,6 @@ int ompi_coll_libnbc_iexscan(const void* sendbuf, void* recvbuf, int count, MPI_
|
||||
rank = ompi_comm_rank (comm);
|
||||
p = ompi_comm_size (comm);
|
||||
|
||||
span = opal_datatype_span(&datatype->super, count, &gap);
|
||||
if (0 < rank) {
|
||||
tmpbuf = malloc(span);
|
||||
if (NULL == tmpbuf) {
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
if (inplace) {
|
||||
res = NBC_Copy(recvbuf, count, datatype, (char *)tmpbuf-gap, count, datatype, comm);
|
||||
} else {
|
||||
res = NBC_Copy(sendbuf, count, datatype, (char *)tmpbuf-gap, count, datatype, comm);
|
||||
}
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
free(tmpbuf);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NBC_CACHE_SCHEDULE
|
||||
/* search schedule in communicator specific tree */
|
||||
search.sendbuf = sendbuf;
|
||||
@ -97,6 +81,24 @@ int ompi_coll_libnbc_iexscan(const void* sendbuf, void* recvbuf, int count, MPI_
|
||||
}
|
||||
|
||||
if (rank != 0) {
|
||||
span = opal_datatype_span(&datatype->super, count, &gap);
|
||||
tmpbuf = malloc(span);
|
||||
if (NULL == tmpbuf) {
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
if (inplace) {
|
||||
res = NBC_Sched_copy(recvbuf, false, count, datatype,
|
||||
(char *)tmpbuf-gap, false, count, datatype, schedule, false);
|
||||
} else {
|
||||
res = NBC_Sched_copy((void *)sendbuf, false, count, datatype,
|
||||
(char *)tmpbuf-gap, false, count, datatype, schedule, false);
|
||||
}
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Sched_recv (recvbuf, false, count, datatype, rank-1, schedule, false);
|
||||
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
@ -182,7 +184,7 @@ int ompi_coll_libnbc_iexscan(const void* sendbuf, void* recvbuf, int count, MPI_
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -191,3 +193,34 @@ int ompi_coll_libnbc_iexscan(const void* sendbuf, void* recvbuf, int count, MPI_
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_exscan_init(sendbuf, recvbuf, count, datatype, op,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_exscan_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_exscan_init(sendbuf, recvbuf, count, datatype, op,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -43,10 +44,10 @@ int NBC_Gather_args_compare(NBC_Gather_args *a, NBC_Gather_args *b, void *param)
|
||||
}
|
||||
#endif
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_gather_init(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_3_0_t *module, bool persistent) {
|
||||
int rank, p, res;
|
||||
MPI_Aint rcvext = 0;
|
||||
NBC_Schedule *schedule;
|
||||
@ -70,13 +71,6 @@ int ompi_coll_libnbc_igather(const void* sendbuf, int sendcount, MPI_Datatype se
|
||||
if (inplace) {
|
||||
sendcount = recvcount;
|
||||
sendtype = recvtype;
|
||||
} else if (rank == root) {
|
||||
rbuf = ((char *)recvbuf) + (rank*recvcount*rcvext);
|
||||
/* if I am the root - just copy the message (only without MPI_IN_PLACE) */
|
||||
res = NBC_Copy(sendbuf, sendcount, sendtype, rbuf, recvcount, recvtype, comm);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NBC_CACHE_SCHEDULE
|
||||
@ -110,7 +104,17 @@ int ompi_coll_libnbc_igather(const void* sendbuf, int sendcount, MPI_Datatype se
|
||||
} else {
|
||||
for (int i = 0 ; i < p ; ++i) {
|
||||
rbuf = (char *)recvbuf + i * recvcount * rcvext;
|
||||
if (i != root) {
|
||||
if (i == root) {
|
||||
if (!inplace) {
|
||||
/* if I am the root - just copy the message */
|
||||
res = NBC_Sched_copy ((void *)sendbuf, false, sendcount, sendtype,
|
||||
rbuf, false, recvcount, recvtype, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* root receives message to the right buffer */
|
||||
res = NBC_Sched_recv (rbuf, false, recvcount, recvtype, i, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
@ -160,7 +164,7 @@ int ompi_coll_libnbc_igather(const void* sendbuf, int sendcount, MPI_Datatype se
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -169,10 +173,30 @@ int ompi_coll_libnbc_igather(const void* sendbuf, int sendcount, MPI_Datatype se
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_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_3_0_t *module) {
|
||||
int res = nbc_gather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_gather_inter_init (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_3_0_t *module, bool persistent) {
|
||||
int res, rsize;
|
||||
MPI_Aint rcvext = 0;
|
||||
NBC_Schedule *schedule;
|
||||
@ -220,7 +244,7 @@ int ompi_coll_libnbc_igather_inter (const void* sendbuf, int sendcount, MPI_Data
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -228,3 +252,49 @@ int ompi_coll_libnbc_igather_inter (const void* sendbuf, int sendcount, MPI_Data
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_gather_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_gather_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
|
||||
int recvcount, MPI_Datatype recvtype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_gather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_gather_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
|
||||
int recvcount, MPI_Datatype recvtype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_gather_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -28,10 +29,10 @@
|
||||
* would not be sufficient ... we simply do not cache it */
|
||||
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_gatherv_init(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_3_0_t *module, bool persistent) {
|
||||
int rank, p, res;
|
||||
MPI_Aint rcvext = 0;
|
||||
NBC_Schedule *schedule;
|
||||
@ -71,8 +72,8 @@ int ompi_coll_libnbc_igatherv(const void* sendbuf, int sendcount, MPI_Datatype s
|
||||
if (i == root) {
|
||||
if (!inplace) {
|
||||
/* if I am the root - just copy the message */
|
||||
res = NBC_Copy (sendbuf, sendcount, sendtype, rbuf, recvcounts[i], recvtype,
|
||||
comm);
|
||||
res = NBC_Sched_copy ((void *)sendbuf, false, sendcount, sendtype,
|
||||
rbuf, false, recvcounts[i], recvtype, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -95,7 +96,7 @@ int ompi_coll_libnbc_igatherv(const void* sendbuf, int sendcount, MPI_Datatype s
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -104,10 +105,30 @@ int ompi_coll_libnbc_igatherv(const void* sendbuf, int sendcount, MPI_Datatype s
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_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_3_0_t *module) {
|
||||
int res = nbc_gatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_gatherv_inter_init (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_3_0_t *module, bool persistent) {
|
||||
int res, rsize;
|
||||
MPI_Aint rcvext;
|
||||
NBC_Schedule *schedule;
|
||||
@ -155,7 +176,7 @@ int ompi_coll_libnbc_igatherv_inter (const void* sendbuf, int sendcount, MPI_Dat
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -163,3 +184,49 @@ int ompi_coll_libnbc_igatherv_inter (const void* sendbuf, int sendcount, MPI_Dat
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_gatherv_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_gatherv_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_gatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_gatherv_inter_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_gatherv_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -43,9 +44,10 @@ int NBC_Ineighbor_allgather_args_compare(NBC_Ineighbor_allgather_args *a, NBC_In
|
||||
#endif
|
||||
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_neighbor_allgather_init(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_3_0_t *module, bool persistent) {
|
||||
int res, indegree, outdegree, *srcs, *dsts;
|
||||
MPI_Aint rcvext;
|
||||
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
|
||||
@ -152,7 +154,7 @@ int ompi_coll_libnbc_ineighbor_allgather(const void *sbuf, int scount, MPI_Datat
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -160,3 +162,185 @@ int ompi_coll_libnbc_ineighbor_allgather(const void *sbuf, int scount, MPI_Datat
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_neighbor_allgather_init(sbuf, scount, stype, rbuf, rcount, rtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/* better binomial bcast
|
||||
* working principle:
|
||||
* - each node gets a virtual rank vrank
|
||||
* - the 'root' node get vrank 0
|
||||
* - node 0 gets the vrank of the 'root'
|
||||
* - all other ranks stay identical (they do not matter)
|
||||
*
|
||||
* Algorithm:
|
||||
* - each node with vrank > 2^r and vrank < 2^r+1 receives from node
|
||||
* vrank - 2^r (vrank=1 receives from 0, vrank 0 receives never)
|
||||
* - each node sends each round r to node vrank + 2^r
|
||||
* - a node stops to send if 2^r > commsize
|
||||
*/
|
||||
#define RANK2VRANK(rank, vrank, root) \
|
||||
{ \
|
||||
vrank = rank; \
|
||||
if (rank == 0) vrank = root; \
|
||||
if (rank == root) vrank = 0; \
|
||||
}
|
||||
#define VRANK2RANK(rank, vrank, root) \
|
||||
{ \
|
||||
rank = vrank; \
|
||||
if (vrank == 0) rank = root; \
|
||||
if (vrank == root) rank = 0; \
|
||||
}
|
||||
static inline int bcast_sched_binomial(int rank, int p, int root, NBC_Schedule *schedule, void *buffer, int count, MPI_Datatype datatype) {
|
||||
int maxr, vrank, peer, res;
|
||||
|
||||
maxr = (int)ceil((log((double)p)/LOG2));
|
||||
|
||||
RANK2VRANK(rank, vrank, root);
|
||||
|
||||
/* receive from the right hosts */
|
||||
if (vrank != 0) {
|
||||
for (int r = 0 ; r < maxr ; ++r) {
|
||||
if ((vrank >= (1 << r)) && (vrank < (1 << (r + 1)))) {
|
||||
VRANK2RANK(peer, vrank - (1 << r), root);
|
||||
res = NBC_Sched_recv (buffer, false, count, datatype, peer, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
res = NBC_Sched_barrier (schedule);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
/* now send to the right hosts */
|
||||
for (int r = 0 ; r < maxr ; ++r) {
|
||||
if (((vrank + (1 << r) < p) && (vrank < (1 << r))) || (vrank == 0)) {
|
||||
VRANK2RANK(peer, vrank + (1 << r), root);
|
||||
res = NBC_Sched_send (buffer, false, count, datatype, peer, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/* simple linear MPI_Ibcast */
|
||||
static inline int bcast_sched_linear(int rank, int p, int root, NBC_Schedule *schedule, void *buffer, int count, MPI_Datatype datatype) {
|
||||
int res;
|
||||
|
||||
/* send to all others */
|
||||
if(rank == root) {
|
||||
for (int peer = 0 ; peer < p ; ++peer) {
|
||||
if (peer != root) {
|
||||
/* send msg to peer */
|
||||
res = NBC_Sched_send (buffer, false, count, datatype, peer, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* recv msg from root */
|
||||
res = NBC_Sched_recv (buffer, false, count, datatype, root, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/* simple chained MPI_Ibcast */
|
||||
static inline int bcast_sched_chain(int rank, int p, int root, NBC_Schedule *schedule, void *buffer, int count, MPI_Datatype datatype, int fragsize, size_t size) {
|
||||
int res, vrank, rpeer, speer, numfrag, fragcount, thiscount;
|
||||
MPI_Aint ext;
|
||||
char *buf;
|
||||
|
||||
RANK2VRANK(rank, vrank, root);
|
||||
VRANK2RANK(rpeer, vrank-1, root);
|
||||
VRANK2RANK(speer, vrank+1, root);
|
||||
res = ompi_datatype_type_extent(datatype, &ext);
|
||||
if (MPI_SUCCESS != res) {
|
||||
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
if (count == 0) {
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
numfrag = count * size/fragsize;
|
||||
if ((count * size) % fragsize != 0) {
|
||||
numfrag++;
|
||||
}
|
||||
|
||||
fragcount = count/numfrag;
|
||||
|
||||
for (int fragnum = 0 ; fragnum < numfrag ; ++fragnum) {
|
||||
buf = (char *) buffer + fragnum * fragcount * ext;
|
||||
thiscount = fragcount;
|
||||
if (fragnum == numfrag-1) {
|
||||
/* last fragment may not be full */
|
||||
thiscount = count - fragcount * fragnum;
|
||||
}
|
||||
|
||||
/* root does not receive */
|
||||
if (vrank != 0) {
|
||||
res = NBC_Sched_recv (buf, false, thiscount, datatype, rpeer, schedule, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
/* last rank does not send */
|
||||
if (vrank != p-1) {
|
||||
res = NBC_Sched_send (buf, false, thiscount, datatype, speer, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
/* this barrier here seems awaward but isn't!!!! */
|
||||
if (vrank == 0) {
|
||||
res = NBC_Sched_barrier (schedule);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_neighbor_allgather_init(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf,
|
||||
int rcount, MPI_Datatype rtype, struct ompi_communicator_t *comm,
|
||||
MPI_Info info, ompi_request_t ** request, struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_neighbor_allgather_init(sbuf, scount, stype, rbuf, rcount, rtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -43,10 +44,10 @@ int NBC_Ineighbor_allgatherv_args_compare(NBC_Ineighbor_allgatherv_args *a, NBC_
|
||||
#endif
|
||||
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_neighbor_allgatherv_init(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_3_0_t *module, bool persistent) {
|
||||
int res, indegree, outdegree, *srcs, *dsts;
|
||||
MPI_Aint rcvext;
|
||||
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
|
||||
@ -154,7 +155,7 @@ int ompi_coll_libnbc_ineighbor_allgatherv(const void *sbuf, int scount, MPI_Data
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -162,3 +163,35 @@ int ompi_coll_libnbc_ineighbor_allgatherv(const void *sbuf, int scount, MPI_Data
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_neighbor_allgatherv_init(sbuf, scount, stype, rbuf, rcounts, displs, rtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_neighbor_allgatherv_init(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf,
|
||||
const int *rcounts, const int *displs, MPI_Datatype rtype,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_neighbor_allgatherv_init(sbuf, scount, stype, rbuf, rcounts, displs, rtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,9 +41,10 @@ int NBC_Ineighbor_alltoall_args_compare(NBC_Ineighbor_alltoall_args *a, NBC_Inei
|
||||
}
|
||||
#endif
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_neighbor_alltoall_init(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_3_0_t *module, bool persistent) {
|
||||
int res, indegree, outdegree, *srcs, *dsts;
|
||||
MPI_Aint sndext, rcvext;
|
||||
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
|
||||
@ -156,7 +158,7 @@ int ompi_coll_libnbc_ineighbor_alltoall(const void *sbuf, int scount, MPI_Dataty
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -164,3 +166,33 @@ int ompi_coll_libnbc_ineighbor_alltoall(const void *sbuf, int scount, MPI_Dataty
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_neighbor_alltoall_init(sbuf, scount, stype, rbuf, rcount, rtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_neighbor_alltoall_init(const void *sbuf, int scount, MPI_Datatype stype, void *rbuf,
|
||||
int rcount, MPI_Datatype rtype, struct ompi_communicator_t *comm, MPI_Info info,
|
||||
ompi_request_t ** request, struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_neighbor_alltoall_init(sbuf, scount, stype, rbuf, rcount, rtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -43,10 +44,10 @@ int NBC_Ineighbor_alltoallv_args_compare(NBC_Ineighbor_alltoallv_args *a, NBC_In
|
||||
#endif
|
||||
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_neighbor_alltoallv_init(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_3_0_t *module, bool persistent) {
|
||||
int res, indegree, outdegree, *srcs, *dsts;
|
||||
MPI_Aint sndext, rcvext;
|
||||
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
|
||||
@ -161,7 +162,7 @@ int ompi_coll_libnbc_ineighbor_alltoallv(const void *sbuf, const int *scounts, c
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -169,3 +170,35 @@ int ompi_coll_libnbc_ineighbor_alltoallv(const void *sbuf, const int *scounts, c
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_neighbor_alltoallv_init(sbuf, scounts, sdispls, stype, rbuf, rcounts, rdispls, rtype,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_neighbor_alltoallv_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_neighbor_alltoallv_init(sbuf, scounts, sdispls, stype, rbuf, rcounts, rdispls, rtype,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -42,10 +43,10 @@ int NBC_Ineighbor_alltoallw_args_compare(NBC_Ineighbor_alltoallw_args *a, NBC_In
|
||||
}
|
||||
#endif
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_neighbor_alltoallw_init(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_3_0_t *module, bool persistent) {
|
||||
int res, indegree, outdegree, *srcs, *dsts;
|
||||
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
|
||||
NBC_Schedule *schedule;
|
||||
@ -146,7 +147,7 @@ int ompi_coll_libnbc_ineighbor_alltoallw(const void *sbuf, const int *scounts, c
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -154,3 +155,35 @@ int ompi_coll_libnbc_ineighbor_alltoallw(const void *sbuf, const int *scounts, c
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_neighbor_alltoallw_init(sbuf, scounts, sdisps, stypes, rbuf, rcounts, rdisps, rtypes,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_neighbor_alltoallw_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_neighbor_alltoallw_init(sbuf, scounts, sdisps, stypes, rbuf, rcounts, rdisps, rtypes,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -14,7 +14,10 @@
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*/
|
||||
#ifndef __NBC_INTERNAL_H__
|
||||
#define __NBC_INTERNAL_H__
|
||||
@ -259,9 +262,10 @@ void NBC_SchedCache_args_delete_key_dummy(void *k);
|
||||
#endif
|
||||
|
||||
|
||||
int NBC_Start(NBC_Handle *handle, NBC_Schedule *schedule);
|
||||
int NBC_Init_handle(struct ompi_communicator_t *comm, ompi_coll_libnbc_request_t **request, ompi_coll_libnbc_module_t *module);
|
||||
int NBC_Schedule_request(NBC_Schedule *schedule, ompi_communicator_t *comm, ompi_coll_libnbc_module_t *module, ompi_request_t **request, void *tmpbuf);
|
||||
int NBC_Start(NBC_Handle *handle);
|
||||
int NBC_Schedule_request(NBC_Schedule *schedule, ompi_communicator_t *comm,
|
||||
ompi_coll_libnbc_module_t *module, bool persistent,
|
||||
ompi_request_t **request, void *tmpbuf);
|
||||
void NBC_Return_handle(ompi_coll_libnbc_request_t *request);
|
||||
static inline int NBC_Type_intrinsic(MPI_Datatype type);
|
||||
int NBC_Create_fortran_handle(int *fhandle, NBC_Handle **handle);
|
||||
@ -365,6 +369,16 @@ static inline void nbc_schedule_inc_round (NBC_Schedule *schedule) {
|
||||
memcpy (lastround, &last_round_num, sizeof (last_round_num));
|
||||
}
|
||||
|
||||
/* returns a no-operation request (e.g. for one process barrier) */
|
||||
static inline int nbc_get_noop_request(bool persistent, ompi_request_t **request) {
|
||||
if (persistent) {
|
||||
return ompi_request_persistent_noop_create(request);
|
||||
} else {
|
||||
*request = &ompi_request_empty;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
/* NBC_PRINT_ROUND prints a round in a schedule. A round has the format:
|
||||
* [num]{[type][type-args]} types: [int]{[enum][args-type]}
|
||||
* e.g. [2][SEND][SEND-ARGS][RECV][RECV-ARGS] */
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -52,9 +53,9 @@ int NBC_Reduce_args_compare(NBC_Reduce_args *a, NBC_Reduce_args *b, void *param)
|
||||
#endif
|
||||
|
||||
/* 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_2_0_t *module) {
|
||||
static int nbc_reduce_init(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_3_0_t *module, bool persistent) {
|
||||
int rank, p, res, segsize;
|
||||
size_t size;
|
||||
MPI_Aint ext;
|
||||
@ -84,15 +85,14 @@ int ompi_coll_libnbc_ireduce(const void* sendbuf, void* recvbuf, int count, MPI_
|
||||
}
|
||||
|
||||
/* only one node -> copy data */
|
||||
if (p == 1) {
|
||||
if (1 == p && (!persistent || inplace)) {
|
||||
if (!inplace) {
|
||||
res = NBC_Copy (sendbuf, count, datatype, recvbuf, count, datatype, comm);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
*request = &ompi_request_empty;
|
||||
return OMPI_SUCCESS;
|
||||
return nbc_get_noop_request(persistent, request);
|
||||
}
|
||||
|
||||
span = opal_datatype_span(&datatype->super, count, &gap);
|
||||
@ -140,13 +140,18 @@ int ompi_coll_libnbc_ireduce(const void* sendbuf, void* recvbuf, int count, MPI_
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
switch(alg) {
|
||||
case NBC_RED_BINOMIAL:
|
||||
res = red_sched_binomial(rank, p, root, sendbuf, redbuf, tmpredbuf, count, datatype, op, inplace, schedule, tmpbuf);
|
||||
break;
|
||||
case NBC_RED_CHAIN:
|
||||
res = red_sched_chain(rank, p, root, sendbuf, recvbuf, count, datatype, op, ext, size, schedule, tmpbuf, segsize);
|
||||
break;
|
||||
if (p == 1) {
|
||||
res = NBC_Sched_copy ((void *)sendbuf, false, count, datatype,
|
||||
recvbuf, false, count, datatype, schedule, false);
|
||||
} else {
|
||||
switch(alg) {
|
||||
case NBC_RED_BINOMIAL:
|
||||
res = red_sched_binomial(rank, p, root, sendbuf, redbuf, tmpredbuf, count, datatype, op, inplace, schedule, tmpbuf);
|
||||
break;
|
||||
case NBC_RED_CHAIN:
|
||||
res = red_sched_chain(rank, p, root, sendbuf, recvbuf, count, datatype, op, ext, size, schedule, tmpbuf, segsize);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
@ -193,7 +198,7 @@ int ompi_coll_libnbc_ireduce(const void* sendbuf, void* recvbuf, int count, MPI_
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -203,9 +208,27 @@ int ompi_coll_libnbc_ireduce(const void* sendbuf, void* recvbuf, int count, MPI_
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_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_3_0_t *module) {
|
||||
int res = nbc_reduce_init(sendbuf, recvbuf, count, datatype, op, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_reduce_inter_init(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_3_0_t *module, bool persistent) {
|
||||
int rank, res, rsize;
|
||||
NBC_Schedule *schedule;
|
||||
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
|
||||
@ -241,7 +264,7 @@ int ompi_coll_libnbc_ireduce_inter(const void* sendbuf, void* recvbuf, int count
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -251,6 +274,24 @@ int ompi_coll_libnbc_ireduce_inter(const void* sendbuf, void* recvbuf, int count
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_reduce_inter_init(sendbuf, recvbuf, count, datatype, op, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* binomial reduce
|
||||
* if op is not commutative, reduce on rank 0, and then send the result to root rank
|
||||
@ -315,7 +356,9 @@ static inline int red_sched_binomial (int rank, int p, int root, const void *sen
|
||||
rbuf = redbuf;
|
||||
tmprbuf = tmpredbuf;
|
||||
if (inplace) {
|
||||
res = NBC_Copy(rbuf, count, datatype, ((char *)tmpbuf)-gap, count, datatype, MPI_COMM_SELF);
|
||||
res = NBC_Sched_copy(rbuf, false, count, datatype,
|
||||
((char *)tmpbuf)-gap, false, count, datatype,
|
||||
schedule, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
@ -516,3 +559,27 @@ static inline int red_sched_linear (int rank, int rsize, int root, const void *s
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_reduce_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
|
||||
MPI_Op op, int root, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_reduce_init(sendbuf, recvbuf, count, datatype, op, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_reduce_inter_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
|
||||
MPI_Op op, int root, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_reduce_inter_init(sendbuf, recvbuf, count, datatype, op, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -41,9 +42,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_reduce_scatter_init(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_3_0_t *module, bool persistent) {
|
||||
int peer, rank, maxr, p, res, count;
|
||||
MPI_Aint ext;
|
||||
ptrdiff_t gap, span, span_align;
|
||||
@ -69,7 +70,7 @@ int ompi_coll_libnbc_ireduce_scatter(const void* sendbuf, void* recvbuf, const i
|
||||
count += recvcounts[r];
|
||||
}
|
||||
|
||||
if (p == 1 || 0 == count) {
|
||||
if ((1 == p && (!persistent || inplace)) || 0 == count) {
|
||||
if (!inplace) {
|
||||
/* single node not in_place: copy data to recvbuf */
|
||||
res = NBC_Copy(sendbuf, recvcounts[0], datatype, recvbuf, recvcounts[0], datatype, comm);
|
||||
@ -78,8 +79,7 @@ int ompi_coll_libnbc_ireduce_scatter(const void* sendbuf, void* recvbuf, const i
|
||||
}
|
||||
}
|
||||
|
||||
*request = &ompi_request_empty;
|
||||
return OMPI_SUCCESS;
|
||||
return nbc_get_noop_request(persistent, request);
|
||||
}
|
||||
|
||||
maxr = (int) ceil ((log((double) p) / LOG2));
|
||||
@ -174,8 +174,14 @@ int ompi_coll_libnbc_ireduce_scatter(const void* sendbuf, void* recvbuf, const i
|
||||
}
|
||||
}
|
||||
|
||||
res = NBC_Sched_copy (lbuf, true, recvcounts[0], datatype, recvbuf, false,
|
||||
recvcounts[0], datatype, schedule, false);
|
||||
if (p == 1) {
|
||||
/* single node not in_place: copy data to recvbuf */
|
||||
res = NBC_Sched_copy ((void *)sendbuf, false, recvcounts[0], datatype,
|
||||
recvbuf, false, recvcounts[0], datatype, schedule, false);
|
||||
} else {
|
||||
res = NBC_Sched_copy (lbuf, true, recvcounts[0], datatype, recvbuf, false,
|
||||
recvcounts[0], datatype, schedule, false);
|
||||
}
|
||||
} else {
|
||||
res = NBC_Sched_recv (recvbuf, false, recvcounts[rank], datatype, 0, schedule, false);
|
||||
}
|
||||
@ -193,7 +199,7 @@ int ompi_coll_libnbc_ireduce_scatter(const void* sendbuf, void* recvbuf, const i
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -203,9 +209,26 @@ int ompi_coll_libnbc_ireduce_scatter(const void* sendbuf, void* recvbuf, const i
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_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_3_0_t *module) {
|
||||
int res = nbc_reduce_scatter_init(sendbuf, recvbuf, recvcounts, datatype, op,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
static int nbc_reduce_scatter_inter_init (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_3_0_t *module, bool persistent) {
|
||||
int rank, res, count, lsize, rsize;
|
||||
MPI_Aint ext;
|
||||
ptrdiff_t gap, span, span_align;
|
||||
@ -318,7 +341,7 @@ int ompi_coll_libnbc_ireduce_scatter_inter (const void* sendbuf, void* recvbuf,
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -327,3 +350,45 @@ int ompi_coll_libnbc_ireduce_scatter_inter (const void* sendbuf, void* recvbuf,
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_reduce_scatter_inter_init(sendbuf, recvbuf, recvcounts, datatype, op,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_reduce_scatter_init(const void* sendbuf, void* recvbuf, const int *recvcounts, MPI_Datatype datatype,
|
||||
MPI_Op op, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_reduce_scatter_init(sendbuf, recvbuf, recvcounts, datatype, op,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_reduce_scatter_inter_init(const void* sendbuf, void* recvbuf, const int *recvcounts, MPI_Datatype datatype,
|
||||
MPI_Op op, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_reduce_scatter_inter_init(sendbuf, recvbuf, recvcounts, datatype, op,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -39,9 +40,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
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_2_0_t *module) {
|
||||
static int nbc_reduce_scatter_block_init(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_3_0_t *module, bool persistent) {
|
||||
int peer, rank, maxr, p, res, count;
|
||||
MPI_Aint ext;
|
||||
ptrdiff_t gap, span;
|
||||
@ -88,7 +89,8 @@ int ompi_coll_libnbc_ireduce_scatter_block(const void* sendbuf, void* recvbuf, i
|
||||
|
||||
/* copy data to redbuf if we only have a single node */
|
||||
if ((p == 1) && !inplace) {
|
||||
res = NBC_Copy (sendbuf, count, datatype, redbuf, count, datatype, comm);
|
||||
res = NBC_Sched_copy ((void *)sendbuf, false, count, datatype,
|
||||
redbuf, false, count, datatype, schedule, false);
|
||||
if (OMPI_SUCCESS != res) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -195,7 +197,7 @@ int ompi_coll_libnbc_ireduce_scatter_block(const void* sendbuf, void* recvbuf, i
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -205,9 +207,27 @@ int ompi_coll_libnbc_ireduce_scatter_block(const void* sendbuf, void* recvbuf, i
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_2_0_t *module) {
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_reduce_scatter_block_init(sendbuf, recvbuf, recvcount, datatype, op,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_reduce_scatter_block_inter_init(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_3_0_t *module, bool persistent) {
|
||||
int rank, res, count, lsize, rsize;
|
||||
MPI_Aint ext;
|
||||
ptrdiff_t gap, span, span_align;
|
||||
@ -316,7 +336,7 @@ int ompi_coll_libnbc_ireduce_scatter_block_inter(const void *sendbuf, void *recv
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -325,3 +345,45 @@ int ompi_coll_libnbc_ireduce_scatter_block_inter(const void *sendbuf, void *recv
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_ireduce_scatter_block_inter(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_3_0_t *module) {
|
||||
int res = nbc_reduce_scatter_block_inter_init(sendbuf, recvbuf, recvcount, datatype, op,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_reduce_scatter_block_init(const void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype,
|
||||
MPI_Op op, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_reduce_scatter_block_init(sendbuf, recvbuf, recvcount, datatype, op,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_reduce_scatter_block_inter_init(const void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype,
|
||||
MPI_Op op, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_reduce_scatter_block_inter_init(sendbuf, recvbuf, recvcount, datatype, op,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -45,9 +46,9 @@ int NBC_Scan_args_compare(NBC_Scan_args *a, NBC_Scan_args *b, void *param) {
|
||||
* 3. all but rank p-1 do sends to it's right neighbor and exits
|
||||
*
|
||||
*/
|
||||
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_2_0_t *module) {
|
||||
static int nbc_scan_init(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_3_0_t *module, bool persistent) {
|
||||
int rank, p, res;
|
||||
ptrdiff_t gap, span;
|
||||
NBC_Schedule *schedule;
|
||||
@ -60,14 +61,6 @@ int ompi_coll_libnbc_iscan(const void* sendbuf, void* recvbuf, int count, MPI_Da
|
||||
rank = ompi_comm_rank (comm);
|
||||
p = ompi_comm_size (comm);
|
||||
|
||||
if (!inplace) {
|
||||
/* copy data to receivebuf */
|
||||
res = NBC_Copy (sendbuf, count, datatype, recvbuf, count, datatype, comm);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NBC_CACHE_SCHEDULE
|
||||
NBC_Scan_args *args, *found, search;
|
||||
|
||||
@ -85,6 +78,16 @@ int ompi_coll_libnbc_iscan(const void* sendbuf, void* recvbuf, int count, MPI_Da
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
if (!inplace) {
|
||||
/* copy data to receivebuf */
|
||||
res = NBC_Sched_copy ((void *)sendbuf, false, count, datatype,
|
||||
recvbuf, false, count, datatype, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
if(rank != 0) {
|
||||
span = opal_datatype_span(&datatype->super, count, &gap);
|
||||
tmpbuf = malloc (span);
|
||||
@ -159,7 +162,7 @@ int ompi_coll_libnbc_iscan(const void* sendbuf, void* recvbuf, int count, MPI_Da
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, tmpbuf);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, tmpbuf);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
free(tmpbuf);
|
||||
@ -168,3 +171,33 @@ int ompi_coll_libnbc_iscan(const void* sendbuf, void* recvbuf, int count, MPI_Da
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_scan_init(sendbuf, recvbuf, count, datatype, op,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_scan_init(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_scan_init(sendbuf, recvbuf, count, datatype, op,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -44,10 +45,10 @@ int NBC_Scatter_args_compare(NBC_Scatter_args *a, NBC_Scatter_args *b, void *par
|
||||
#endif
|
||||
|
||||
/* simple linear MPI_Iscatter */
|
||||
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_2_0_t *module) {
|
||||
static int nbc_scatter_init (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_3_0_t *module, bool persistent) {
|
||||
int rank, p, res;
|
||||
MPI_Aint sndext = 0;
|
||||
NBC_Schedule *schedule;
|
||||
@ -69,15 +70,6 @@ int ompi_coll_libnbc_iscatter (const void* sendbuf, int sendcount, MPI_Datatype
|
||||
}
|
||||
}
|
||||
|
||||
if ((rank == root) && (!inplace)) {
|
||||
sbuf = (char *) sendbuf + rank * sendcount * sndext;
|
||||
/* if I am the root - just copy the message (not for MPI_IN_PLACE) */
|
||||
res = NBC_Copy (sbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NBC_CACHE_SCHEDULE
|
||||
NBC_Scatter_args *args, *found, search;
|
||||
|
||||
@ -108,7 +100,17 @@ int ompi_coll_libnbc_iscatter (const void* sendbuf, int sendcount, MPI_Datatype
|
||||
} else {
|
||||
for (int i = 0 ; i < p ; ++i) {
|
||||
sbuf = (char *) sendbuf + i * sendcount * sndext;
|
||||
if (i != root) {
|
||||
if (i == root) {
|
||||
if (!inplace) {
|
||||
/* if I am the root - just copy the message */
|
||||
res = NBC_Sched_copy (sbuf, false, sendcount, sendtype,
|
||||
recvbuf, false, recvcount, recvtype, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* root sends the right buffer to the right receiver */
|
||||
res = NBC_Sched_send (sbuf, false, sendcount, sendtype, i, schedule, false);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
@ -157,7 +159,7 @@ int ompi_coll_libnbc_iscatter (const void* sendbuf, int sendcount, MPI_Datatype
|
||||
}
|
||||
#endif
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -166,10 +168,29 @@ int ompi_coll_libnbc_iscatter (const void* sendbuf, int sendcount, MPI_Datatype
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_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_3_0_t *module) {
|
||||
int res = nbc_scatter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_scatter_inter_init (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_3_0_t *module, bool persistent) {
|
||||
int res, rsize;
|
||||
MPI_Aint sndext;
|
||||
NBC_Schedule *schedule;
|
||||
@ -217,7 +238,7 @@ int ompi_coll_libnbc_iscatter_inter (const void* sendbuf, int sendcount, MPI_Dat
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -225,3 +246,48 @@ int ompi_coll_libnbc_iscatter_inter (const void* sendbuf, int sendcount, MPI_Dat
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_scatter_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_scatter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
void* recvbuf, int recvcount, MPI_Datatype recvtype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_scatter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_scatter_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
void* recvbuf, int recvcount, MPI_Datatype recvtype, int root,
|
||||
struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_scatter_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -27,10 +28,10 @@
|
||||
* would not be sufficient ... we simply do not cache it */
|
||||
|
||||
/* simple linear MPI_Iscatterv */
|
||||
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_2_0_t *module) {
|
||||
static int nbc_scatterv_init(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_3_0_t *module, bool persistent) {
|
||||
int rank, p, res;
|
||||
MPI_Aint sndext;
|
||||
NBC_Schedule *schedule;
|
||||
@ -63,7 +64,8 @@ int ompi_coll_libnbc_iscatterv(const void* sendbuf, const int *sendcounts, const
|
||||
if (i == root) {
|
||||
if (!inplace) {
|
||||
/* if I am the root - just copy the message */
|
||||
res = NBC_Copy (sbuf, sendcounts[i], sendtype, recvbuf, recvcount, recvtype, comm);
|
||||
res = NBC_Sched_copy (sbuf, false, sendcounts[i], sendtype,
|
||||
recvbuf, false, recvcount, recvtype, schedule, false);
|
||||
} else {
|
||||
res = OMPI_SUCCESS;
|
||||
}
|
||||
@ -92,7 +94,7 @@ int ompi_coll_libnbc_iscatterv(const void* sendbuf, const int *sendcounts, const
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -101,10 +103,29 @@ int ompi_coll_libnbc_iscatterv(const void* sendbuf, const int *sendcounts, const
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_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_3_0_t *module) {
|
||||
int res = nbc_scatterv_init(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int nbc_scatterv_inter_init (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_3_0_t *module, bool persistent) {
|
||||
int res, rsize;
|
||||
MPI_Aint sndext;
|
||||
NBC_Schedule *schedule;
|
||||
@ -151,7 +172,7 @@ int ompi_coll_libnbc_iscatterv_inter (const void* sendbuf, const int *sendcounts
|
||||
return res;
|
||||
}
|
||||
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, request, NULL);
|
||||
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
OBJ_RELEASE(schedule);
|
||||
return res;
|
||||
@ -159,3 +180,48 @@ int ompi_coll_libnbc_iscatterv_inter (const void* sendbuf, const int *sendcounts
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
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_3_0_t *module) {
|
||||
int res = nbc_scatterv_inter_init(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, false);
|
||||
if (OPAL_LIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
NBC_Return_handle ((ompi_coll_libnbc_request_t *)request);
|
||||
*request = &ompi_request_null.request;
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_scatterv_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_scatterv_init(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_coll_libnbc_scatterv_inter_init(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, MPI_Info info, ompi_request_t ** request,
|
||||
struct mca_coll_base_module_2_3_0_t *module) {
|
||||
int res = nbc_scatterv_inter_init(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root,
|
||||
comm, request, module, true);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -206,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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_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_2_0_t *module);
|
||||
struct mca_coll_base_module_2_3_0_t *module);
|
||||
int
|
||||
ompi_coll_portals4_iallreduce_intra_fini(struct ompi_coll_portals4_request_t *request);
|
||||
|
||||
|
@ -360,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_2_0_t *module)
|
||||
struct mca_coll_base_module_2_3_0_t *module)
|
||||
{
|
||||
mca_coll_portals4_module_t *portals4_module = (mca_coll_portals4_module_t*) module;
|
||||
ompi_coll_portals4_request_t *request;
|
||||
@ -390,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_2_0_t *module)
|
||||
struct mca_coll_base_module_2_3_0_t *module)
|
||||
{
|
||||
mca_coll_portals4_module_t *portals4_module = (mca_coll_portals4_module_t*) module;
|
||||
ompi_coll_portals4_request_t *request;
|
||||
|
@ -269,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_2_0_t *module)
|
||||
struct mca_coll_base_module_2_3_0_t *module)
|
||||
{
|
||||
int ret;
|
||||
mca_coll_portals4_module_t *portals4_module = (mca_coll_portals4_module_t*) module;
|
||||
|
@ -402,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_2_0_t *module)
|
||||
struct mca_coll_base_module_2_3_0_t *module)
|
||||
{
|
||||
int ret;
|
||||
mca_coll_portals4_module_t *portals4_module = (mca_coll_portals4_module_t*) module;
|
||||
|
@ -15,6 +15,7 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -74,16 +75,8 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype type,
|
||||
}
|
||||
|
||||
if (MPI_PROC_NULL == dest) {
|
||||
*request = OBJ_NEW(ompi_request_t);
|
||||
/* Other fields were initialized by the constructor for
|
||||
ompi_request_t */
|
||||
(*request)->req_type = OMPI_REQUEST_NOOP;
|
||||
(*request)->req_status = ompi_request_empty.req_status;
|
||||
(*request)->req_complete = REQUEST_COMPLETED;
|
||||
(*request)->req_state = OMPI_REQUEST_INACTIVE;
|
||||
(*request)->req_persistent = true;
|
||||
(*request)->req_free = ompi_request_persistent_proc_null_free;
|
||||
return MPI_SUCCESS;
|
||||
rc = ompi_request_persistent_noop_create(request);
|
||||
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
|
||||
}
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
@ -12,6 +12,7 @@
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -70,16 +71,8 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype type, int source,
|
||||
}
|
||||
|
||||
if (MPI_PROC_NULL == source) {
|
||||
*request = OBJ_NEW(ompi_request_t);
|
||||
/* Other fields were initialized by the constructor for
|
||||
ompi_request_t */
|
||||
(*request)->req_type = OMPI_REQUEST_NOOP;
|
||||
(*request)->req_status = ompi_request_empty.req_status;
|
||||
(*request)->req_complete = REQUEST_COMPLETED;
|
||||
(*request)->req_state = OMPI_REQUEST_INACTIVE;
|
||||
(*request)->req_persistent = true;
|
||||
(*request)->req_free = ompi_request_persistent_proc_null_free;
|
||||
return MPI_SUCCESS;
|
||||
rc = ompi_request_persistent_noop_create(request);
|
||||
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
|
||||
}
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
@ -15,6 +15,7 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -75,16 +76,8 @@ int MPI_Rsend_init(const void *buf, int count, MPI_Datatype type,
|
||||
}
|
||||
|
||||
if (MPI_PROC_NULL == dest) {
|
||||
*request = OBJ_NEW(ompi_request_t);
|
||||
/* Other fields were initialized by the constructor for
|
||||
ompi_request_t */
|
||||
(*request)->req_type = OMPI_REQUEST_NOOP;
|
||||
(*request)->req_status = ompi_request_empty.req_status;
|
||||
(*request)->req_complete = REQUEST_COMPLETED;
|
||||
(*request)->req_state = OMPI_REQUEST_INACTIVE;
|
||||
(*request)->req_persistent = true;
|
||||
(*request)->req_free = ompi_request_persistent_proc_null_free;
|
||||
return MPI_SUCCESS;
|
||||
rc = ompi_request_persistent_noop_create(request);
|
||||
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
|
||||
}
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
@ -15,6 +15,7 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -75,16 +76,8 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype type,
|
||||
}
|
||||
|
||||
if (MPI_PROC_NULL == dest) {
|
||||
*request = OBJ_NEW(ompi_request_t);
|
||||
/* Other fields were initialized by the constructor for
|
||||
ompi_request_t */
|
||||
(*request)->req_type = OMPI_REQUEST_NOOP;
|
||||
(*request)->req_status = ompi_request_empty.req_status;
|
||||
(*request)->req_complete = REQUEST_COMPLETED;
|
||||
(*request)->req_state = OMPI_REQUEST_INACTIVE;
|
||||
(*request)->req_persistent = true;
|
||||
(*request)->req_free = ompi_request_persistent_proc_null_free;
|
||||
return MPI_SUCCESS;
|
||||
rc = ompi_request_persistent_noop_create(request);
|
||||
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
|
||||
}
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
@ -15,6 +15,7 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -75,16 +76,8 @@ int MPI_Ssend_init(const void *buf, int count, MPI_Datatype type,
|
||||
}
|
||||
|
||||
if (MPI_PROC_NULL == dest) {
|
||||
*request = OBJ_NEW(ompi_request_t);
|
||||
/* Other fields were initialized by the constructor for
|
||||
ompi_request_t */
|
||||
(*request)->req_type = OMPI_REQUEST_NOOP;
|
||||
(*request)->req_status = ompi_request_empty.req_status;
|
||||
(*request)->req_complete = REQUEST_COMPLETED;
|
||||
(*request)->req_state = OMPI_REQUEST_INACTIVE;
|
||||
(*request)->req_persistent = true;
|
||||
(*request)->req_free = ompi_request_persistent_proc_null_free;
|
||||
return MPI_SUCCESS;
|
||||
rc = ompi_request_persistent_noop_create(request);
|
||||
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
|
||||
}
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
@ -10,8 +10,9 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -66,6 +67,10 @@ int MPI_Start(MPI_Request *request)
|
||||
|
||||
switch((*request)->req_type) {
|
||||
case OMPI_REQUEST_PML:
|
||||
case OMPI_REQUEST_COLL:
|
||||
if ( MPI_PARAM_CHECK && !(*request)->req_persistent) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_REQUEST, FUNC_NAME);
|
||||
}
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
||||
ret = (*request)->req_start(1, request);
|
||||
|
@ -13,8 +13,9 @@
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2016 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017-2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -64,7 +65,9 @@ int MPI_Startall(int count, MPI_Request requests[])
|
||||
} else {
|
||||
for (i = 0; i < count; ++i) {
|
||||
if (NULL == requests[i] ||
|
||||
(OMPI_REQUEST_PML != requests[i]->req_type &&
|
||||
! requests[i]->req_persistent ||
|
||||
(OMPI_REQUEST_PML != requests[i]->req_type &&
|
||||
OMPI_REQUEST_COLL != requests[i]->req_type &&
|
||||
OMPI_REQUEST_NOOP != requests[i]->req_type)) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
break;
|
||||
|
10
ompi/mpiext/pcollreq/Makefile.am
Обычный файл
10
ompi/mpiext/pcollreq/Makefile.am
Обычный файл
@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
SUBDIRS = c
|
13
ompi/mpiext/pcollreq/README.txt
Обычный файл
13
ompi/mpiext/pcollreq/README.txt
Обычный файл
@ -0,0 +1,13 @@
|
||||
Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
|
||||
$COPYRIGHT$
|
||||
|
||||
This extension provides the feature of persistent collective communication
|
||||
operations and persistent neighborhood collective communication operations,
|
||||
which is proposed in the MPI Forum as of June 2018.
|
||||
|
||||
See MPIX_Barrier_init(3) for more details.
|
||||
|
||||
The code will be moved to the ompi/mpi directory and the MPIX_ prefix will
|
||||
be switch to the MPI_ prefix once the MPI Standard which includes this
|
||||
feature is published.
|
1
ompi/mpiext/pcollreq/c/MPIX_Allgather_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Allgather_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Allgatherv_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Allgatherv_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Allreduce_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Allreduce_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Alltoall_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Alltoall_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Alltoallv_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Alltoallv_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Alltoallw_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Alltoallw_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
157
ompi/mpiext/pcollreq/c/MPIX_Barrier_init.3in
Обычный файл
157
ompi/mpiext/pcollreq/c/MPIX_Barrier_init.3in
Обычный файл
@ -0,0 +1,157 @@
|
||||
.\" -*- nroff -*-
|
||||
.\" Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
.\" $COPYRIGHT$
|
||||
.TH MPIX_Barrier_init 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
|
||||
.SH NAME
|
||||
\fBMPIX_Allgather_init, MPIX_Allgatherv_init, MPIX_Allreduce_init, MPIX_Alltoall_init, MPIX_Alltoallv_init, MPIX_Alltoallw_init, MPIX_Barrier_init, MPIX_Bcast_init, MPIX_Exscan_init, MPIX_Gather_init, MPIX_Gatherv_init, MPIX_Reduce_init, MPIX_Reduce_scatter_init, MPIX_Reduce_scatter_block_init, MPIX_Scan_init, MPIX_Scatter_init, MPIX_Scatterv_init, MPIX_Neighbor_allgather_init, MPIX_Neighbor_allgatherv_init, MPIX_Neighbor_alltoall_init, MPIX_Neighbor_alltoallv_init, MPIX_Neighbor_alltoallw_init\fP \- Builds a handle for a collective communication or neighborhood collective communication
|
||||
|
||||
.SH SYNTAX
|
||||
.ft R
|
||||
.SH C Syntax
|
||||
.nf
|
||||
#include <mpi.h>
|
||||
#include <mpi-ext.h>
|
||||
int MPIX_Allgather_init(const void *\fIsendbuf\fP, int \fIsendcount\fP,
|
||||
MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, int \fIrecvcount\fP,
|
||||
MPI_Datatype \fIrecvtype\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Allgatherv_init(const void *\fIsendbuf\fP, int \fIsendcount\fP,
|
||||
MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, const int \fIrecvcounts\fP[],
|
||||
const int \fIdispls\fP[], MPI_Datatype \fIrecvtype\fP, MPI_Comm \fIcomm\fP,
|
||||
MPI_Info \fIinfo\fP, MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Allreduce_init(const void *\fIsendbuf\fP, void *\fIrecvbuf\fP, int \fIcount\fP,
|
||||
MPI_Datatype \fIdatatype\fP, MPI_Op \fIop\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Alltoall_init(const void *\fIsendbuf\fP, int \fIsendcount\fP,
|
||||
MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, int \fIrecvcount\fP,
|
||||
MPI_Datatype \fIrecvtype\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Alltoallv_init(const void *\fIsendbuf\fP, const int \fIsendcounts\fP[],
|
||||
const int \fIsdispls\fP[], MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP,
|
||||
const int \fIrecvcounts\fP[], const int \fIrdispls\fP[], MPI_Datatype \fIrecvtype\fP,
|
||||
MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP, MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Alltoallw_init(const void *\fIsendbuf\fP, const int \fIsendcounts\fP[],
|
||||
const int \fIsdispls\fP[], const MPI_Datatype \fIsendtypes\fP[], void *\fIrecvbuf\fP,
|
||||
const int \fIrecvcounts\fP[], const int \fIrdispls\fP[],
|
||||
const MPI_Datatype \fIrecvtypes\fP[], MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Barrier_init(MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Bcast_init(void *\fIbuffer\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP,
|
||||
int \fIroot\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP, MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Exscan_init(const void *\fIsendbuf\fP, void *\fIrecvbuf\fP, int \fIcount\fP,
|
||||
MPI_Datatype \fIdatatype\fP, MPI_Op \fIop\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Gather_init(const void *\fIsendbuf\fP, int \fIsendcount\fP,
|
||||
MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, int \fIrecvcount\fP,
|
||||
MPI_Datatype \fIrecvtype\fP, int \fIroot\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Gatherv_init(const void *\fIsendbuf\fP, int \fIsendcount\fP,
|
||||
MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, const int \fIrecvcounts\fP[],
|
||||
const int \fIdispls\fP[], MPI_Datatype \fIrecvtype\fP, int \fIroot\fP, MPI_Comm \fIcomm\fP,
|
||||
MPI_Info \fIinfo\fP, MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Reduce_init(const void *\fIsendbuf\fP, void *\fIrecvbuf\fP, int \fIcount\fP,
|
||||
MPI_Datatype \fIdatatype\fP, MPI_Op \fIop\fP, int \fIroot\fP, MPI_Comm \fIcomm\fP,
|
||||
MPI_Info \fIinfo\fP, MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Reduce_scatter_init(const void *\fIsendbuf\fP, void *\fIrecvbuf\fP,
|
||||
const int \fIrecvcounts\fP[], MPI_Datatype \fIdatatype\fP, MPI_Op \fIop\fP,
|
||||
MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP, MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Reduce_scatter_block_init(const void *\fIsendbuf\fP, void *\fIrecvbuf\fP,
|
||||
int \fIrecvcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Op \fIop\fP, MPI_Comm \fIcomm\fP,
|
||||
MPI_Info \fIinfo\fP, MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Scan_init(const void *\fIsendbuf\fP, void *\fIrecvbuf\fP, int \fIcount\fP,
|
||||
MPI_Datatype \fIdatatype\fP, MPI_Op \fIop\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Scatter_init(const void *\fIsendbuf\fP, int \fIsendcount\fP,
|
||||
MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, int \fIrecvcount\fP,
|
||||
MPI_Datatype \fIrecvtype\fP, int \fIroot\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Scatterv_init(const void *\fIsendbuf\fP, const int \fIsendcounts\fP[],
|
||||
const int \fIdispls\fP[], MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP,
|
||||
int \fIrecvcount\fP, MPI_Datatype \fIrecvtype\fP, int \fIroot\fP, MPI_Comm \fIcomm\fP,
|
||||
MPI_Info \fIinfo\fP, MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Neighbor_allgather_init(const void *\fIsendbuf\fP, int \fIsendcount\fP,
|
||||
MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, int \fIrecvcount\fP,
|
||||
MPI_Datatype \fIrecvtype\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Neighbor_allgatherv_init(const void *\fIsendbuf\fP, int \fIsendcount\fP,
|
||||
MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, const int \fIrecvcounts\fP[],
|
||||
const int \fIdispls\fP[], MPI_Datatype \fIrecvtype\fP, MPI_Comm \fIcomm\fP,
|
||||
MPI_Info \fIinfo\fP, MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Neighbor_alltoall_init(const void *\fIsendbuf\fP, int \fIsendcount\fP,
|
||||
MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, int \fIrecvcount\fP,
|
||||
MPI_Datatype \fIrecvtype\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Neighbor_alltoallv_init(const void *\fIsendbuf\fP,
|
||||
const int \fIsendcounts\fP[], const int \fIsdispls\fP[], MPI_Datatype \fIsendtype\fP,
|
||||
void *\fIrecvbuf\fP, const int \fIrecvcounts\fP[], const int \fIrdispls\fP[],
|
||||
MPI_Datatype \fIrecvtype\fP, MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
int MPIX_Neighbor_alltoallw_init(const void *\fIsendbuf\fP,
|
||||
const int \fIsendcounts\fP[], const MPI_Aint \fIsdispls\fP[],
|
||||
const MPI_Datatype \fIsendtypes\fP[], void *\fIrecvbuf\fP,
|
||||
const int \fIrecvcounts\fP[], const MPI_Aint \fIrdispls\fP[],
|
||||
const MPI_Datatype \fIrecvtypes\fP[], MPI_Comm \fIcomm\fP, MPI_Info \fIinfo\fP,
|
||||
MPI_Request *\fIrequest\fP)
|
||||
|
||||
.fi
|
||||
|
||||
.SH DESCRIPTION
|
||||
.ft R
|
||||
Creates a persistent communication request for a collective operation or neighborhood collective operation.
|
||||
|
||||
As of June 2018, the feature of persistent collective communication operations and persistent collective neighborhood communication operations is proposed in the MPI Forum.
|
||||
.nf
|
||||
|
||||
https://github.com/mpi-forum/mpi-issues/issues/25
|
||||
.fi
|
||||
|
||||
Open MPI implements its draft version shown in the following URL.
|
||||
.nf
|
||||
|
||||
https://github.com/mpi-forum/mpi-issues/files/2078076/mpi32-report-ticket25-austin-vote-june2018.pdf
|
||||
.fi
|
||||
|
||||
Because it is still in a draft stage, the interface may change in the standard. Therefore the prefix \fIMPIX_\fP is used instead of \fIMPI_\fP for these request creation functions. To start, complete, and free the created request, usual MPI functions (\fIMPI_Start\fP etc.) can be used. Only C bindings are available currently.
|
||||
|
||||
Future versions of Open MPI will switch to the \fIMPI_\fP prefix and will not require the header file \fImpi-ext.h\fP once the MPI Standard which includes this feature is published.
|
||||
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
|
||||
MPI_Request req;
|
||||
MPIX_Barrier_init(MPI_COMM_WORLD, MPI_INFO_NULL, &req);
|
||||
MPI_Start(&req);
|
||||
MPI_Wait(&req, MPI_STATUS_IGNORE);
|
||||
MPI_Request_free(&req);
|
||||
.fi
|
||||
|
||||
.SH SEE ALSO
|
||||
.ft R
|
||||
.sp
|
||||
MPI_Start
|
||||
.br
|
||||
MPI_Startall
|
||||
.br
|
||||
MPI_Request_free
|
1
ompi/mpiext/pcollreq/c/MPIX_Bcast_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Bcast_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Exscan_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Exscan_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Gather_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Gather_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Gatherv_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Gatherv_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_allgather_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_allgather_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_allgatherv_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_allgatherv_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_alltoall_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_alltoall_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_alltoallv_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_alltoallv_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_alltoallw_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Neighbor_alltoallw_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Reduce_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Reduce_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Reduce_scatter_block_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Reduce_scatter_block_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Reduce_scatter_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Reduce_scatter_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Scan_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Scan_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Scatter_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Scatter_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
1
ompi/mpiext/pcollreq/c/MPIX_Scatterv_init.3in
Обычный файл
1
ompi/mpiext/pcollreq/c/MPIX_Scatterv_init.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/MPIX_Barrier_init.3
|
63
ompi/mpiext/pcollreq/c/Makefile.am
Обычный файл
63
ompi/mpiext/pcollreq/c/Makefile.am
Обычный файл
@ -0,0 +1,63 @@
|
||||
#
|
||||
# Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# We must set these #defines so that the inner OMPI MPI prototype
|
||||
# header files do the Right Thing.
|
||||
AM_CPPFLAGS = -DOMPI_PROFILE_LAYER=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1
|
||||
|
||||
include $(top_srcdir)/Makefile.ompi-rules
|
||||
|
||||
# Convenience libtool library that will be slurped up into libmpi.la.
|
||||
noinst_LTLIBRARIES = libmpiext_pcollreq_c.la
|
||||
|
||||
# This is where the top-level header file (that is included in
|
||||
# <mpi-ext.h>) must be installed.
|
||||
ompidir = $(ompiincludedir)/ompi/mpiext/pcollreq/c
|
||||
|
||||
# This is the header file that is installed.
|
||||
ompi_HEADERS = mpiext_pcollreq_c.h
|
||||
|
||||
# Sources for the convenience libtool library. Other than the one
|
||||
# header file, all source files in the extension have no file naming
|
||||
# conventions.
|
||||
libmpiext_pcollreq_c_la_SOURCES = \
|
||||
$(ompi_HEADERS) \
|
||||
mpiext_pcollreq.c
|
||||
libmpiext_pcollreq_c_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
# Man page installation
|
||||
nodist_man_MANS = \
|
||||
MPIX_Allgather_init.3 \
|
||||
MPIX_Allgatherv_init.3 \
|
||||
MPIX_Allreduce_init.3 \
|
||||
MPIX_Alltoall_init.3 \
|
||||
MPIX_Alltoallv_init.3 \
|
||||
MPIX_Alltoallw_init.3 \
|
||||
MPIX_Barrier_init.3 \
|
||||
MPIX_Bcast_init.3 \
|
||||
MPIX_Exscan_init.3 \
|
||||
MPIX_Gather_init.3 \
|
||||
MPIX_Gatherv_init.3 \
|
||||
MPIX_Reduce_init.3 \
|
||||
MPIX_Reduce_scatter_block_init.3 \
|
||||
MPIX_Reduce_scatter_init.3 \
|
||||
MPIX_Scan_init.3 \
|
||||
MPIX_Scatter_init.3 \
|
||||
MPIX_Scatterv_init.3 \
|
||||
MPIX_Neighbor_allgather_init.3 \
|
||||
MPIX_Neighbor_allgatherv_init.3 \
|
||||
MPIX_Neighbor_alltoall_init.3 \
|
||||
MPIX_Neighbor_alltoallv_init.3 \
|
||||
MPIX_Neighbor_alltoallw_init.3
|
||||
|
||||
# Man page sources
|
||||
EXTRA_DIST = $(nodist_man_MANS:.3=.3in)
|
||||
|
||||
distclean-local:
|
||||
rm -f $(nodist_man_MANS)
|
174
ompi/mpiext/pcollreq/c/mpiext_pcollreq.c
Обычный файл
174
ompi/mpiext/pcollreq/c/mpiext_pcollreq.c
Обычный файл
@ -0,0 +1,174 @@
|
||||
/*
|
||||
* Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
* Copyright (c) 2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "ompi/mca/coll/coll.h"
|
||||
#include "ompi/mca/coll/base/coll_base_functions.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
|
||||
#include "mpiext_pcollreq_c.h"
|
||||
|
||||
#define INFO_REQ_ARGS ompi_info_t *info, ompi_request_t **request
|
||||
|
||||
int MPIX_Allgather_init(ALLGATHER_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_allgather_init(
|
||||
ALLGATHER_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_allgather_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Allgatherv_init(ALLGATHERV_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_allgatherv_init(
|
||||
ALLGATHERV_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_allgatherv_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Allreduce_init(ALLREDUCE_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_allreduce_init(
|
||||
ALLREDUCE_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_allreduce_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Alltoall_init(ALLTOALL_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_alltoall_init(
|
||||
ALLTOALL_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_alltoall_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Alltoallv_init(ALLTOALLV_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_alltoallv_init(
|
||||
ALLTOALLV_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_alltoallv_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Alltoallw_init(ALLTOALLW_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_alltoallw_init(
|
||||
ALLTOALLW_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_alltoallw_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Barrier_init(BARRIER_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_barrier_init(
|
||||
BARRIER_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_barrier_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Bcast_init(BCAST_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_bcast_init(
|
||||
BCAST_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_bcast_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Exscan_init(EXSCAN_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_exscan_init(
|
||||
EXSCAN_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_exscan_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Gather_init(GATHER_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_gather_init(
|
||||
GATHER_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_gather_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Gatherv_init(GATHERV_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_gatherv_init(
|
||||
GATHERV_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_gatherv_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Reduce_init(REDUCE_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_reduce_init(
|
||||
REDUCE_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_reduce_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Reduce_scatter_init(REDUCESCATTER_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_reduce_scatter_init(
|
||||
REDUCESCATTER_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_reduce_scatter_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Reduce_scatter_block_init(REDUCESCATTERBLOCK_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_reduce_scatter_block_init(
|
||||
REDUCESCATTERBLOCK_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_reduce_scatter_block_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Scan_init(SCAN_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_scan_init(
|
||||
SCAN_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_scan_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Scatter_init(SCATTER_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_scatter_init(
|
||||
SCATTER_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_scatter_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Scatterv_init(SCATTERV_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_scatterv_init(
|
||||
SCATTERV_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_scatterv_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Neighbor_allgather_init(NEIGHBOR_ALLGATHER_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_neighbor_allgather_init(
|
||||
NEIGHBOR_ALLGATHER_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_neighbor_allgather_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Neighbor_allgatherv_init(NEIGHBOR_ALLGATHERV_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_neighbor_allgatherv_init(
|
||||
NEIGHBOR_ALLGATHERV_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_neighbor_allgatherv_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Neighbor_alltoall_init(NEIGHBOR_ALLTOALL_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_neighbor_alltoall_init(
|
||||
NEIGHBOR_ALLTOALL_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_neighbor_alltoall_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Neighbor_alltoallv_init(NEIGHBOR_ALLTOALLV_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_neighbor_alltoallv_init(
|
||||
NEIGHBOR_ALLTOALLV_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_neighbor_alltoallv_init_module);
|
||||
}
|
||||
|
||||
int MPIX_Neighbor_alltoallw_init(NEIGHBOR_ALLTOALLW_BASE_ARGS, INFO_REQ_ARGS)
|
||||
{
|
||||
return comm->c_coll->coll_neighbor_alltoallw_init(
|
||||
NEIGHBOR_ALLTOALLW_BASE_ARG_NAMES, info, request,
|
||||
comm->c_coll->coll_neighbor_alltoallw_init_module);
|
||||
}
|
33
ompi/mpiext/pcollreq/c/mpiext_pcollreq_c.h
Обычный файл
33
ompi/mpiext/pcollreq/c/mpiext_pcollreq_c.h
Обычный файл
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
*/
|
||||
|
||||
OMPI_DECLSPEC int MPIX_Allgather_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Allgatherv_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Allreduce_init(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Alltoall_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Alltoallv_init(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Alltoallw_init(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Barrier_init(MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Bcast_init(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Exscan_init(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Gather_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Gatherv_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Reduce_init(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Reduce_scatter_init(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Reduce_scatter_block_init(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Scan_init(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Scatter_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Scatterv_init(const void *sendbuf, const int sendcounts[], const int displs[], MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
|
||||
OMPI_DECLSPEC int MPIX_Neighbor_allgather_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Neighbor_allgatherv_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Neighbor_alltoall_init(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Neighbor_alltoallv_init(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPIX_Neighbor_alltoallw_init(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Info info, MPI_Request *request);
|
21
ompi/mpiext/pcollreq/configure.m4
Обычный файл
21
ompi/mpiext/pcollreq/configure.m4
Обычный файл
@ -0,0 +1,21 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# OMPI_MPIEXT_pcollreq_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([OMPI_MPIEXT_pcollreq_CONFIG],[
|
||||
AC_CONFIG_FILES([ompi/mpiext/pcollreq/Makefile])
|
||||
AC_CONFIG_FILES([ompi/mpiext/pcollreq/c/Makefile])
|
||||
|
||||
AS_IF([test "$ENABLE_pcollreq" = "1" || \
|
||||
test "$ENABLE_EXT_ALL" = "1"],
|
||||
[$1],
|
||||
[$2])
|
||||
])
|
@ -17,6 +17,7 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -86,7 +87,7 @@ static int ompi_request_empty_free(ompi_request_t** request)
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_request_persistent_proc_null_free(ompi_request_t** request)
|
||||
static int ompi_request_persistent_noop_free(ompi_request_t** request)
|
||||
{
|
||||
OMPI_REQUEST_FINI(*request);
|
||||
(*request)->req_state = OMPI_REQUEST_INVALID;
|
||||
@ -185,3 +186,26 @@ int ompi_request_finalize(void)
|
||||
OBJ_DESTRUCT( &ompi_request_f_to_c_table );
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int ompi_request_persistent_noop_create(ompi_request_t** request)
|
||||
{
|
||||
ompi_request_t *req;
|
||||
|
||||
req = OBJ_NEW(ompi_request_t);
|
||||
if (NULL == req) {
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
/* Other fields were initialized by the constructor for
|
||||
ompi_request_t */
|
||||
req->req_type = OMPI_REQUEST_NOOP;
|
||||
req->req_status = ompi_request_empty.req_status;
|
||||
req->req_complete = REQUEST_COMPLETED;
|
||||
req->req_state = OMPI_REQUEST_INACTIVE;
|
||||
req->req_persistent = true;
|
||||
req->req_free = ompi_request_persistent_noop_free;
|
||||
|
||||
*request = req;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
* Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
|
||||
* Copyright (c) 2015-2017 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -348,17 +349,16 @@ OMPI_DECLSPEC extern ompi_request_fns_t ompi_request_functions;
|
||||
*/
|
||||
int ompi_request_init(void);
|
||||
|
||||
/**
|
||||
* Free a persistent request to a MPI_PROC_NULL peer (there's no
|
||||
* freelist to put it back to, so we have to actually OBJ_RELEASE it).
|
||||
*/
|
||||
OMPI_DECLSPEC int ompi_request_persistent_proc_null_free(ompi_request_t **request);
|
||||
|
||||
/**
|
||||
* Shut down the MPI_Request subsystem; invoked during MPI_FINALIZE.
|
||||
*/
|
||||
int ompi_request_finalize(void);
|
||||
|
||||
/**
|
||||
* Create a persistent request that does nothing (e.g., to MPI_PROC_NULL).
|
||||
*/
|
||||
int ompi_request_persistent_noop_create(ompi_request_t **request);
|
||||
|
||||
/**
|
||||
* Cancel a pending request.
|
||||
*/
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user