Create trivial "self" collective module to make logic in other coll
modules [slightly] simpler. This commit was SVN r4245.
Этот коммит содержится в:
родитель
70b6d4eeef
Коммит
01c74ddded
61
src/mca/coll/self/Makefile.am
Обычный файл
61
src/mca/coll/self/Makefile.am
Обычный файл
@ -0,0 +1,61 @@
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# Use the top-level Makefile.options
|
||||
|
||||
include $(top_ompi_srcdir)/config/Makefile.options
|
||||
|
||||
EXTRA_DIST = VERSION
|
||||
|
||||
sources = \
|
||||
coll_self.h \
|
||||
coll_self_allgather.c \
|
||||
coll_self_allgatherv.c \
|
||||
coll_self_allreduce.c \
|
||||
coll_self_alltoall.c \
|
||||
coll_self_alltoallv.c \
|
||||
coll_self_alltoallw.c \
|
||||
coll_self_barrier.c \
|
||||
coll_self_bcast.c \
|
||||
coll_self_component.c \
|
||||
coll_self_gather.c \
|
||||
coll_self_gatherv.c \
|
||||
coll_self_module.c \
|
||||
coll_self_reduce.c \
|
||||
coll_self_reduce_scatter.c \
|
||||
coll_self_scan.c \
|
||||
coll_self_exscan.c \
|
||||
coll_self_scatter.c \
|
||||
coll_self_scatterv.c
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
|
||||
if OMPI_BUILD_coll_self_DSO
|
||||
component_noinst =
|
||||
component_install = mca_coll_self.la
|
||||
else
|
||||
component_noinst = libmca_coll_self.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(libdir)/openmpi
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_coll_self_la_SOURCES = $(sources)
|
||||
mca_coll_self_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_coll_self_la_SOURCES =$(sources)
|
||||
libmca_coll_self_la_LDFLAGS = -module -avoid-version
|
6
src/mca/coll/self/VERSION
Обычный файл
6
src/mca/coll/self/VERSION
Обычный файл
@ -0,0 +1,6 @@
|
||||
major=10
|
||||
minor=0
|
||||
release=0
|
||||
alpha=0
|
||||
beta=0
|
||||
svn=1
|
129
src/mca/coll/self/coll_self.h
Обычный файл
129
src/mca/coll/self/coll_self.h
Обычный файл
@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef MCA_COLL_SELF_EXPORT_H
|
||||
#define MCA_COLL_SELF_EXPORT_H
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/coll/coll.h"
|
||||
#include "request/request.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Globally exported variable
|
||||
*/
|
||||
|
||||
OMPI_COMP_EXPORT extern const mca_coll_base_component_1_0_0_t mca_coll_self_component;
|
||||
OMPI_COMP_EXPORT extern int mca_coll_self_priority_param;
|
||||
|
||||
|
||||
/*
|
||||
* coll API functions
|
||||
*/
|
||||
|
||||
|
||||
/* API functions */
|
||||
|
||||
int mca_coll_self_init_query(bool *allow_multi_user_threads,
|
||||
bool *have_hidden_threads);
|
||||
const struct mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_self_comm_query(struct ompi_communicator_t *comm, int *priority);
|
||||
int mca_coll_self_comm_unquery(struct ompi_communicator_t *comm);
|
||||
|
||||
const struct mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_self_module_init(struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_module_finalize(struct ompi_communicator_t *comm);
|
||||
|
||||
int mca_coll_self_allgather_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_allgatherv_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void * rbuf, int *rcounts, int *disps,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_allreduce_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_alltoall_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_alltoallv_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int *rcounts, int *rdisps,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_alltoallw_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
struct ompi_datatype_t **sdtypes,
|
||||
void *rbuf, int *rcounts, int *rdisps,
|
||||
struct ompi_datatype_t **rdtypes,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_barrier_intra(struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_bcast_intra(void *buff, int count,
|
||||
struct ompi_datatype_t *datatype,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_gather_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||
int rcount, struct ompi_datatype_t *rdtype,
|
||||
int root, struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_gatherv_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||
int *rcounts, int *disps,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_reduce_intra(void *sbuf, void* rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_reduce_scatter_intra(void *sbuf, void *rbuf,
|
||||
int *rcounts,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_scan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_scatter_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||
int rcount, struct ompi_datatype_t *rdtype,
|
||||
int root, struct ompi_communicator_t *comm);
|
||||
int mca_coll_self_scatterv_intra(void *sbuf, int *scounts, int *disps,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm);
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif /* MCA_COLL_SELF_EXPORT_H */
|
36
src/mca/coll/self/coll_self_allgather.c
Обычный файл
36
src/mca/coll/self/coll_self_allgather.c
Обычный файл
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* allgather_intra
|
||||
*
|
||||
* Function: - allgather
|
||||
* Accepts: - same as MPI_Allgather()
|
||||
* Returns: - MPI_SUCCESS, or error code
|
||||
*/
|
||||
int mca_coll_self_allgather_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||
int rcount, struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
}
|
37
src/mca/coll/self/coll_self_allgatherv.c
Обычный файл
37
src/mca/coll/self/coll_self_allgatherv.c
Обычный файл
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* allgatherv_intra
|
||||
*
|
||||
* Function: - allgather
|
||||
* Accepts: - same as MPI_Allgatherv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_self_allgatherv_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void * rbuf, int *rcounts, int *disps,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
((char *) rbuf) + disps[0], rcounts[0], rdtype);
|
||||
}
|
36
src/mca/coll/self/coll_self_allreduce.c
Обычный файл
36
src/mca/coll/self/coll_self_allreduce.c
Обычный файл
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* allreduce_intra
|
||||
*
|
||||
* Function: - allreduce
|
||||
* Accepts: - same as MPI_Allreduce()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_self_allreduce_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, count, dtype,
|
||||
rbuf, count, dtype);
|
||||
}
|
37
src/mca/coll/self/coll_self_alltoall.c
Обычный файл
37
src/mca/coll/self/coll_self_alltoall.c
Обычный файл
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* alltoall_intra
|
||||
*
|
||||
* Function: - MPI_Alltoall
|
||||
* Accepts: - same as MPI_Alltoall()
|
||||
* Returns: - MPI_SUCCESS or an MPI error code
|
||||
*/
|
||||
int mca_coll_self_alltoall_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
}
|
38
src/mca/coll/self/coll_self_alltoallv.c
Обычный файл
38
src/mca/coll/self/coll_self_alltoallv.c
Обычный файл
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* alltoallv_intra
|
||||
*
|
||||
* Function: - MPI_Alltoallv
|
||||
* Accepts: - same as MPI_Alltoallv()
|
||||
* Returns: - MPI_SUCCESS or an MPI error code
|
||||
*/
|
||||
int
|
||||
mca_coll_self_alltoallv_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int *rcounts, int *rdisps,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(((char *) sbuf) + sdisps[0], scounts[0], sdtype,
|
||||
((char *) rbuf) + rdisps[0], rcounts[0], rdtype);
|
||||
}
|
37
src/mca/coll/self/coll_self_alltoallw.c
Обычный файл
37
src/mca/coll/self/coll_self_alltoallw.c
Обычный файл
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* alltoallw_intra
|
||||
*
|
||||
* Function: - MPI_Alltoallw
|
||||
* Accepts: - same as MPI_Alltoallw()
|
||||
* Returns: - MPI_SUCCESS or an MPI error code
|
||||
*/
|
||||
int mca_coll_self_alltoallw_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
struct ompi_datatype_t **sdtypes,
|
||||
void *rbuf, int *rcounts, int *rdisps,
|
||||
struct ompi_datatype_t **rdtypes,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(((char *) sbuf) + sdisps[0], scounts[0], sdtypes[0],
|
||||
((char *) rbuf) + rdisps[0], rcounts[0], rdtypes[0]);
|
||||
}
|
33
src/mca/coll/self/coll_self_barrier.c
Обычный файл
33
src/mca/coll/self/coll_self_barrier.c
Обычный файл
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* barrier_intra
|
||||
*
|
||||
* Function: - barrier
|
||||
* Accepts: - same as MPI_Barrier()
|
||||
* Returns: - MPI_SUCCESS
|
||||
*/
|
||||
int mca_coll_self_barrier_intra(struct ompi_communicator_t *comm)
|
||||
{
|
||||
/* Since there is only one process, this is a no-op */
|
||||
|
||||
return MPI_SUCCESS;
|
||||
}
|
36
src/mca/coll/self/coll_self_bcast.c
Обычный файл
36
src/mca/coll/self/coll_self_bcast.c
Обычный файл
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* bcast_lin_intra
|
||||
*
|
||||
* Function: - broadcast
|
||||
* Accepts: - same arguments as MPI_Bcast()
|
||||
* Returns: - MPI_SUCCESS
|
||||
*/
|
||||
int mca_coll_self_bcast_intra(void *buff, int count,
|
||||
struct ompi_datatype_t *datatype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
/* Since there's only one process, there's nothing to do */
|
||||
|
||||
return MPI_SUCCESS;
|
||||
}
|
99
src/mca/coll/self/coll_self_component.c
Обычный файл
99
src/mca/coll/self/coll_self_component.c
Обычный файл
@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* These symbols are in a file by themselves to provide nice linker
|
||||
* semantics. Since linkers generally pull in symbols by object
|
||||
* files, keeping these symbols as the only symbols in this file
|
||||
* prevents utility programs such as "ompi_info" from having to import
|
||||
* entire components just to query their version and parameters.
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_self.h"
|
||||
#include "mca/coll/self/coll-self-version.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mca/coll/coll.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
/*
|
||||
* Public string showing the coll ompi_self component version number
|
||||
*/
|
||||
const char *mca_coll_self_component_version_string =
|
||||
"Open MPI self collective MCA component version " MCA_coll_self_VERSION;
|
||||
|
||||
/*
|
||||
* Global variable
|
||||
*/
|
||||
int mca_coll_self_priority_param = -1;
|
||||
|
||||
/*
|
||||
* Local function
|
||||
*/
|
||||
static int self_open(void);
|
||||
|
||||
/*
|
||||
* Instantiate the public struct with all of our public information
|
||||
* and pointers to our public functions in it
|
||||
*/
|
||||
|
||||
const mca_coll_base_component_1_0_0_t mca_coll_self_component = {
|
||||
|
||||
/* First, the mca_component_t struct containing meta information
|
||||
about the component itself */
|
||||
|
||||
{
|
||||
/* Indicate that we are a coll v1.0.0 component (which also
|
||||
implies a specific MCA version) */
|
||||
|
||||
MCA_COLL_BASE_VERSION_1_0_0,
|
||||
|
||||
/* Component name and version */
|
||||
|
||||
"self",
|
||||
MCA_coll_self_MAJOR_VERSION,
|
||||
MCA_coll_self_MINOR_VERSION,
|
||||
MCA_coll_self_RELEASE_VERSION,
|
||||
|
||||
/* Component open and close functions */
|
||||
|
||||
self_open,
|
||||
NULL
|
||||
},
|
||||
|
||||
/* Next the MCA v1.0.0 component meta data */
|
||||
|
||||
{
|
||||
/* Whether the component is checkpointable or not */
|
||||
|
||||
true
|
||||
},
|
||||
|
||||
/* Initialization / querying functions */
|
||||
|
||||
mca_coll_self_init_query,
|
||||
mca_coll_self_comm_query,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
static int self_open(void)
|
||||
{
|
||||
/* We'll always be picked if there's only one process in the
|
||||
communicator */
|
||||
|
||||
mca_coll_self_priority_param =
|
||||
mca_base_param_register_int("coll", "self", "priority", NULL, 75);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
36
src/mca/coll/self/coll_self_exscan.c
Обычный файл
36
src/mca/coll/self/coll_self_exscan.c
Обычный файл
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* exscan_intra
|
||||
*
|
||||
* Function: - exscan
|
||||
* Accepts: - same arguments as MPI_Exccan()
|
||||
* Returns: - MPI_SUCCESS
|
||||
*/
|
||||
int mca_coll_self_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
/* Since there's only one process, there's nothing to do */
|
||||
|
||||
return MPI_SUCCESS;
|
||||
}
|
37
src/mca/coll/self/coll_self_gather.c
Обычный файл
37
src/mca/coll/self/coll_self_gather.c
Обычный файл
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* gather_intra
|
||||
*
|
||||
* Function: - gather
|
||||
* Accepts: - same arguments as MPI_Gather()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_self_gather_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
int root, struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
}
|
37
src/mca/coll/self/coll_self_gatherv.c
Обычный файл
37
src/mca/coll/self/coll_self_gatherv.c
Обычный файл
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* gatherv_intra
|
||||
*
|
||||
* Function: - gatherv
|
||||
* Accepts: - same arguments as MPI_Gatherv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_self_gatherv_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int *rcounts, int *disps,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
((char *) rbuf) + disps[0], rcounts[0], rdtype);
|
||||
}
|
117
src/mca/coll/self/coll_self_module.c
Обычный файл
117
src/mca/coll/self/coll_self_module.c
Обычный файл
@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "communicator/communicator.h"
|
||||
#include "mca/base/mca_base_param.h"
|
||||
#include "mca/coll/coll.h"
|
||||
#include "mca/coll/base/base.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* Module
|
||||
*/
|
||||
static const mca_coll_base_module_1_0_0_t module = {
|
||||
|
||||
/* Initialization / finalization functions */
|
||||
|
||||
mca_coll_self_module_init,
|
||||
mca_coll_self_module_finalize,
|
||||
|
||||
/* Collective function pointers */
|
||||
|
||||
mca_coll_self_allgather_intra,
|
||||
mca_coll_self_allgatherv_intra,
|
||||
mca_coll_self_allreduce_intra,
|
||||
mca_coll_self_alltoall_intra,
|
||||
mca_coll_self_alltoallv_intra,
|
||||
mca_coll_self_alltoallw_intra,
|
||||
mca_coll_self_barrier_intra,
|
||||
mca_coll_self_bcast_intra,
|
||||
mca_coll_self_exscan_intra,
|
||||
mca_coll_self_gather_intra,
|
||||
mca_coll_self_gatherv_intra,
|
||||
mca_coll_self_reduce_intra,
|
||||
mca_coll_self_reduce_scatter_intra,
|
||||
mca_coll_self_scan_intra,
|
||||
mca_coll_self_scatter_intra,
|
||||
mca_coll_self_scatterv_intra
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Initial query function that is invoked during MPI_INIT, allowing
|
||||
* this module to indicate what level of thread support it provides.
|
||||
*/
|
||||
int mca_coll_self_init_query(bool *allow_multi_user_threads,
|
||||
bool *have_hidden_user_threads)
|
||||
{
|
||||
*allow_multi_user_threads = true;
|
||||
*have_hidden_user_threads = false;
|
||||
|
||||
/* All done */
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Invoked when there's a new communicator that has been created.
|
||||
* Look at the communicator and decide which set of functions and
|
||||
* priority we want to return.
|
||||
*/
|
||||
const mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_self_comm_query(struct ompi_communicator_t *comm, int *priority)
|
||||
{
|
||||
/* We only work on intracommunicators of size 1 */
|
||||
|
||||
if (!OMPI_COMM_IS_INTER(comm) && 1 == ompi_comm_size(comm)) {
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_base_param_lookup_int(mca_coll_self_priority_param,
|
||||
priority)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &module;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Init module on the communicator
|
||||
*/
|
||||
const struct mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_self_module_init(struct ompi_communicator_t *comm)
|
||||
{
|
||||
/* Don't really need to do anything */
|
||||
|
||||
return &module;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Finalize module on the communicator
|
||||
*/
|
||||
int mca_coll_self_module_finalize(struct ompi_communicator_t *comm)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
}
|
36
src/mca/coll/self/coll_self_reduce.c
Обычный файл
36
src/mca/coll/self/coll_self_reduce.c
Обычный файл
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* reduce_lin_intra
|
||||
*
|
||||
* Function: - reduction
|
||||
* Accepts: - same as MPI_Reduce()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_self_reduce_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
int root, struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, count, dtype,
|
||||
rbuf, count, dtype);
|
||||
}
|
36
src/mca/coll/self/coll_self_reduce_scatter.c
Обычный файл
36
src/mca/coll/self/coll_self_reduce_scatter.c
Обычный файл
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* reduce_scatter
|
||||
*
|
||||
* Function: - reduce then scatter
|
||||
* Accepts: - same as MPI_Reduce_scatter()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_self_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, rcounts[0], dtype,
|
||||
rbuf, rcounts[0], dtype);
|
||||
}
|
36
src/mca/coll/self/coll_self_scan.c
Обычный файл
36
src/mca/coll/self/coll_self_scan.c
Обычный файл
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* scan
|
||||
*
|
||||
* Function: - scan
|
||||
* Accepts: - same arguments as MPI_Scan()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_self_scan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, count, dtype,
|
||||
rbuf, count, dtype);
|
||||
}
|
38
src/mca/coll/self/coll_self_scatter.c
Обычный файл
38
src/mca/coll/self/coll_self_scatter.c
Обычный файл
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "datatype/datatype.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* scatter_intra
|
||||
*
|
||||
* Function: - scatter
|
||||
* Accepts: - same arguments as MPI_Scatter()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_self_scatter_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
}
|
36
src/mca/coll/self/coll_self_scatterv.c
Обычный файл
36
src/mca/coll/self/coll_self_scatterv.c
Обычный файл
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "coll_self.h"
|
||||
|
||||
|
||||
/*
|
||||
* scatterv_intra
|
||||
*
|
||||
* Function: - scatterv
|
||||
* Accepts: - same arguments as MPI_Scatter()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_self_scatterv_intra(void *sbuf, int *scounts,
|
||||
int *disps, struct ompi_datatype_t *sdtype,
|
||||
void *rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(((char *) sbuf) + disps[0], scounts[0], sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
}
|
17
src/mca/coll/self/configure.params
Обычный файл
17
src/mca/coll/self/configure.params
Обычный файл
@ -0,0 +1,17 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
PARAM_INIT_FILE=coll_self.c
|
||||
PARAM_CONFIG_FILES=Makefile
|
Загрузка…
Ссылка в новой задаче
Block a user