dis_cpu_time(7rheolef)
π dis_cpu_time β bestie edition π
okay so this is dis_cpu_time, a page from the rheolef manual, and it lives in the 7rheolef section of your man pages (yes the same name twice, that's just how man headers vibe, don't worry about it π
). rheolef is at version 7.2, and this whole page is about timing your distributed computations. we're talking clocks, bestie. let's go β¨
π°οΈ NAME
dis_cpu_time β cumulated cpu for distributed computations (rheolef-7.2)
β¨ SYNOPSIS
double dis_cpu_time();
double dis_wall_time();
double seq_cpu_time();
double seq_wall_time();
four little functions, all of them handing you back a double. that's it. that's the whole menu π
πΈ EXAMPLE
okay here's how you actually use these in the wild, and honestly? it's giving "stopwatch energy" β±οΈ
double t_start = dis_wall_time();
...stuff to be timed...
double t_end = dis_wall_time();
derr << 'That took ' << t_end - t_start << ' seconds' << endl
double cpu_start = dis_cpu_time();
...stuff to be timed...
double cpu_end = dis_cpu_time();
derr << 'That needs ' << cpu_end - cpu_start << ' CPU seconds' << endl
you grab a timestamp, you do the stuff to be timed (iconic placeholder tbh), you grab another timestamp, you subtract, you print. subtraction is the moment fr fr π«Ά
and for the derr of it all? see also diststream(2). that's where derr comes from, iykyk.
π DESCRIPTION
dis_cpu_time
returns the accumulated CPU for all processes linked together via the default communicator. like, everybody's CPU time, pooled. teamwork makes the dream work π
seq_cpu_time
similar vibe, BUT it returns the computing time per user for the current process only. just you. solo. main character energy, but make it CPU seconds π
dis_wall_time
returns a floating-point number of seconds, representing elapsed wall-clock time since some time in the past. and here's the tea: that time in the past is guaranteed not to change during the life of the process. so it's a stable reference point, no cap π°οΈ
the user is responsible for converting large numbers of seconds to other units if they are preferred. that's on you, bestie, not on the function π
but listen, this function is genuinely iconic for three reasons:
- it is portable β it returns seconds, not ticks
- it allows high resolution
- it carries no unnecessary baggage
and in a distributed environment? dis_wall_time clocks are synchronized: different nodes return the same time value at the same instant. same instant, same value, across the whole crew. that's harmony π
seq_wall_time
similar, but the time returned is local to the node that called them, and the clocks are not synchronized. in a distributed environment, different nodes can return different local times, at different instants when the call to seq_wall_time is reached.
so lowkey:dis_wall_time= everybody agrees on what time it is π,seq_wall_time= every node has its own little opinion π
π§ IMPLEMENTATION
this documentation has been generated from file linalg/lib/dis_cpu_time.h
π AUTHOR
Pierre Saramito <Pierre.Saramito@imag.fr>
π COPYRIGHT
Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito@imag.fr>
GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
and that's the whole page, bestie π this was rheolef, Version 7.2 β and the page itself is dis_cpu_time(7rheolef), right at the bottom like a little signature. slay, go time your code, periodt β¨π¦πΈ
π¦ where this page comes from
- debian trixie: librheolef-dev 7.2-4 Β· GPL-3.0-or-later
- ubuntu noble: librheolef-dev 7.2-3build5 Β· GPL-3.0-or-later
- ubuntu questing: librheolef-dev 7.2-4build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms