MXV
Matrix Vector Multiplication Timings


MXV is a C program which sets up several matrix vector multiplication problems y=A*x, and carries them out using

The user is allowed to specify M and N, the number of matrix rows and columns.

Usage:

mxv m n
where

Sample Results:

          M        N       FLOP  FORIFORJ  FORJFORI

         10       10        100       9      11

         10      100      1,000      26      21
        100       10      1,000      23      25

         10    1,000     10,000      33      30
        100      100     10,000      29      34
      1,000       10     10,000      25      31

         10   10,000    100,000      19      26
        100    1,000    100,000      24      34
      1,000      100    100,000      24      35
     10,000       10    100,000      23      32

         10  100,000  1,000,000      17      27
        100   10,000  1,000,000       7      49
      1,000    1,000  1,000,000      17      34
     10,000      100  1,000,000      26      42
    100,000       10  1,000,000      23      31
      

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

MXV is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

LINPACK_BENCH, a C program which measures the time needed to factor and solve a "large" (N=1000) dense linear system of equations, and is used as a benchmark.

MATMUL, a FORTRAN90 program which is an interactive matrix multiplication benchmark program.

MXM, a C program which sets up a matrix multiplication problem A=B*C of arbitrary size, and compares the time required for IJK, IKJ, JIK, JKI, KIJ and KJI orderings of the loops.

MXV_OPENMP, a C program which compares the performance of plain vanilla Fortran and the FORTRAN90 intrinsic routine MATMUL, for the matrix multiplication problem y=A*x, with and without parallelization by OpenMP.

SUM_MILLION, a C program which sums the integers from 1 to 1,000,000, as a demonstration of how to rate a computer's speed;

TIMER, C programs which demonstrate how to compute CPU time or elapsed time.

Reference:

  1. John Burkardt, Paul Puglielli,
    Pittsburgh Supercomputing Center,
    MATMUL: An Interactive Matrix Multiplication Benchmark

Source Code:

List of Routines:

You can go up one level to the C source codes.


Last revised on 23 May 2008.