[petsc-users] Obtaining bytes per second

Jed Brown jed at jedbrown.org
Mon May 4 08:05:39 CDT 2015


Justin Chang <jychang48 at gmail.com> writes:

> Hello everyone,
>
> If I wanted to obtain the bytes/second for my PETSc program, is there a
> generic way of doing this? My initial thought would be to first run the
> program with valgrind to obtain the total memory usage, and then run it
> without valgrind to get the wall clock time. These two metrics then give
> you the bytes/second.

Not really, because usually we're interested in useful bandwidth
sustained from some level of cache.  You can use hardware performance
counters to measure the number of cache lines transferred, but this is
usually an overestimate of the amount of useful data.  You really need a
performance model for your application and a cache model for the machine
to say what bandwidth is useful.

> Or can PETSc manually count the load/stores the way it's done for
> flops? 

No, this information is not available in source code and would be nearly
meaningless even if it was.

> I was looking at the PetscMemXXX() functions but wasn't sure if this
> is what I was looking for.
>
> Thanks,
> Justin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150504/85ddfa99/attachment.pgp>


More information about the petsc-users mailing list