MPIBlib: MPI Benchmark library

Collective benchmarks

Classes

struct  MPIB_coll_container

Typedefs

typedef int(* MPIB_measure_coll )(MPIB_coll_container *container, MPI_Comm comm, int root, int M, MPIB_precision precision, MPIB_result *result)
typedef void(* MPIB_measure_coll_msgset )(MPIB_coll_container *container, MPI_Comm comm, int root, MPIB_msgset msgset, MPIB_precision precision, int *count, MPIB_result **results)

Functions

int MPIB_measure_max (MPIB_coll_container *container, MPI_Comm comm, int root, int M, MPIB_precision precision, MPIB_result *result)
void MPIB_root_timer_init (MPI_Comm comm, int reps)
int MPIB_measure_root (MPIB_coll_container *container, MPI_Comm comm, int root, int M, MPIB_precision precision, MPIB_result *result)
void MPIB_global_timer_init (MPI_Comm comm, int parallel, int reps)
int MPIB_measure_global (MPIB_coll_container *container, MPI_Comm comm, int root, int M, MPIB_precision precision, MPIB_result *result)

Detailed Description

This module provides collective benchmarks based on root, max and global timing methods (see ).


Typedef Documentation

typedef int(* MPIB_measure_coll)(MPIB_coll_container *container, MPI_Comm comm, int root, int M, MPIB_precision precision, MPIB_result *result)

Collective benchmark. Measures the execution time of collective operation for a given message size.

Parameters:
container communication operaion container
comm communicator
root root process
M message size
precision measurement precision
result measurement result
typedef void(* MPIB_measure_coll_msgset)(MPIB_coll_container *container, MPI_Comm comm, int root, MPIB_msgset msgset, MPIB_precision precision, int *count, MPIB_result **results)

Collective benchmark for multiple message sizes. Measures the execution time of collective operation for different message sizes.

Parameters:
container communication operaion container
comm communicator
root root process
msgset message sizes
precision measurement precision
count the number of measurements performed (significant only at the root processor)
results array of measurement results (significant only at the root processor, allocated by this function and must be deallocated by user)

Function Documentation

int MPIB_measure_max ( MPIB_coll_container container,
MPI_Comm  comm,
int  root,
int  M,
MPIB_precision  precision,
MPIB_result result 
)

Measures the execution time of collective operation at all processes and finds a maximum. In the loop over repetitions:

  • Synchronizes the processes by double barrier.
  • Measures the execution time of collective operation at all processes.
  • Finds maximum by allreduce.
  • Performs statistical analysis.
void MPIB_root_timer_init ( MPI_Comm  comm,
int  reps 
)

Measures the average execution time of barrier at all processes in the communicator and sets up an internal global variable, which is used by MPIB_measure_root. Called by MPIB_measure_root. Can be called directly before measurements.

Parameters:
comm communicator
reps number of repetitions (not precision - we assume no pipeline effect with barrier)
int MPIB_measure_root ( MPIB_coll_container container,
MPI_Comm  comm,
int  root,
int  M,
MPIB_precision  precision,
MPIB_result result 
)

Measures the execution time of collective operation at the root process. Reuses already obtained barrier time if the previous initialization was performed over the same communicator. Otherwise, initializes the root timer by calling MPIB_root_timer_init.
In the loop over repetitions:

  • Synchronizes the processes by double barrier.
  • Measures the execution time of collective operation and barrier confirmation at the root process.
  • Subtracts the execution time of barrier.
  • Performs statistical analysis at root.

Broadcasts the result.

void MPIB_global_timer_init ( MPI_Comm  comm,
int  parallel,
int  reps 
)

Measures the offsets between local clocks of of all processes in the communicator and sets up an internal global variable, which is used by MPIB_measure_global. If MPI_WTIME_IS_GLOBAL (MPI global timer) is defined, the offsets are set to zero. Otherwise, the offsets are measured. Called by MPIB_measure_global. Can be called directly before measurements.

Attention:
As the global variable is an array, the memory should be freed by
 MPIB_global_timer_init(MPI_COMM_NULL, 0) 
Parameters:
comm communicator
parallel several non-overlapped point-to-point communications at the same time if non-zero
reps number of repetitions (not precision because series of ping-pongs are required - we cannot interrupt them by sending/receiving the result of the statistical estimation)
int MPIB_measure_global ( MPIB_coll_container container,
MPI_Comm  comm,
int  root,
int  M,
MPIB_precision  precision,
MPIB_result result 
)

Measures the execution time of collective operation between processes using global time. Based on . Reuses already obtained offsets between local clocks if the previous initialization was performed on the same communicator. Otherwise, initializes the global timer by calling MPIB_global_timer_init.
In the loop over repetitions:

  • Synchronizes the processes by double barrier.
  • Measures the moment of start at the root and the moment of finish at the rest of processes.
  • Having substructed the offset, finds maximum by reducing to the root.
  • Performs statistical analysis at root.

Broadcasts the result.