22 #ifndef MCA_COLL_HIERARCH_EXPORT_H
23 #define MCA_COLL_HIERARCH_EXPORT_H
28 #include "ompi_config.h"
29 #include "ompi/constants.h"
36 #include "ompi/communicator/communicator.h"
46 extern int mca_coll_hierarch_priority_param;
47 extern int mca_coll_hierarch_verbose_param;
48 extern int mca_coll_hierarch_use_rdma_param;
49 extern int mca_coll_hierarch_ignore_sm_param;
50 extern int mca_coll_hierarch_detection_alg_param;
51 extern int mca_coll_hierarch_bcast_alg_param;
52 extern int mca_coll_hierarch_segsize_param;
55 #define COLL_HIERARCH_SEG_BCAST_ALG 0
56 #define COLL_HIERARCH_SEG1_BCAST_ALG 1
57 #define COLL_HIERARCH_SEG2_BCAST_ALG 2
58 #define COLL_HIERARCH_SEG3_BCAST_ALG 3
59 #define COLL_HIERARCH_BASIC_BCAST_ALG 4
63 #define HIER_DEFAULT_NUM_LLEAD 5
83 int hier_num_lleaders;
87 int hier_num_colorarr;
108 static inline int mca_coll_hierarch_count_lleaders (
int size,
int *carr)
116 int cnt, i, j, found;
119 llr = (
int *) malloc ( size *
sizeof(
int));
121 return OMPI_ERR_OUT_OF_RESOURCE;
125 for (cnt=1, i=1; i<size; i++ ) {
126 if ( carr[i] == MPI_UNDEFINED ) {
127 llr[cnt++] = carr[i];
130 for ( found=0, j=0; j<cnt; j++ ) {
131 if ( carr[i] == llr[j] ) {
137 llr[cnt++] = carr[i];
145 static inline int mca_coll_hierarch_get_offset (
int rank,
int size,
int *carr)
147 int offset, i, color = carr[rank];
149 if ( color == MPI_UNDEFINED ) {
154 for ( offset=0, i=0; i<=rank; i++) {
155 if ( carr[i] == color ) {
216 int mca_coll_hierarch_init_query(
bool allow_hierarch_user_threads,
217 bool have_hidden_threads);
227 int mca_coll_hierarch_allgather_intra(
void *sbuf,
int scount,
229 void *rbuf,
int rcount,
233 int mca_coll_hierarch_allgatherv_intra(
void *sbuf,
int scount,
235 void * rbuf,
int *rcounts,
240 int mca_coll_hierarch_allreduce_intra(
void *sbuf,
void *rbuf,
int count,
245 int mca_coll_hierarch_alltoall_intra(
void *sbuf,
int scount,
247 void* rbuf,
int rcount,
251 int mca_coll_hierarch_alltoallv_intra(
void *sbuf,
int *scounts,
254 void *rbuf,
int *rcounts,
259 int mca_coll_hierarch_alltoallw_intra(
void *sbuf,
int *scounts,
262 void *rbuf,
int *rcounts,
269 int mca_coll_hierarch_bcast_intra(
void *buff,
int count,
274 int mca_coll_hierarch_exscan_intra(
void *sbuf,
void *rbuf,
int count,
278 int mca_coll_hierarch_gather_intra(
void *sbuf,
int scount,
280 void *rbuf,
int rcount,
285 int mca_coll_hierarch_gatherv_intra(
void *sbuf,
int scount,
287 void *rbuf,
int *rcounts,
int *disps,
292 int mca_coll_hierarch_reduce_intra(
void *sbuf,
void* rbuf,
int count,
298 int mca_coll_hierarch_reduce_scatter_intra(
void *sbuf,
void *rbuf,
304 int mca_coll_hierarch_scan_intra(
void *sbuf,
void *rbuf,
int count,
309 int mca_coll_hierarch_scatter_intra(
void *sbuf,
int scount,
314 int mca_coll_hierarch_scatterv_intra(
void *sbuf,
int *scounts,
int *disps,
316 void* rbuf,
int rcount,
325 int mca_coll_hierarch_allgather_tmp(
void *sbuf,
int scount,
327 void *rbuf,
int rcount,
330 int mca_coll_hierarch_allreduce_tmp(
void *sbuf,
void *rbuf,
int count,
334 int mca_coll_hierarch_bcast_tmp (
void *buf,
int count,
struct ompi_datatype_t *dtype,
337 int mca_coll_hierarch_gather_tmp(
void *sbuf,
int scount,
339 void *rbuf,
int rcount,
342 int mca_coll_hierarch_reduce_tmp(
void *sbuf,
void *rbuf,
int count,
347 int mca_coll_hierarch_ft_event(
int status);
dynamic pointer array
Definition: opal_pointer_array.h:45
Collective module interface.
Definition: coll.h:316
Definition: ompi_datatype.h:68
Collective component interface.
Definition: coll.h:283
See opal_bitmap.h for an explanation of why there is a split between OPAL and ORTE for this generic c...
Top-level interface for all MCA components.
Collective Communication Interface.
Top-level description of requests.
Definition: coll_hierarch.h:97
Definition: coll_hierarch.h:77
Definition: communicator.h:118
Main top-level request struct definition.
Definition: request.h:100
Back-end type of MPI_Op.
Definition: op.h:100
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236