2004-01-09 08:21:01 +03:00
|
|
|
/*
|
2007-03-17 02:11:45 +03:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2008-07-29 02:40:57 +04:00
|
|
|
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
|
2008-01-25 06:46:31 +03:00
|
|
|
* Copyright (c) 2007-2008 UT-Battelle, LLC
|
2012-06-23 00:54:12 +04:00
|
|
|
* Copyright (c) 2012 Oak Rigde National Laboratory. All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-09 08:21:01 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* Collective Communication Interface
|
|
|
|
*
|
|
|
|
* Interface for implementing the collective communication interface
|
|
|
|
* of MPI. The MPI interface provides error checking and error
|
|
|
|
* handler invocation, but the collective components provide all other
|
|
|
|
* functionality.
|
|
|
|
*
|
2008-01-25 06:46:31 +03:00
|
|
|
* Component selection is done per commuicator, at Communicator
|
|
|
|
* construction time. mca_coll_base_comm_select() is used to
|
|
|
|
* create the list of components available to the compoenent
|
|
|
|
* collm_comm_query function, instantiating a module for each
|
|
|
|
* component that i usable, and sets the module collective function pointers.
|
|
|
|
* mca_coll_base_comm_select() then loops through the list of available
|
|
|
|
* components (via the instantiated module), and uses the
|
|
|
|
* module's coll_module_enable() function to enable the modules, and
|
|
|
|
* if successful, sets the communicator collective functions to the
|
|
|
|
* those supplied by the given module, keeping track of which module it
|
|
|
|
* is associated with.
|
|
|
|
*
|
|
|
|
* The module destructors are called for each module used by the
|
|
|
|
* communicator, at communicator desctruction time.
|
|
|
|
*
|
|
|
|
* This can result in up to N different components being used for a
|
|
|
|
* single communicator, one per needed collective function.
|
2007-08-19 07:37:49 +04:00
|
|
|
*
|
|
|
|
* The interface is the same for inter- or intra-communicators, and
|
|
|
|
* components should be able to handle either style of communicator
|
|
|
|
* during initialization (although handling may include indicating the
|
|
|
|
* component is not available).
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OMPI_MCA_COLL_COLL_H
|
|
|
|
#define OMPI_MCA_COLL_COLL_H
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
#include "mpi.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
#include "opal/mca/crs/crs.h"
|
|
|
|
#include "opal/mca/crs/base/base.h"
|
2012-06-23 00:54:12 +04:00
|
|
|
#include "ompi/request/request.h"
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
BEGIN_C_DECLS
|
2005-01-30 21:42:37 +03:00
|
|
|
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/* ******************************************************************** */
|
|
|
|
|
|
|
|
|
|
|
|
struct ompi_communicator_t;
|
|
|
|
struct ompi_datatype_t;
|
|
|
|
struct ompi_op_t;
|
|
|
|
|
|
|
|
|
|
|
|
/* ******************************************************************** */
|
2005-01-30 21:42:37 +03:00
|
|
|
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/**
|
|
|
|
* Collective component initialization
|
|
|
|
*
|
|
|
|
* Initialize the given collective component. This function should
|
|
|
|
* initialize any component-level. data. It will be called exactly
|
|
|
|
* once during MPI_INIT.
|
|
|
|
*
|
|
|
|
* @note The component framework is not lazily opened, so attempts
|
|
|
|
* should be made to minimze the amount of memory allocated during
|
|
|
|
* this function.
|
|
|
|
*
|
|
|
|
* @param[in] enable_progress_threads True if the component needs to
|
|
|
|
* support progress threads
|
|
|
|
* @param[in] enable_mpi_threads True if the component needs to
|
|
|
|
* support MPI_THREAD_MULTIPLE
|
|
|
|
*
|
2008-12-31 14:34:27 +03:00
|
|
|
* @retval OMPI_SUCCESS Component successfully initialized
|
|
|
|
* @retval OMPI_ERROR An unspecified error occurred
|
2007-08-19 07:37:49 +04:00
|
|
|
*/
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_component_init_query_fn_t)
|
2007-08-19 07:37:49 +04:00
|
|
|
(bool enable_progress_threads, bool enable_mpi_threads);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
|
Two major things in this commit:
* New "op" MPI layer framework
* Addition of the MPI_REDUCE_LOCAL proposed function (for MPI-2.2)
= Op framework =
Add new "op" framework in the ompi layer. This framework replaces the
hard-coded MPI_Op back-end functions for (MPI_Op, MPI_Datatype) tuples
for pre-defined MPI_Ops, allowing components and modules to provide
the back-end functions. The intent is that components can be written
to take advantage of hardware acceleration (GPU, FPGA, specialized CPU
instructions, etc.). Similar to other frameworks, components are
intended to be able to discover at run-time if they can be used, and
if so, elect themselves to be selected (or disqualify themselves from
selection if they cannot run). If specialized hardware is not
available, there is a default set of functions that will automatically
be used.
This framework is ''not'' used for user-defined MPI_Ops.
The new op framework is similar to the existing coll framework, in
that the final set of function pointers that are used on any given
intrinsic MPI_Op can be a mixed bag of function pointers, potentially
coming from multiple different op modules. This allows for hardware
that only supports some of the operations, not all of them (e.g., a
GPU that only supports single-precision operations).
All the hard-coded back-end MPI_Op functions for (MPI_Op,
MPI_Datatype) tuples still exist, but unlike coll, they're in the
framework base (vs. being in a separate "basic" component) and are
automatically used if no component is found at runtime that provides a
module with the necessary function pointers.
There is an "example" op component that will hopefully be useful to
those writing meaningful op components. It is currently
.ompi_ignore'd so that it doesn't impinge on other developers (it's
somewhat chatty in terms of opal_output() so that you can tell when
its functions have been invoked). See the README file in the example
op component directory. Developers of new op components are
encouraged to look at the following wiki pages:
https://svn.open-mpi.org/trac/ompi/wiki/devel/Autogen
https://svn.open-mpi.org/trac/ompi/wiki/devel/CreateComponent
https://svn.open-mpi.org/trac/ompi/wiki/devel/CreateFramework
= MPI_REDUCE_LOCAL =
Part of the MPI-2.2 proposal listed here:
https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/24
is to add a new function named MPI_REDUCE_LOCAL. It is very easy to
implement, so I added it (also because it makes testing the op
framework pretty easy -- you can do it in serial rather than via
parallel reductions). There's even a man page!
This commit was SVN r20280.
2009-01-15 02:44:31 +03:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/**
|
|
|
|
* Query whether a component is available for the given communicator
|
|
|
|
*
|
|
|
|
* Query whether the component is available for the given
|
|
|
|
* communicator. If the component is available, an object should be
|
|
|
|
* allocated and returned (with refcount at 1). The module will not
|
|
|
|
* be used for collective operations until module_enable() is called
|
|
|
|
* on the module, but may be destroyed (via OBJ_RELEASE) either before
|
|
|
|
* or after module_enable() is called. If the module needs to release
|
|
|
|
* resources obtained during query(), it should do so in the module
|
|
|
|
* destructor.
|
|
|
|
*
|
|
|
|
* A component may provide NULL to this function to indicate it does
|
|
|
|
* not wish to run or return an error during module_enable().
|
|
|
|
*
|
|
|
|
* @note The communicator is available for point-to-point
|
|
|
|
* communication, but other functionality is not available during this
|
|
|
|
* phase of initialization.
|
|
|
|
*
|
|
|
|
* @param[in] comm The communicator being created
|
|
|
|
* @param[out] priority Priority setting for component on
|
|
|
|
* this communicator
|
|
|
|
*
|
|
|
|
* @returns An initialized module structure if the component can
|
|
|
|
* provide a module with the requested functionality or NULL if the
|
|
|
|
* component should not be used on the given communicator.
|
2004-08-02 04:24:22 +04:00
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef struct mca_coll_base_module_2_0_0_t *
|
|
|
|
(*mca_coll_base_component_comm_query_2_0_0_fn_t)
|
2007-08-19 07:37:49 +04:00
|
|
|
(struct ompi_communicator_t *comm, int *priority);
|
2004-08-02 04:24:22 +04:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
|
|
|
|
/* ******************************************************************** */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enable module for collective communication
|
|
|
|
*
|
|
|
|
* Enable the module for collective commuication. Modules are enabled
|
|
|
|
* in order from lowest to highest priority. At each component,
|
|
|
|
* collective functions with priority higher than the existing
|
|
|
|
* function are copied into the communicator's function table and the
|
|
|
|
* module's reference count is incremented. Replaced functions have
|
|
|
|
* their module's reference count decremented, so a component will go
|
|
|
|
* out of scope when it has been examined and is no longer used in any
|
|
|
|
* collective functions.
|
|
|
|
*
|
|
|
|
* Because the function list is built on increasing priority, a
|
|
|
|
* component that needs functions from a lower priority component
|
|
|
|
* (say, a multi-cast barrier that might need a point-to-point barrier
|
|
|
|
* for resource exhaustion issues) can keep the function pointer and
|
|
|
|
* module pointer and increase the reference count of the module and
|
|
|
|
* use the module during execution.
|
|
|
|
*
|
|
|
|
* When a module is not used for any interface functions and no
|
|
|
|
* higher-priority module has increased its refcount, it will have
|
|
|
|
* it's destructor triggered and the module will be destroyed.
|
|
|
|
*
|
|
|
|
* @note The collective component should not modify the communicator
|
|
|
|
* during this operation. The communicator will be updated with the
|
|
|
|
* collective algorithm's function pointers and module (and the ref
|
|
|
|
* count increased on the module) by the base selection functionality.
|
|
|
|
*
|
|
|
|
* @param[in/out] module Module created during comm_query()
|
|
|
|
* @param[in] comm Communicator being created
|
|
|
|
*/
|
|
|
|
typedef int
|
2008-07-29 02:40:57 +04:00
|
|
|
(*mca_coll_base_module_enable_1_1_0_fn_t)(struct mca_coll_base_module_2_0_0_t* module,
|
2007-08-19 07:37:49 +04:00
|
|
|
struct ompi_communicator_t *comm);
|
2004-01-12 00:31:52 +03:00
|
|
|
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_allgather_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_allgatherv_fn_t)
|
2004-11-05 10:52:30 +03:00
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
2004-08-02 04:24:22 +04:00
|
|
|
void * rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_allreduce_fn_t)
|
|
|
|
(void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_alltoall_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void* rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_alltoallv_fn_t)
|
|
|
|
(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t *rdtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_alltoallw_fn_t)
|
|
|
|
(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t **sdtypes,
|
|
|
|
void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t **rdtypes,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_barrier_fn_t)
|
2008-07-29 02:40:57 +04:00
|
|
|
(struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_bcast_fn_t)
|
|
|
|
(void *buff, int count, struct ompi_datatype_t *datatype, int root,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_exscan_fn_t)
|
|
|
|
(void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_gather_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_gatherv_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_reduce_fn_t)
|
|
|
|
(void *sbuf, void* rbuf, int count, struct ompi_datatype_t *dtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_reduce_scatter_fn_t)
|
|
|
|
(void *sbuf, void *rbuf, int *rcounts, struct ompi_datatype_t *dtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2012-06-23 00:54:12 +04:00
|
|
|
typedef int (*mca_coll_base_module_reduce_scatter_block_fn_t)
|
|
|
|
(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_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_scan_fn_t)
|
|
|
|
(void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
struct ompi_op_t *op, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_scatter_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_coll_base_module_scatterv_fn_t)
|
|
|
|
(void *sbuf, int *scounts, int *disps, struct ompi_datatype_t *sdtype,
|
|
|
|
void* rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
2008-07-29 02:40:57 +04:00
|
|
|
int root, struct ompi_communicator_t *comm, struct mca_coll_base_module_2_0_0_t *module);
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2012-06-23 00:54:12 +04:00
|
|
|
/* nonblocking collectives */
|
|
|
|
typedef int (*mca_coll_base_module_iallgather_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_iallgatherv_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void * rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_iallreduce_fn_t)
|
|
|
|
(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_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_ialltoall_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void* rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_ialltoallv_fn_t)
|
|
|
|
(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t *rdtype,
|
|
|
|
struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_ialltoallw_fn_t)
|
|
|
|
(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t **sdtypes,
|
|
|
|
void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t **rdtypes,
|
|
|
|
struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_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_0_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_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_iexscan_fn_t)
|
|
|
|
(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_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_igather_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
int root, struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_igatherv_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype,
|
|
|
|
int root, struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_ireduce_fn_t)
|
|
|
|
(void *sbuf, void* rbuf, int count, struct ompi_datatype_t *dtype,
|
|
|
|
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_ireduce_scatter_fn_t)
|
|
|
|
(void *sbuf, void *rbuf, 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_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_ireduce_scatter_block_fn_t)
|
|
|
|
(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_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_iscan_fn_t)
|
|
|
|
(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_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_iscatter_fn_t)
|
|
|
|
(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
int root, struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_0_t *module);
|
|
|
|
typedef int (*mca_coll_base_module_iscatterv_fn_t)
|
|
|
|
(void *sbuf, int *scounts, int *disps, struct ompi_datatype_t *sdtype,
|
|
|
|
void* rbuf, int rcount, struct ompi_datatype_t *rdtype,
|
|
|
|
int root, struct ompi_communicator_t *comm, ompi_request_t ** request,
|
|
|
|
struct mca_coll_base_module_2_0_0_t *module);
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/**
|
2008-12-31 14:34:27 +03:00
|
|
|
* Fault Tolerance Awareness function.
|
2007-08-19 07:37:49 +04:00
|
|
|
*
|
2008-12-31 14:34:27 +03:00
|
|
|
* Fault tolerance function -- called when a process / job state
|
|
|
|
* change is noticed.
|
2007-08-19 07:37:49 +04:00
|
|
|
*
|
|
|
|
* @param[in] state State change that triggered the function
|
|
|
|
*
|
2008-12-31 14:34:27 +03:00
|
|
|
* @retval OMPI_SUCCESS Component successfully selected
|
|
|
|
* @retval OMPI_ERROR An unspecified error occurred
|
2007-03-17 02:11:45 +03:00
|
|
|
*/
|
|
|
|
typedef int (*mca_coll_base_module_ft_event_fn_t) (int state);
|
|
|
|
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/* ******************************************************************** */
|
|
|
|
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/**
|
|
|
|
* Collective component interface
|
|
|
|
*
|
|
|
|
* Component interface for the collective framework. A public
|
|
|
|
* instance of this structure, called
|
|
|
|
* mca_coll_[component_name]_component, must exist in any collective
|
|
|
|
* component.
|
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
struct mca_coll_base_component_2_0_0_t {
|
2007-08-19 07:37:49 +04:00
|
|
|
/** Base component description */
|
|
|
|
mca_base_component_t collm_version;
|
|
|
|
/** Base component data block */
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_base_component_data_t collm_data;
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/** Component initialization function */
|
|
|
|
mca_coll_base_component_init_query_fn_t collm_init_query;
|
|
|
|
/** Query whether component is useable for given communicator */
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_component_comm_query_2_0_0_fn_t collm_comm_query;
|
2004-01-10 20:27:28 +03:00
|
|
|
};
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef struct mca_coll_base_component_2_0_0_t mca_coll_base_component_2_0_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_component_2_0_0_t mca_coll_base_component_t;
|
2004-01-09 08:21:01 +03:00
|
|
|
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/**
|
|
|
|
* Collective module interface
|
|
|
|
*
|
|
|
|
* Module interface to the Collective framework. Modules are
|
|
|
|
* reference counted based on the number of functions from the module
|
|
|
|
* used on the commuicator. There is at most one module per component
|
|
|
|
* on a given communicator, and there can be many component modules on
|
|
|
|
* a given communicator.
|
|
|
|
*
|
|
|
|
* @note The collective framework and the
|
|
|
|
* communicator functionality only stores a pointer to the module
|
|
|
|
* function, so the component is free to create a structure that
|
|
|
|
* inherits from this one for use as the module structure.
|
2004-01-09 08:21:01 +03:00
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
struct mca_coll_base_module_2_0_0_t {
|
2007-08-19 07:37:49 +04:00
|
|
|
/** Collective modules all inherit from opal_object */
|
|
|
|
opal_object_t super;
|
|
|
|
|
|
|
|
/** Enable function called when a collective module is (possibly)
|
|
|
|
going to be used for the given communicator */
|
|
|
|
mca_coll_base_module_enable_1_1_0_fn_t coll_module_enable;
|
|
|
|
|
|
|
|
/* Collective function pointers */
|
2012-06-23 00:54:12 +04:00
|
|
|
/* blocking functions */
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_allgather_fn_t coll_allgather;
|
|
|
|
mca_coll_base_module_allgatherv_fn_t coll_allgatherv;
|
|
|
|
mca_coll_base_module_allreduce_fn_t coll_allreduce;
|
|
|
|
mca_coll_base_module_alltoall_fn_t coll_alltoall;
|
|
|
|
mca_coll_base_module_alltoallv_fn_t coll_alltoallv;
|
|
|
|
mca_coll_base_module_alltoallw_fn_t coll_alltoallw;
|
|
|
|
mca_coll_base_module_barrier_fn_t coll_barrier;
|
|
|
|
mca_coll_base_module_bcast_fn_t coll_bcast;
|
|
|
|
mca_coll_base_module_exscan_fn_t coll_exscan;
|
|
|
|
mca_coll_base_module_gather_fn_t coll_gather;
|
|
|
|
mca_coll_base_module_gatherv_fn_t coll_gatherv;
|
|
|
|
mca_coll_base_module_reduce_fn_t coll_reduce;
|
|
|
|
mca_coll_base_module_reduce_scatter_fn_t coll_reduce_scatter;
|
2012-06-23 00:54:12 +04:00
|
|
|
mca_coll_base_module_reduce_scatter_block_fn_t coll_reduce_scatter_block;
|
2007-08-19 07:37:49 +04:00
|
|
|
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;
|
2012-06-23 00:54:12 +04:00
|
|
|
/* nonblocking functions */
|
|
|
|
mca_coll_base_module_iallgather_fn_t coll_iallgather;
|
|
|
|
mca_coll_base_module_iallgatherv_fn_t coll_iallgatherv;
|
|
|
|
mca_coll_base_module_iallreduce_fn_t coll_iallreduce;
|
|
|
|
mca_coll_base_module_ialltoall_fn_t coll_ialltoall;
|
|
|
|
mca_coll_base_module_ialltoallv_fn_t coll_ialltoallv;
|
|
|
|
mca_coll_base_module_ialltoallw_fn_t coll_ialltoallw;
|
|
|
|
mca_coll_base_module_ibarrier_fn_t coll_ibarrier;
|
|
|
|
mca_coll_base_module_ibcast_fn_t coll_ibcast;
|
|
|
|
mca_coll_base_module_iexscan_fn_t coll_iexscan;
|
|
|
|
mca_coll_base_module_igather_fn_t coll_igather;
|
|
|
|
mca_coll_base_module_igatherv_fn_t coll_igatherv;
|
|
|
|
mca_coll_base_module_ireduce_fn_t coll_ireduce;
|
|
|
|
mca_coll_base_module_ireduce_scatter_fn_t coll_ireduce_scatter;
|
|
|
|
mca_coll_base_module_ireduce_scatter_block_fn_t coll_ireduce_scatter_block;
|
|
|
|
mca_coll_base_module_iscan_fn_t coll_iscan;
|
|
|
|
mca_coll_base_module_iscatter_fn_t coll_iscatter;
|
|
|
|
mca_coll_base_module_iscatterv_fn_t coll_iscatterv;
|
2007-08-19 07:37:49 +04:00
|
|
|
|
|
|
|
/** Fault tolerance event trigger function */
|
|
|
|
mca_coll_base_module_ft_event_fn_t ft_event;
|
|
|
|
};
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef struct mca_coll_base_module_2_0_0_t mca_coll_base_module_2_0_0_t;
|
2007-08-19 07:37:49 +04:00
|
|
|
|
2008-07-29 02:40:57 +04:00
|
|
|
/** 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_0_0_t mca_coll_base_module_t;
|
|
|
|
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_coll_base_module_t);
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/**
|
|
|
|
* Collectives communicator cache structure
|
|
|
|
*
|
|
|
|
* Collectives communicator cache structure, used to find functions to
|
|
|
|
* implement collective algorithms and their associated modules. This
|
|
|
|
* function may also be used internally by a module if it needs to
|
|
|
|
* keep a large number of "backing" functions, such as the demo
|
|
|
|
* component.
|
|
|
|
*/
|
|
|
|
struct mca_coll_base_comm_coll_t {
|
|
|
|
mca_coll_base_module_allgather_fn_t coll_allgather;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_allgather_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_allgatherv_fn_t coll_allgatherv;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_allgatherv_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_allreduce_fn_t coll_allreduce;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_allreduce_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_alltoall_fn_t coll_alltoall;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_alltoall_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_alltoallv_fn_t coll_alltoallv;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_alltoallv_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_alltoallw_fn_t coll_alltoallw;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_alltoallw_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_barrier_fn_t coll_barrier;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_barrier_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_bcast_fn_t coll_bcast;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_bcast_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_exscan_fn_t coll_exscan;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_exscan_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_gather_fn_t coll_gather;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_gather_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_gatherv_fn_t coll_gatherv;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_gatherv_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_reduce_fn_t coll_reduce;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_reduce_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_reduce_scatter_fn_t coll_reduce_scatter;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_reduce_scatter_module;
|
2012-06-23 00:54:12 +04:00
|
|
|
mca_coll_base_module_reduce_scatter_block_fn_t coll_reduce_scatter_block;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_reduce_scatter_block_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_scan_fn_t coll_scan;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_scan_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_scatter_fn_t coll_scatter;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_scatter_module;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_scatterv_fn_t coll_scatterv;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_2_0_0_t *coll_scatterv_module;
|
2012-06-23 00:54:12 +04:00
|
|
|
/* nonblocking collectives */
|
|
|
|
mca_coll_base_module_iallgather_fn_t coll_iallgather;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_iallgather_module;
|
|
|
|
mca_coll_base_module_iallgatherv_fn_t coll_iallgatherv;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_iallgatherv_module;
|
|
|
|
mca_coll_base_module_iallreduce_fn_t coll_iallreduce;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_iallreduce_module;
|
|
|
|
mca_coll_base_module_ialltoall_fn_t coll_ialltoall;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_ialltoall_module;
|
|
|
|
mca_coll_base_module_ialltoallv_fn_t coll_ialltoallv;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_ialltoallv_module;
|
|
|
|
mca_coll_base_module_ialltoallw_fn_t coll_ialltoallw;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_ialltoallw_module;
|
|
|
|
mca_coll_base_module_ibarrier_fn_t coll_ibarrier;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_ibarrier_module;
|
|
|
|
mca_coll_base_module_ibcast_fn_t coll_ibcast;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_ibcast_module;
|
|
|
|
mca_coll_base_module_iexscan_fn_t coll_iexscan;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_iexscan_module;
|
|
|
|
mca_coll_base_module_igather_fn_t coll_igather;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_igather_module;
|
|
|
|
mca_coll_base_module_igatherv_fn_t coll_igatherv;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_igatherv_module;
|
|
|
|
mca_coll_base_module_ireduce_fn_t coll_ireduce;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_ireduce_module;
|
|
|
|
mca_coll_base_module_ireduce_scatter_fn_t coll_ireduce_scatter;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_ireduce_scatter_module;
|
|
|
|
mca_coll_base_module_ireduce_scatter_block_fn_t coll_ireduce_scatter_block;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_ireduce_scatter_block_module;
|
|
|
|
mca_coll_base_module_iscan_fn_t coll_iscan;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_iscan_module;
|
|
|
|
mca_coll_base_module_iscatter_fn_t coll_iscatter;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_iscatter_module;
|
|
|
|
mca_coll_base_module_iscatterv_fn_t coll_iscatterv;
|
|
|
|
mca_coll_base_module_2_0_0_t *coll_iscatterv_module;
|
2004-01-10 20:27:28 +03:00
|
|
|
};
|
2007-08-19 07:37:49 +04:00
|
|
|
typedef struct mca_coll_base_comm_coll_t mca_coll_base_comm_coll_t;
|
|
|
|
|
|
|
|
|
|
|
|
/* ******************************************************************** */
|
2004-01-12 00:31:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2008-07-29 02:40:57 +04:00
|
|
|
* Macro for use in components that are of type coll
|
2004-01-12 00:31:52 +03:00
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
#define MCA_COLL_BASE_VERSION_2_0_0 \
|
|
|
|
MCA_BASE_VERSION_2_0_0, \
|
|
|
|
"coll", 2, 0, 0
|
2004-01-09 08:21:01 +03:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
|
|
|
|
/* ******************************************************************** */
|
|
|
|
|
|
|
|
|
|
|
|
END_C_DECLS
|
|
|
|
|
2004-01-09 08:21:01 +03:00
|
|
|
#endif /* MCA_COLL_H */
|