<< scibench_latticeboltz Benchmark Toolbox scibench_poisson >>

Benchmark Toolbox >> Benchmark Toolbox > scibench_matmul

scibench_matmul

Benchmarks the matrix-matrix multiplication.

Calling Sequence

perftable = scibench_matmul ( )
perftable = scibench_matmul ( verbose )
perftable = scibench_matmul ( verbose , dispgraph )
perftable = scibench_matmul ( verbose , dispgraph , timemin )
perftable = scibench_matmul ( verbose , dispgraph , timemin , timemax )
perftable = scibench_matmul ( verbose , dispgraph , timemin , timemax , nfact )

Parameters

verbose :

a 1-by-1 matrix of booleans, set to %t to print messages during and at the end of the experiment (default verbose = %t).

dispgraph :

a 1-by-1 matrix of booleans, set to %t to create a plot (default dispgraph = %t).

timemin :

a 1-by-1 matrix of doubles, the minimum time (in seconds) to measure the mflops (default timemin = 0.001). Must be positive.

timemax :

a 1-by-1 matrix of doubles, the maximum time (in seconds) to measure the mflops (default timemax = 0.1). Must be larger than timemin. The experiment ends when this time is reached.

nfact :

a 1-by-1 matrix of doubles, the multiplication factor for the size n of the matrix (default nfact = 1.2). Must be greater than 1. At each step of the algorithm, the size n of the matrix is updated with n = n * nfact.

perftable :

a m-by-3 matrix of doubles, the performances.

perftable(k,1) :

size of the matrix for experiment #k

perftable(k,2) :

wall clock time for experiment #k

perftable(k,3) :

number of megaflops achieved for experiment #k

Description

This function allows to measure the performance of the matrix-matrix multiplication of dense real matrices. This test is often refered to as the "DGEMM" benchmark.

To measure the performance we count the number of megaflops as 2*n^3/t/1.e6, where n is the size of the matrix. The wall clock time is measured with the tic and toc functions.

The algorithm starts with a matrix size equal to n = 1. Then the matrix size is updated, by multiplying n by nfact.

Examples

lines(0);
stacksize("max");
scf();
scibench_matmul ( );
// Do not print a message
scibench_matmul ( %f );
// Do not create the graph
scibench_matmul ( [] , %f );
// Set timemin
perftable = scibench_matmul ( [] , [] , 0.1 );
// Set timemax
perftable = scibench_matmul ( [] , [] , 0.1 , 8 );
// Set nfact
perftable = scibench_matmul ( [] , [] , 0.1 , 8 , 1.5 );

Bibliography

"Programming in Scilab", Michael Baudin, 2010, http://forge.scilab.org/index.php/p/docprogscilab/downloads/

"Linear algebra performances", http://wiki.scilab.org/Linalg_performances

"Benchmarks: LINPACK and MATLAB - Fame and fortune from megaflops", Cleve Moler, 1994

Authors

<< scibench_latticeboltz Benchmark Toolbox scibench_poisson >>