Commit second cut of the sm component shell -- nothing implemented
yet. This commit was SVN r4247.
Этот коммит содержится в:
родитель
a9ffe42457
Коммит
97d5f61558
1
src/mca/coll/sm/.ompi_unignore
Обычный файл
1
src/mca/coll/sm/.ompi_unignore
Обычный файл
@ -0,0 +1 @@
|
|||||||
|
jsquyres
|
@ -20,15 +20,24 @@ EXTRA_DIST = VERSION
|
|||||||
|
|
||||||
sources = \
|
sources = \
|
||||||
coll_sm.h \
|
coll_sm.h \
|
||||||
coll_sm.c \
|
|
||||||
coll_sm_allgather.c \
|
coll_sm_allgather.c \
|
||||||
|
coll_sm_allgatherv.c \
|
||||||
|
coll_sm_allreduce.c \
|
||||||
coll_sm_alltoall.c \
|
coll_sm_alltoall.c \
|
||||||
|
coll_sm_alltoallv.c \
|
||||||
|
coll_sm_alltoallw.c \
|
||||||
coll_sm_barrier.c \
|
coll_sm_barrier.c \
|
||||||
coll_sm_bcast.c \
|
coll_sm_bcast.c \
|
||||||
coll_sm_component.c \
|
coll_sm_component.c \
|
||||||
coll_sm_gather.c \
|
coll_sm_gather.c \
|
||||||
|
coll_sm_gatherv.c \
|
||||||
|
coll_sm_module.c \
|
||||||
coll_sm_reduce.c \
|
coll_sm_reduce.c \
|
||||||
coll_sm_scatter.c
|
coll_sm_reduce_scatter.c \
|
||||||
|
coll_sm_scan.c \
|
||||||
|
coll_sm_exscan.c \
|
||||||
|
coll_sm_scatter.c \
|
||||||
|
coll_sm_scatterv.c
|
||||||
|
|
||||||
# Make the output library in this directory, and name it either
|
# Make the output library in this directory, and name it either
|
||||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||||
|
@ -1,191 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 <stdio.h>
|
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "communicator/communicator.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "mca/coll/base/base.h"
|
|
||||||
#include "coll_sm.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Linear set of collective algorithms
|
|
||||||
*/
|
|
||||||
static const mca_coll_base_module_1_0_0_t sm_func_ptrs = {
|
|
||||||
|
|
||||||
/* Initialization / finalization functions */
|
|
||||||
|
|
||||||
mca_coll_sm_module_init,
|
|
||||||
mca_coll_sm_module_finalize,
|
|
||||||
|
|
||||||
/* Collective function pointers */
|
|
||||||
|
|
||||||
mca_coll_sm_allgather,
|
|
||||||
NULL, /* Goto basic */
|
|
||||||
NULL,
|
|
||||||
mca_coll_sm_alltoall,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
mca_coll_sm_barrier,
|
|
||||||
mca_coll_sm_bcast,
|
|
||||||
NULL,
|
|
||||||
mca_coll_sm_gather,
|
|
||||||
NULL,
|
|
||||||
mca_coll_sm_reduce,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
mca_coll_sm_scatter,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Open function to initialize a few parameters and return success for
|
|
||||||
* selection
|
|
||||||
*/
|
|
||||||
int mca_coll_sm_open(void)
|
|
||||||
{
|
|
||||||
/* VPS: Initialize some run-time MCA parameters here - if required
|
|
||||||
- such as "sm_message_pool_size" or "sm_number_of_segments",
|
|
||||||
that kinda. For example:
|
|
||||||
mca_base_param_register_int("coll", "sm", "message_pool_size",
|
|
||||||
NULL, 1024)
|
|
||||||
*/
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Anything that needs to be done which is opposite of what was done
|
|
||||||
* in open() should be done here. If nothing, just return OMPI_SUCCESS
|
|
||||||
*/
|
|
||||||
int mca_coll_sm_close(void)
|
|
||||||
{
|
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initial query function that is invoked during MPI_INIT, allowing
|
|
||||||
* this module to indicate what level of thread support it provides.
|
|
||||||
*/
|
|
||||||
int mca_coll_sm_init_query(bool *allow_multi_user_threads,
|
|
||||||
bool *have_hidden_user_threads)
|
|
||||||
{
|
|
||||||
*allow_multi_user_threads = true;
|
|
||||||
*have_hidden_user_threads = false;
|
|
||||||
|
|
||||||
/* VPS: Nothing else needs to be done here */
|
|
||||||
|
|
||||||
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_sm_comm_query(struct ompi_communicator_t *comm, int *priority)
|
|
||||||
{
|
|
||||||
|
|
||||||
/* Abort if intercomm */
|
|
||||||
|
|
||||||
if (OMPI_COMM_IS_INTER(comm))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
/* VPS: Find out whether all the processes in the comm are on the
|
|
||||||
same node - if not, return NULL */
|
|
||||||
|
|
||||||
/* VPS: Decide what needs to be done if only one process - if only
|
|
||||||
one process, return NULL, so that "basic" module can be
|
|
||||||
picked */
|
|
||||||
|
|
||||||
/* VPS: Now check if enough shared memory can be allocated for
|
|
||||||
this communicator. First allocate space for the local per
|
|
||||||
communicator structure. Lowest ranked process will create the
|
|
||||||
area and send the shmid to rest of the processes. All other
|
|
||||||
processes will see if they can attach to it. If yes then
|
|
||||||
success otherwise they will return NULL
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Set the default priority */
|
|
||||||
|
|
||||||
*priority = 50;
|
|
||||||
|
|
||||||
/* VPS: Get "basic" coll module function pointers so that we can
|
|
||||||
use them for some collective operations that we may need to do
|
|
||||||
now */
|
|
||||||
|
|
||||||
/* VPS: If required allreduce - using basic fn ptrs to confirm
|
|
||||||
that all the processes have successfully attached the shared
|
|
||||||
memory buffer */
|
|
||||||
|
|
||||||
/* VPS: Return the function pointer struct for basic coll got
|
|
||||||
above, the sm coll function pointers will be returned during
|
|
||||||
"init" of comm below */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Unquery the coll on comm
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
mca_coll_sm_comm_unquery(struct ompi_communicator_t *comm)
|
|
||||||
{
|
|
||||||
|
|
||||||
/* VPS: do the reverse of what was done in query. Can do the following
|
|
||||||
things:
|
|
||||||
- free the sm coll specific data on the comm
|
|
||||||
- remove the shared memory area that was allocated
|
|
||||||
*/
|
|
||||||
|
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Init module on the communicator
|
|
||||||
*/
|
|
||||||
const struct mca_coll_base_module_1_0_0_t *
|
|
||||||
mca_coll_sm_module_init(struct ompi_communicator_t *comm)
|
|
||||||
{
|
|
||||||
/* VPS: When this module has been selected, it's all about creating and
|
|
||||||
* initializing the module-specific data that hangs off the
|
|
||||||
* communicator.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* VPS: Allocate and initialize the data that hangs off the
|
|
||||||
communicator */
|
|
||||||
|
|
||||||
/* VPS: Now return the SM coll specific function pointers */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Finalize module on the communicator
|
|
||||||
*/
|
|
||||||
int mca_coll_sm_module_finalize(struct ompi_communicator_t *comm)
|
|
||||||
{
|
|
||||||
/* VPS: Free data which was allocated during init */
|
|
||||||
|
|
||||||
/* VPS: Can also inturn call mca_coll_sm_comm_unquery to finalize
|
|
||||||
other things */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -27,76 +27,129 @@ extern "C" {
|
|||||||
|
|
||||||
#define PUB(foo) mca_coll_sm##foo
|
#define PUB(foo) mca_coll_sm##foo
|
||||||
|
|
||||||
/* Structure for sm collective module, per communicator. The structure
|
/* Structure for sm collective module, per communicator. The
|
||||||
mainly stores memory pointers to the specific poritions in the shared
|
structure mainly stores memory pointers to the specific
|
||||||
memory area. Each shared memory area is reserved for special functions.
|
poritions in the shared memory area. Each shared memory area is
|
||||||
The shared memory is split between two types of areas. One is control
|
reserved for special functions. The shared memory is split
|
||||||
section that stores shared flags used during synchronization, while other
|
between two types of areas. One is control section that stores
|
||||||
section is purely used to pass messages from one process to other. */
|
shared flags used during synchronization, while other section
|
||||||
|
is purely used to pass messages from one process to other. */
|
||||||
|
|
||||||
typedef struct mca_coll_base_module_comm_t {
|
typedef struct mca_coll_base_module_comm_t {
|
||||||
|
|
||||||
/* VPS: SM collective specific data to be cached on each comm goes
|
/* JMS fill in here */
|
||||||
here */
|
int foo;
|
||||||
|
|
||||||
} mca_coll_base_module_comm_t;
|
} mca_coll_base_module_comm_t;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Globally exported variables
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
OMPI_DECLSPEC extern const mca_coll_base_component_1_0_0_t mca_coll_sm_component;
|
||||||
* Globally exported variables
|
OMPI_DECLSPEC extern int mca_coll_sm_param_priority;
|
||||||
*/
|
|
||||||
|
|
||||||
OMPI_DECLSPEC extern const mca_coll_base_component_1_0_0_t mca_coll_sm_component;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* coll API functions
|
* coll module functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int mca_coll_sm_open(void);
|
|
||||||
int mca_coll_sm_close(void);
|
|
||||||
|
|
||||||
int mca_coll_sm_init_query(bool *allow_multi_user_threads,
|
int mca_coll_sm_init_query(bool *allow_multi_user_threads,
|
||||||
bool *have_hidden_threads);
|
bool *have_hidden_threads);
|
||||||
|
|
||||||
const struct mca_coll_base_module_1_0_0_t *
|
const struct mca_coll_base_module_1_0_0_t *
|
||||||
mca_coll_sm_comm_query(struct ompi_communicator_t *comm, int *priority);
|
mca_coll_sm_comm_query(struct ompi_communicator_t *comm, int *priority,
|
||||||
|
mca_coll_base_module_comm_t **data);
|
||||||
|
|
||||||
int mca_coll_sm_comm_unquery(struct ompi_communicator_t *comm);
|
int mca_coll_sm_comm_unquery(struct ompi_communicator_t *comm,
|
||||||
|
mca_coll_base_module_comm_t *data);
|
||||||
|
|
||||||
const struct mca_coll_base_module_1_0_0_t *
|
const struct mca_coll_base_module_1_0_0_t *
|
||||||
mca_coll_sm_module_init(struct ompi_communicator_t *comm);
|
mca_coll_sm_module_init(struct ompi_communicator_t *comm);
|
||||||
|
|
||||||
int mca_coll_sm_module_finalize(struct ompi_communicator_t *comm);
|
int mca_coll_sm_module_finalize(struct ompi_communicator_t *comm);
|
||||||
|
|
||||||
|
int mca_coll_sm_allgather_intra(void *sbuf, int scount,
|
||||||
int mca_coll_sm_barrier(struct ompi_communicator_t *comm);
|
struct ompi_datatype_t *sdtype,
|
||||||
int mca_coll_sm_bcast(void *buff, int count,
|
void *rbuf, int rcount,
|
||||||
struct ompi_datatype_t *datatype, int root,
|
struct ompi_datatype_t *rdtype,
|
||||||
struct ompi_communicator_t *comm);
|
struct ompi_communicator_t *comm);
|
||||||
int mca_coll_sm_scatter(void *sbuf, int scount,
|
int mca_coll_sm_allgatherv_intra(void *sbuf, int scount,
|
||||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
struct ompi_datatype_t *sdtype,
|
||||||
int rcount, struct ompi_datatype_t *rdtype,
|
void * rbuf, int *rcounts, int *disps,
|
||||||
int root, struct ompi_communicator_t *comm);
|
struct ompi_datatype_t *rdtype,
|
||||||
int mca_coll_sm_reduce(void *sbuf, void* rbuf, int count,
|
struct ompi_communicator_t *comm);
|
||||||
struct ompi_datatype_t *dtype,
|
int mca_coll_sm_allreduce_intra(void *sbuf, void *rbuf, int count,
|
||||||
struct ompi_op_t *op,
|
struct ompi_datatype_t *dtype,
|
||||||
int root, struct ompi_communicator_t *comm);
|
struct ompi_op_t *op,
|
||||||
int mca_coll_sm_gather(void *sbuf, int scount,
|
struct ompi_communicator_t *comm);
|
||||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
int mca_coll_sm_alltoall_intra(void *sbuf, int scount,
|
||||||
int rcount, struct ompi_datatype_t *rdtype,
|
struct ompi_datatype_t *sdtype,
|
||||||
int root, struct ompi_communicator_t *comm);
|
void* rbuf, int rcount,
|
||||||
int mca_coll_sm_alltoall(void *sbuf, int scount,
|
struct ompi_datatype_t *rdtype,
|
||||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
struct ompi_communicator_t *comm);
|
||||||
int rcount, struct ompi_datatype_t *rdtype,
|
int mca_coll_sm_alltoallv_intra(void *sbuf, int *scounts, int *sdisps,
|
||||||
struct ompi_communicator_t *comm);
|
struct ompi_datatype_t *sdtype,
|
||||||
int mca_coll_sm_allgather(void *sbuf, int scount,
|
void *rbuf, int *rcounts, int *rdisps,
|
||||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
struct ompi_datatype_t *rdtype,
|
||||||
int rcount, struct ompi_datatype_t *rdtype,
|
struct ompi_communicator_t *comm);
|
||||||
struct ompi_communicator_t *comm);
|
int mca_coll_sm_alltoallw_intra(void *sbuf, int *scounts, int *sdisps,
|
||||||
|
struct ompi_datatype_t **sdtypes,
|
||||||
/* VPS: Any other module utility function prototypes can go in here */
|
void *rbuf, int *rcounts, int *rdisps,
|
||||||
|
struct ompi_datatype_t **rdtypes,
|
||||||
|
struct ompi_communicator_t *comm);
|
||||||
|
int mca_coll_sm_barrier_intra(struct ompi_communicator_t *comm);
|
||||||
|
int mca_coll_sm_bcast_intra(void *buff, int count,
|
||||||
|
struct ompi_datatype_t *datatype,
|
||||||
|
int root,
|
||||||
|
struct ompi_communicator_t *comm);
|
||||||
|
int mca_coll_sm_bcast_log_intra(void *buff, int count,
|
||||||
|
struct ompi_datatype_t *datatype,
|
||||||
|
int root,
|
||||||
|
struct ompi_communicator_t *comm);
|
||||||
|
int mca_coll_sm_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_sm_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_sm_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_sm_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_sm_reduce_log_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_sm_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_sm_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_sm_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_sm_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)
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,28 +14,21 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "include/constants.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "communicator/communicator.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "mca/coll/base/base.h"
|
|
||||||
#include "coll_sm.h"
|
#include "coll_sm.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* allgather
|
* allgather
|
||||||
*
|
*
|
||||||
* Function: - allgather using other MPI collections
|
* Function: - allgather
|
||||||
* Accepts: - same as MPI_Allgather()
|
* Accepts: - same as MPI_Allgather()
|
||||||
* Returns: - MPI_SUCCESS or error code
|
* Returns: - MPI_SUCCESS or error code
|
||||||
*/
|
*/
|
||||||
int
|
int mca_coll_sm_allgather_intra(void *sbuf, int scount,
|
||||||
mca_coll_sm_allgather(void *sbuf, int scount,
|
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
int rcount, struct ompi_datatype_t *rdtype,
|
||||||
int rcount, struct ompi_datatype_t *rdtype,
|
struct ompi_communicator_t *comm)
|
||||||
struct ompi_communicator_t *comm)
|
|
||||||
{
|
{
|
||||||
|
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||||
return MPI_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
35
src/mca/coll/sm/coll_sm_allgatherv.c
Обычный файл
35
src/mca/coll/sm/coll_sm_allgatherv.c
Обычный файл
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* 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_sm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* allgatherv_intra
|
||||||
|
*
|
||||||
|
* Function: - allgatherv
|
||||||
|
* Accepts: - same as MPI_Allgatherv()
|
||||||
|
* Returns: - MPI_SUCCESS or error code
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_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_ERR_NOT_IMPLEMENTED;
|
||||||
|
}
|
34
src/mca/coll/sm/coll_sm_allreduce.c
Обычный файл
34
src/mca/coll/sm/coll_sm_allreduce.c
Обычный файл
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* 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_sm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* allreduce_intra
|
||||||
|
*
|
||||||
|
* Function: - allreduce using other MPI collectives
|
||||||
|
* Accepts: - same as MPI_Allreduce()
|
||||||
|
* Returns: - MPI_SUCCESS or error code
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_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_ERR_NOT_IMPLEMENTED;
|
||||||
|
}
|
@ -14,12 +14,7 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "include/constants.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "communicator/communicator.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "mca/coll/base/base.h"
|
|
||||||
#include "coll_sm.h"
|
#include "coll_sm.h"
|
||||||
|
|
||||||
|
|
||||||
@ -30,11 +25,10 @@
|
|||||||
* Accepts: - same as MPI_Alltoall()
|
* Accepts: - same as MPI_Alltoall()
|
||||||
* Returns: - MPI_SUCCESS or an MPI error code
|
* Returns: - MPI_SUCCESS or an MPI error code
|
||||||
*/
|
*/
|
||||||
int
|
int mca_coll_sm_alltoall_intra(void *sbuf, int scount,
|
||||||
mca_coll_sm_alltoall(void *sbuf, int scount,
|
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
int rcount, struct ompi_datatype_t *rdtype,
|
||||||
int rcount, struct ompi_datatype_t *rdtype,
|
struct ompi_communicator_t *comm)
|
||||||
struct ompi_communicator_t *comm)
|
|
||||||
{
|
{
|
||||||
return MPI_SUCCESS;
|
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
35
src/mca/coll/sm/coll_sm_alltoallv.c
Обычный файл
35
src/mca/coll/sm/coll_sm_alltoallv.c
Обычный файл
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* 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_sm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* alltoallv_intra
|
||||||
|
*
|
||||||
|
* Function: - MPI_Alltoallv
|
||||||
|
* Accepts: - same as MPI_Alltoallv()
|
||||||
|
* Returns: - MPI_SUCCESS or an MPI error code
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_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_ERR_NOT_IMPLEMENTED;
|
||||||
|
}
|
35
src/mca/coll/sm/coll_sm_alltoallw.c
Обычный файл
35
src/mca/coll/sm/coll_sm_alltoallw.c
Обычный файл
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* 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_sm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* alltoallw_intra
|
||||||
|
*
|
||||||
|
* Function: - MPI_Alltoallw
|
||||||
|
* Accepts: - same as MPI_Alltoallw()
|
||||||
|
* Returns: - MPI_SUCCESS or an MPI error code
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_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_ERR_NOT_IMPLEMENTED;
|
||||||
|
}
|
@ -14,12 +14,7 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "include/constants.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "communicator/communicator.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "mca/coll/base/base.h"
|
|
||||||
#include "coll_sm.h"
|
#include "coll_sm.h"
|
||||||
|
|
||||||
|
|
||||||
@ -30,8 +25,7 @@
|
|||||||
* Accepts: - same as MPI_Barrier()
|
* Accepts: - same as MPI_Barrier()
|
||||||
* Returns: - MPI_SUCCESS or error code
|
* Returns: - MPI_SUCCESS or error code
|
||||||
*/
|
*/
|
||||||
int
|
int mca_coll_sm_barrier_intra(struct ompi_communicator_t *comm)
|
||||||
mca_coll_sm_barrier(struct ompi_communicator_t *comm)
|
|
||||||
{
|
{
|
||||||
return MPI_SUCCESS;
|
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
@ -14,25 +14,20 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "include/constants.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "communicator/communicator.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "mca/coll/base/base.h"
|
|
||||||
#include "coll_sm.h"
|
#include "coll_sm.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bcast
|
* bcast
|
||||||
*
|
*
|
||||||
* Function: - shared memory bcast
|
* Function: - broadcast
|
||||||
* Accepts: - same as MPI_Bcast()
|
* Accepts: - same as MPI_Bcast()
|
||||||
* Returns: - MPI_SUCCESS or error code
|
* Returns: - MPI_SUCCESS or error code
|
||||||
*/
|
*/
|
||||||
int
|
int mca_coll_sm_bcast_intra(void *buff, int count,
|
||||||
mca_coll_sm_bcast(void *buff, int count,
|
struct ompi_datatype_t *datatype, int root,
|
||||||
struct ompi_datatype_t *datatype, int root,
|
struct ompi_communicator_t *comm)
|
||||||
struct ompi_communicator_t *comm)
|
|
||||||
{
|
{
|
||||||
return MPI_SUCCESS;
|
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
@ -19,18 +19,26 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
|
#include "include/constants.h"
|
||||||
|
#include "mca/coll/coll.h"
|
||||||
#include "coll_sm.h"
|
#include "coll_sm.h"
|
||||||
#include "mca/coll/sm/coll-sm-version.h"
|
#include "mca/coll/sm/coll-sm-version.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "coll_sm.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Public string showing the coll ompi_sm component version number
|
* Public string showing the coll ompi_sm component version number
|
||||||
*/
|
*/
|
||||||
const char *mca_coll_sm_component_version_string =
|
const char *mca_coll_sm_component_version_string =
|
||||||
"Open MPI sm collective MCA component version " MCA_coll_sm_FULL_VERSION;
|
"Open MPI sm collective MCA component version " MCA_coll_sm_VERSION;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Local functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
static int sm_open(void);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Instantiate the public struct with all of our public information
|
* Instantiate the public struct with all of our public information
|
||||||
@ -39,39 +47,54 @@ const char *mca_coll_sm_component_version_string =
|
|||||||
|
|
||||||
const mca_coll_base_component_1_0_0_t mca_coll_sm_component = {
|
const mca_coll_base_component_1_0_0_t mca_coll_sm_component = {
|
||||||
|
|
||||||
/* First, the mca_component_t struct containing meta information
|
/* First, the mca_component_t struct containing meta information
|
||||||
about the component itself */
|
about the component itself */
|
||||||
|
|
||||||
{
|
{
|
||||||
/* Indicate that we are a coll v1.0.0 component (which also implies a
|
/* Indicate that we are a coll v1.0.0 component (which also
|
||||||
specific MCA version) */
|
implies a specific MCA version) */
|
||||||
|
|
||||||
MCA_COLL_BASE_VERSION_1_0_0,
|
MCA_COLL_BASE_VERSION_1_0_0,
|
||||||
|
|
||||||
/* Component name and version */
|
/* Component name and version */
|
||||||
|
|
||||||
"sm",
|
"sm",
|
||||||
MCA_coll_sm_MAJOR_VERSION,
|
MCA_coll_sm_MAJOR_VERSION,
|
||||||
MCA_coll_sm_MINOR_VERSION,
|
MCA_coll_sm_MINOR_VERSION,
|
||||||
MCA_coll_sm_RELEASE_VERSION,
|
MCA_coll_sm_RELEASE_VERSION,
|
||||||
|
|
||||||
/* Component open and close functions */
|
/* Component open and close functions */
|
||||||
|
|
||||||
mca_coll_sm_open,
|
sm_open,
|
||||||
mca_coll_sm_close
|
NULL
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Next the MCA v1.0.0 component meta data */
|
/* Next the MCA v1.0.0 component meta data */
|
||||||
|
|
||||||
{
|
{
|
||||||
/* Whether the component is checkpointable or not */
|
/* Whether the component is checkpointable or not */
|
||||||
|
|
||||||
true
|
true
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Initialization / querying functions */
|
/* Initialization / querying functions */
|
||||||
|
|
||||||
mca_coll_sm_init_query,
|
mca_coll_sm_init_query,
|
||||||
mca_coll_sm_comm_query,
|
mca_coll_sm_comm_query,
|
||||||
mca_coll_sm_comm_unquery,
|
mca_coll_sm_comm_unquery,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Open the component
|
||||||
|
*/
|
||||||
|
static int sm_open(void)
|
||||||
|
{
|
||||||
|
/* If we want to be selected (i.e., all procs on one node), then
|
||||||
|
we should have a high priority */
|
||||||
|
|
||||||
|
mca_coll_sm_param_priority =
|
||||||
|
mca_base_param_register_int("coll", "sm", "priority", NULL, 75);
|
||||||
|
|
||||||
|
return OMPI_SUCCESS;
|
||||||
|
}
|
||||||
|
34
src/mca/coll/sm/coll_sm_exscan.c
Обычный файл
34
src/mca/coll/sm/coll_sm_exscan.c
Обычный файл
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* 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_sm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* exscan_intra
|
||||||
|
*
|
||||||
|
* Function: - basic exscan operation
|
||||||
|
* Accepts: - same arguments as MPI_Exscan()
|
||||||
|
* Returns: - MPI_SUCCESS or error code
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||||
|
struct ompi_datatype_t *dtype,
|
||||||
|
struct ompi_op_t *op,
|
||||||
|
struct ompi_communicator_t *comm)
|
||||||
|
{
|
||||||
|
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||||
|
}
|
@ -14,12 +14,7 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "include/constants.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "communicator/communicator.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "mca/coll/base/base.h"
|
|
||||||
#include "coll_sm.h"
|
#include "coll_sm.h"
|
||||||
|
|
||||||
|
|
||||||
@ -30,11 +25,10 @@
|
|||||||
* Accepts: - same as MPI_Gather()
|
* Accepts: - same as MPI_Gather()
|
||||||
* Returns: - MPI_SUCCESS or error code
|
* Returns: - MPI_SUCCESS or error code
|
||||||
*/
|
*/
|
||||||
int
|
int mca_coll_sm_gather_intra(void *sbuf, int scount,
|
||||||
mca_coll_sm_gather(void *sbuf, int scount,
|
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
int rcount, struct ompi_datatype_t *rdtype,
|
||||||
int rcount, struct ompi_datatype_t *rdtype,
|
int root, struct ompi_communicator_t *comm)
|
||||||
int root, struct ompi_communicator_t *comm)
|
|
||||||
{
|
{
|
||||||
return MPI_SUCCESS;
|
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
35
src/mca/coll/sm/coll_sm_gatherv.c
Обычный файл
35
src/mca/coll/sm/coll_sm_gatherv.c
Обычный файл
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* 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_sm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* gatherv_intra
|
||||||
|
*
|
||||||
|
* Function: - basic gatherv operation
|
||||||
|
* Accepts: - same arguments as MPI_Gatherb()
|
||||||
|
* Returns: - MPI_SUCCESS or error code
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_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_ERR_NOT_IMPLEMENTED;
|
||||||
|
}
|
145
src/mca/coll/sm/coll_sm_module.c
Обычный файл
145
src/mca/coll/sm/coll_sm_module.c
Обычный файл
@ -0,0 +1,145 @@
|
|||||||
|
/*
|
||||||
|
* 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 <stdio.h>
|
||||||
|
|
||||||
|
#include "mpi.h"
|
||||||
|
#include "communicator/communicator.h"
|
||||||
|
#include "mca/coll/coll.h"
|
||||||
|
#include "mca/coll/base/base.h"
|
||||||
|
#include "coll_sm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Linear set of collective algorithms
|
||||||
|
*/
|
||||||
|
static const mca_coll_base_module_1_0_0_t module = {
|
||||||
|
|
||||||
|
/* Initialization / finalization functions */
|
||||||
|
|
||||||
|
mca_coll_sm_module_init,
|
||||||
|
mca_coll_sm_module_finalize,
|
||||||
|
|
||||||
|
/* Collective function pointers */
|
||||||
|
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
mca_coll_sm_barrier_intra,
|
||||||
|
mca_coll_sm_bcast_intra,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
int mca_coll_sm_param_priority = -1;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initial query function that is invoked during MPI_INIT, allowing
|
||||||
|
* this module to indicate what level of thread support it provides.
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_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_sm_comm_query(struct ompi_communicator_t *comm, int *priority,
|
||||||
|
mca_coll_base_module_comm_t **data)
|
||||||
|
{
|
||||||
|
/* If we're intercomm, or if there's only one process in the
|
||||||
|
communicator, we don't want to run */
|
||||||
|
|
||||||
|
if (OMPI_COMM_IS_INTER(comm) || 1 == ompi_comm_size(comm)) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get our priority */
|
||||||
|
|
||||||
|
if (OMPI_SUCCESS !=
|
||||||
|
mca_base_param_lookup_int(mca_coll_sm_param_priority,
|
||||||
|
priority)) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We only want to run if all the processes in the communicator
|
||||||
|
are on the same node */
|
||||||
|
|
||||||
|
/* Can we get an mpool allocation? */
|
||||||
|
|
||||||
|
/* JMS ... */
|
||||||
|
|
||||||
|
return &module;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Unquery the coll on comm
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_comm_unquery(struct ompi_communicator_t *comm,
|
||||||
|
mca_coll_base_module_comm_t *data)
|
||||||
|
{
|
||||||
|
/* JMS */
|
||||||
|
/* Remove mpool query, if we got one */
|
||||||
|
|
||||||
|
return OMPI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init module on the communicator
|
||||||
|
*/
|
||||||
|
const struct mca_coll_base_module_1_0_0_t *
|
||||||
|
mca_coll_sm_module_init(struct ompi_communicator_t *comm)
|
||||||
|
{
|
||||||
|
/* JMS */
|
||||||
|
|
||||||
|
return &module;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Finalize module on the communicator
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_module_finalize(struct ompi_communicator_t *comm)
|
||||||
|
{
|
||||||
|
/* JMS */
|
||||||
|
|
||||||
|
return OMPI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -14,12 +14,7 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "include/constants.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "communicator/communicator.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "mca/coll/base/base.h"
|
|
||||||
#include "coll_sm.h"
|
#include "coll_sm.h"
|
||||||
|
|
||||||
|
|
||||||
@ -30,12 +25,11 @@
|
|||||||
* Accepts: - same as MPI_Reduce()
|
* Accepts: - same as MPI_Reduce()
|
||||||
* Returns: - MPI_SUCCESS or error code
|
* Returns: - MPI_SUCCESS or error code
|
||||||
*/
|
*/
|
||||||
int
|
int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count,
|
||||||
mca_coll_sm_reduce(void *sbuf, void* rbuf, int count,
|
struct ompi_datatype_t *dtype,
|
||||||
struct ompi_datatype_t *dtype,
|
struct ompi_op_t *op,
|
||||||
struct ompi_op_t *op,
|
int root, struct ompi_communicator_t *comm)
|
||||||
int root, struct ompi_communicator_t *comm)
|
|
||||||
{
|
{
|
||||||
return MPI_SUCCESS;
|
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
34
src/mca/coll/sm/coll_sm_reduce_scatter.c
Обычный файл
34
src/mca/coll/sm/coll_sm_reduce_scatter.c
Обычный файл
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* 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_sm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* reduce_scatter
|
||||||
|
*
|
||||||
|
* Function: - reduce then scatter
|
||||||
|
* Accepts: - same as MPI_Reduce_scatter()
|
||||||
|
* Returns: - MPI_SUCCESS or error code
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_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_ERR_NOT_IMPLEMENTED;
|
||||||
|
}
|
@ -14,12 +14,21 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "include/constants.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "communicator/communicator.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "mca/coll/base/base.h"
|
|
||||||
#include "coll_sm.h"
|
#include "coll_sm.h"
|
||||||
|
|
||||||
/* VPS: All utility functions required for shmem module can go in here */
|
|
||||||
|
/*
|
||||||
|
* scan
|
||||||
|
*
|
||||||
|
* Function: - basic scan operation
|
||||||
|
* Accepts: - same arguments as MPI_Scan()
|
||||||
|
* Returns: - MPI_SUCCESS or error code
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_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_ERR_NOT_IMPLEMENTED;
|
||||||
|
}
|
@ -14,12 +14,7 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "include/constants.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
|
||||||
#include "communicator/communicator.h"
|
|
||||||
#include "mca/coll/coll.h"
|
|
||||||
#include "mca/coll/base/base.h"
|
|
||||||
#include "coll_sm.h"
|
#include "coll_sm.h"
|
||||||
|
|
||||||
|
|
||||||
@ -30,11 +25,10 @@
|
|||||||
* Accepts: - same as MPI_Scatter()
|
* Accepts: - same as MPI_Scatter()
|
||||||
* Returns: - MPI_SUCCESS or error code
|
* Returns: - MPI_SUCCESS or error code
|
||||||
*/
|
*/
|
||||||
int
|
int mca_coll_sm_scatter_intra(void *sbuf, int scount,
|
||||||
mca_coll_sm_scatter(void *sbuf, int scount,
|
struct ompi_datatype_t *sdtype, void *rbuf,
|
||||||
struct ompi_datatype_t *sdtype, void *rbuf,
|
int rcount, struct ompi_datatype_t *rdtype,
|
||||||
int rcount, struct ompi_datatype_t *rdtype,
|
int root, struct ompi_communicator_t *comm)
|
||||||
int root, struct ompi_communicator_t *comm)
|
|
||||||
{
|
{
|
||||||
return MPI_SUCCESS;
|
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
35
src/mca/coll/sm/coll_sm_scatterv.c
Обычный файл
35
src/mca/coll/sm/coll_sm_scatterv.c
Обычный файл
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* 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_sm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* scatterv_intra
|
||||||
|
*
|
||||||
|
* Function: - scatterv operation
|
||||||
|
* Accepts: - same arguments as MPI_Scatterv()
|
||||||
|
* Returns: - MPI_SUCCESS or error code
|
||||||
|
*/
|
||||||
|
int mca_coll_sm_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_ERR_NOT_IMPLEMENTED;
|
||||||
|
}
|
@ -13,7 +13,5 @@
|
|||||||
# $HEADER$
|
# $HEADER$
|
||||||
#
|
#
|
||||||
|
|
||||||
# Specific to this module
|
|
||||||
|
|
||||||
PARAM_INIT_FILE=coll_sm.c
|
PARAM_INIT_FILE=coll_sm.c
|
||||||
PARAM_CONFIG_FILES=Makefile
|
PARAM_CONFIG_FILES=Makefile
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user