SimGrid  3.14.159
Versatile Simulation of Distributed Systems
allreduce-ompi-ring-segmented.c File Reference
#include "colls_private.h"

Macros

#define COLL_TUNED_COMPUTED_SEGCOUNT(SEGSIZE, TYPELNG, SEGCOUNT)
 
#define COLL_TUNED_COMPUTE_BLOCKCOUNT(COUNT, NUM_BLOCKS, SPLIT_INDEX, EARLY_BLOCK_COUNT, LATE_BLOCK_COUNT)
 

Functions

int smpi_coll_tuned_allreduce_ompi_ring_segmented (void *sbuf, void *rbuf, int count, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 

Macro Definition Documentation

◆ COLL_TUNED_COMPUTED_SEGCOUNT

#define COLL_TUNED_COMPUTED_SEGCOUNT (   SEGSIZE,
  TYPELNG,
  SEGCOUNT 
)
Value:
if( ((SEGSIZE) >= (TYPELNG)) && \
((SEGSIZE) < ((TYPELNG) * (SEGCOUNT))) ) { \
size_t residual; \
(SEGCOUNT) = (int)((SEGSIZE) / (TYPELNG)); \
residual = (SEGSIZE) - (SEGCOUNT) * (TYPELNG); \
if( residual > ((TYPELNG) >> 1) ) \
(SEGCOUNT)++; \
} \

◆ COLL_TUNED_COMPUTE_BLOCKCOUNT

#define COLL_TUNED_COMPUTE_BLOCKCOUNT (   COUNT,
  NUM_BLOCKS,
  SPLIT_INDEX,
  EARLY_BLOCK_COUNT,
  LATE_BLOCK_COUNT 
)
Value:
EARLY_BLOCK_COUNT = LATE_BLOCK_COUNT = COUNT / NUM_BLOCKS; \
SPLIT_INDEX = COUNT % NUM_BLOCKS; \
if (0 != SPLIT_INDEX) { \
EARLY_BLOCK_COUNT = EARLY_BLOCK_COUNT + 1; \
} \

Function Documentation

◆ smpi_coll_tuned_allreduce_ompi_ring_segmented()

int smpi_coll_tuned_allreduce_ompi_ring_segmented ( void sbuf,
void rbuf,
int  count,
MPI_Datatype  dtype,
MPI_Op  op,
MPI_Comm  comm 
)