[Developers] Proposed Cactus Timer API Completion
schnetter at aei.mpg.de
Wed Aug 4 02:27:26 CDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
On Wednesday 04 August 2004 00:50, David Rideout (drideout) wrote:
> One can use the unit string to decide what the timer value means,
> along with a convention of what to put in the string.
One can also measure all times in seconds. That would be much easier to
interpret by a programme.
> I think a 64 bit integer makes more sense when counting discrete
> objects, no? It has greater precision, since no bits are wasted on
> the exponent. At some point it will be impossible to increment the
> floating point timer, and this will occur some orders of magnitude
> before the (same size) integer overflows.
You do not need to increment the double. Each clock uses internally
what it wants to use, and reports the result in a double. Times are
reported in seconds, lengths in metres, and events in counts. I don't
see a case where this would fail. A double gives you about 10^-16
relative accuracy, and no current timing mechanism comes even close to
Gab, here is my use case: I want to measure how long checkpointing
takes, and then schedule it in a way that it does not take more than
10% of the total run time.
Here is another use case: I want to use Cactus timers for the
termination condition in the driver, which currently calls getrusage
and gettimeofday directly, with lots of #ifdefs to see what is
And a third one: I want to measure how long calculation and
communication takes in Carpet, and want to print a warning if the ratio
is not sane, e.g. suggesting to people to use fewer/more processors.
These cases have in common that the timer results are not just printed
to the screen, but are interpreted by a programme. This is why I don't
like the idea of units given as strings: I would need many strcmp calls
to interpret these strings, and there is no advantage from string
Even more, when timer results are printed to the screen, it would be
nice to have all timers use the same units. Otherwise people will find
it difficult to interpret the timing values. A second is a good unit,
and if you want to print a value in hours instead, you print
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)
-----END PGP SIGNATURE-----
More information about the Developers