[Developers] Proposed Cactus Timer API Completion

Erik Schnetter schnetter at aei.mpg.de
Tue Aug 3 16:43:32 CDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 03 August 2004 23:27, David Rideout (drideout) wrote:
> Isn't there a PAPI thorn which measures all sorts of fun things such
> as cache misses and integer operations, using the Cactus timer API? 
> How hard can it be to generalize to measuring things with counters
> whose physical interpretation may be something other than time?  Why
> not just carry around a description string and a string for units? 

A description string is only useful for printing to the user.  If the 
programme should take any action after measuring an elapsed time, it 
has to know the unit of the measurement.  For example, if you want to 
schedule checkpointing is such a manner that it takes no more than 10% 
of the run time, then it doesn't help you if the timer says that 
checkpointing took 100.5 units, unless you know the unit.  (seconds?  
milliseconds?  fortnights?  cache misses?)  Therefore I would suggest 
that the timing unit is always "second", and that the type is either 
"double" or "CCTK_REAL".

Incidentally, many events occur so often that 32 bits are not enough to 
count them.  In this case, the simplest (and portable) solution is to 
use "double" or "CCTK_REAL" for counts as well.

- -erik

- -- 
Erik Schnetter <schnetter at aei.mpg.de>   http://www.aei.mpg.de/~eschnett/

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBEAcNm3uiSwno3f0RAiUtAJ9kRx7yQwLlyQggF4aXVA1PcyzbGACghBtH
vx4esBT6xu7So6gwlgQn/HA=
=irKb
-----END PGP SIGNATURE-----





More information about the Developers mailing list