CPM: A software tool for Communication Performance Modelling

The heterogeneous Hockney model

Classes

struct  Hockney_model

Functions

Hockney_modelHockney_alloc (int n)
void Hockney_free (Hockney_model *model)
void Hockney_read (FILE *stream, Hockney_model **model)
void Hockney_write (FILE *stream, const Hockney_model *model)
void Hockney_estimate (MPI_Comm comm, int M, MPIB_precision precision, int parallel, Hockney_model **model)
void Hockney_estimate_regression (MPI_Comm comm, MPIB_msgset msgset, MPIB_precision precision, int parallel, Hockney_model **model)
double Hockney_predict_p2p (void *_this, int i, int j, int M)
double Hockney_predict_sg_flat_serial (void *_this, int root, int M)
double Hockney_predict_sg_flat_parallel (void *_this, int root, int M)
double Hockney_predict_sg_binomial (void *_this, int root, int M)
double Hockney_hpredict_sg_flat_serial (void *_this, int M)
double Hockney_hpredict_sg_flat_parallel (void *_this, int M)
double Hockney_hpredict_sg_binomial (void *_this, int M)
void HHockney_estimate (MPI_Comm comm, MPIB_precision precision, MPIB_msgset msgset, Hockney_model **model)
double HHockney_predict_p2p (void *_this, int i, int j, int m)
double HHockney_predict_scatter_flat (void *_this, int root, int m, int n)

Detailed Description

This module provides building of the heterogeneous extension of the Hockney model and estimation of the execution time of point-to-point and collective communication operations.

In contrast to the original model , which is based on two point-to-point parameters, estimating the point-to-point execution time as $ T(M) = \alpha + \beta M $, the heterogeneous model distinguishes the parameters of each pair of processors $ T_{ij}(M) = \alpha_{ij} + \beta_{ij} M $.


Function Documentation

Hockney_model* Hockney_alloc ( int  n  ) 

Allocates memory for the Hockney model.

Parameters:
n number of processors
void Hockney_free ( Hockney_model model  ) 

Frees the Hockney model.

Parameters:
model the Hockney model
void Hockney_read ( FILE *  stream,
Hockney_model **  model 
)

Reads the Hockney model.

void Hockney_write ( FILE *  stream,
const Hockney_model model 
)

Writes the Hockney model.

void Hockney_estimate ( MPI_Comm  comm,
int  M,
MPIB_precision  precision,
int  parallel,
Hockney_model **  model 
)

Estimates the parameters of the Hockney model in two series of roundtrips with empty and non-empty messages. (accuracy depends on the precision of measurements):

  • Measures the execution time $ T_{ij}(0) $ of each $ i \xlongleftrightarrow[0]{0} j $ roundtrip in the communicator, $ i < j $, to find $ \alpha_{ij} = T_{ij}(0) $. To obtain more accurate results performs a series of roundtrips and takes the average $ T_{ij}(0) $.
  • Measures the execution time $ T_{ij}(M) $ of each $ i \xlongleftrightarrow[M]{M} j $ roundtrip in the communicator, $ i < j $, to find $ \beta_{ij} = \displaystyle\frac{T_{ij}(M) - \alpha_{ij}}{M} $. To obtain more accurate results performs a series of roundtrips and takes the average $ T_{ij}(M) $.
Parameters:
comm communicator, number of nodes $ \ge 2 $
M message size
precision measurement precision
parallel several non-overlapped point-to-point communications at the same time if non-zero
model Hockney model (significant only at root)
void Hockney_estimate_regression ( MPI_Comm  comm,
MPIB_msgset  msgset,
MPIB_precision  precision,
int  parallel,
Hockney_model **  model 
)

Estimates the parameters of the Hockney model in a series of roundtrips with different message sizes (accuracy depends on the message set):

  • Performs single communication experiments for different message sizes.
  • Selects message sizes regularly TODO: Adaptive selection, comparing the result of measurement with the prediction based on the linear regression over all previous results.
Parameters:
comm communicator, number of nodes $ \ge 2 $
msgset message set
precision measurement precision
parallel several non-overlapped point-to-point communications at the same time if non-zero
model Hockney model (significant only at root)
double Hockney_predict_p2p ( void *  _this,
int  i,
int  j,
int  M 
)

Predicts the execution time of a point-to-point communication as $ T_{ij}(M) = \alpha_{ij} + \beta_{ij} M $.

double Hockney_predict_sg_flat_serial ( void *  _this,
int  root,
int  M 
)

Heterogeneous prediction of flat-tree scatter/gather (sequential point-to-point communications) $ \displaystyle\sum_{i = 0, i \neq r}^{n - 1}(\alpha_{ri} + \beta_{ri} M) $

double Hockney_predict_sg_flat_parallel ( void *  _this,
int  root,
int  M 
)

Heterogeneous prediction of flat-tree scatter/gather (parallel point-to-point communications) $ \displaystyle\max_{i = 0, i \neq r}^{n - 1}(\alpha_{ri} + \beta_{ri} M) $

double Hockney_predict_sg_binomial ( void *  _this,
int  root,
int  M 
)

Heterogeneous prediction of binomial scatter/gather (point-to-point communications are sequential within the same root or parallel otherwise) $ \displaystyle\overbrace{\alpha_{ri} + \beta_{ri} 2^{log_2(n - 1)} M + \max S(log_2(n - 1) - 1)} $

double Hockney_hpredict_sg_flat_serial ( void *  _this,
int  M 
)

Homogeneous prediction of flat-tree scatter/gather (sequential point-to-point communications) $ (n - 1)(\alpha + \beta M) $

double Hockney_hpredict_sg_flat_parallel ( void *  _this,
int  M 
)

Homogeneous prediction of flat-tree scatter/gather (parallel point-to-point communications) $ \alpha + \beta M $

double Hockney_hpredict_sg_binomial ( void *  _this,
int  M 
)

Homogeneous prediction of binomial scatter/gather (point-to-point communications are sequential within the same root or parallel otherwise) $ (log_2 n) \alpha + (n - 1) \beta M $

void HHockney_estimate ( MPI_Comm  comm,
MPIB_precision  precision,
MPIB_msgset  msgset,
Hockney_model **  model 
)

Estimates the parameters of the homogeneous Hockney model (n = 2). Requires at least 3 processes. Based on the homogeneous Hockney prediction of flat scatter $ t(m, n) $. Uses benchmarks for m = msgset.max_size and msgset.min_size, and n = comm_size.

See also:
tests/hmodel.c
double HHockney_predict_p2p ( void *  _this,
int  i,
int  j,
int  m 
)

Predicts the execution time of point-to-point communication, using the homogeneous LMO model

double HHockney_predict_scatter_flat ( void *  _this,
int  root,
int  m,
int  n 
)

Predicts the execution time of flat-tree scatter, using the homogeneous LMO model