MPIBlib: MPI Benchmark library

Operation-specific benchmarks

Functions

void MPIB_bcast_timer_init (MPI_Comm comm, int parallel, MPIB_precision precision)
void MPIB_measure_bcast (MPIB_Bcast bcast, MPI_Comm comm, int root, int M, int max_reps, MPIB_result *result)

Detailed Description

This module provides operation-specific benchmarks.


Function Documentation

void MPIB_bcast_timer_init ( MPI_Comm  comm,
int  parallel,
MPIB_precision  precision 
)

Performs the p2p benchmark with empty message with given precision and sets up an internal global variable, which is used by MPIB_measure_bcast. Called by MPIB_measure_bcast. Can be called directly before measurements.

Attention:
As the global variable is an array, the memory should be freed by
 MPIB_bcast_timer_init(MPI_COMM_NULL, (MPIB_precision){0, 0, 0}) 
Parameters:
comm communicator
parallel several non-overlapped point-to-point communications at the same time if non-zero
precision measurement precision
void MPIB_measure_bcast ( MPIB_Bcast  bcast,
MPI_Comm  comm,
int  root,
int  M,
int  max_reps,
MPIB_result result 
)

Measures the execution time of bcast between root and the rest of processes. Based on . Reuses already obtained empty-roundtrip times if the previous initialization was performed on the same communicator. Otherwise, initializes the bcast timer by calling MPIB_bcast_timer_init.
In the loop over processes, except root:
In the loop over repetitions:

  • bcast at all processes except root and current process in the loop
  • bcast and empty recv at root and measures the execution time
  • bcast and empty send at current process in the loop

Having substructed the half of empty-roundtrip times, finds maximum.
Broadcasts the result.

Note:
No double barriers as no need in synchronization.
No precision as we cannot interrupt the process of measurement by broadcasting the error value after each repetition.
Parameters:
bcast bcast implementation
comm communicator
root root process
M message size
max_reps maximum number of repetitions
result measurement result