[petsc-users] Measuring memory system performance
Jed Brown
jed at 59A2.org
Sun Apr 18 16:27:53 CDT 2010
On Sun, 18 Apr 2010 18:15:12 -0300, Pedro Torres <torres.pedrozpk at gmail.com> wrote:
> Hello,
>
> I want to measure memory system performance in my node, obtained with the
> sparse matrix-vector kernel of PETSc. Please, could you recommend any simple
> tools to perform that?. Thanks a lot.
You can use hardware counters, but there are somewhat platform-specific.
You can also take any of the PETSc examples and run with no
preconditioner (-pc_type none), use -ksp_view to determine the number of
nonzeros in the matrix, and -log_summary to find the amount of time
spent in MatMult. A lower bound for the achieved bandwidth is
number_of_MatMults * number_of_nonzeros * (sizeof(PetscScalar) + f*sizeof(PetscInt)) / time_in_MatMults
where f=1 for AIJ without inodes and f=1/(bs*bs) for BAIJ with block size bs.
This does not include the bandwidth for the vector (more significant if
you have a poor ordering or the matrix sparsity is such that the vector
does not reuse the cache well). For pure bandwidth measurements, see
the STREAM benchmark (http://www.cs.virginia.edu/stream/).
Jed
More information about the petsc-users
mailing list