Matrix Vector Multiplication Timings

MXV is a FORTRAN77 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.


mxv m n

Sample Results:

          M        N       FLOP  doIdoJ  doJdoI
                          (ops)  MFLOPS  MFLOPS

         10       10        100       8      11

         10      100      1,000      20      28
        100       10      1,000      14      21

         10    1,000     10,000      34      33
        100      100     10,000      28      37
      1,000       10     10,000      26      36

         10   10,000    100,000      18      33
     10,000       10    100,000      26      36

         10  100,000  1,000,000      16      35
        100   10,000  1,000,000       7      56
      1,000    1,000  1,000,000      18      37
     10,000      100  1,000,000      28      37
    100,000       10  1,000,000      24      34


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


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

Related Data and Programs:

LINPACK_BENCH, a FORTRAN77 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 FORTRAN77 program which is an interactive matrix multiplication benchmark program.

MDBNCH, a FORTRAN77 program which is a benchmark molecular simulation calculation.

MXM, a FORTRAN77 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 FORTRAN77 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 FORTRAN77 program which sums the integers from 1 to 1,000,000, as a demonstration of how to rate a computer's speed;

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


  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 FORTRAN77 source codes.

Last revised on 22 May 2008.