timer accuracy

axpy and matrix_vector performance curves are incomplete for intermediate sizes of the problem. This parts of the curves have been removed because our time measurements present large fluctuations in this region :


image


For each calculation (axpy, matrix-vector,...), we try to measure as accurately as possible the calculation time. We repeat several time each calculations and this implies to re-initialize the matrices and vectors of the problem for each calculation. The total time corresponds to the mean duration of several succesive execution of the following snippet,

     X=X0
     Y=Y0
     Y+=aX0


while the initialization time corresponds to the mean duration of

    X=X0
    Y=Y0

The mflops are calculated as :


(number of floating point operation / (calculation_time_in_second*1E6) )


where

calculation_time=total_time-initialization_time.

When the calculation time is smaller than the initialization time (e.g. axpy) , our finite timing accuracy can produce large instabilities. This is illustrated on the following graph representing the initialization, total and calculation time measurements. One can see on this graph that initialization and total times get very close when the problem size is about the cache size :


image


We try several time measurement methods (rdtsc function, getrusage, time) which provide very consistent results but we failed to avoid fluctuations. We hope that someone will help us to improve our time measurement accuracy.
Last modified: Tue Jan 14 19:00:43 CET 2003