Skip to content

Commit 56112bd

Browse files
authored
Merge pull request #3739 from heplesser/timer-doc
Improve documentation on wall-time vs cpu time timers
2 parents 009ac0c + 976396d commit 56112bd

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

doc/htmldoc/nest_behavior/built-in_timers.rst

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,26 @@ Therefore, detailed timers are by default inactive.
104104

105105
``-Dwith-threaded-timers=OFF``
106106

107-
**Wall-time vs. CPU-time**
107+
**Wall-clock time vs. CPU-time**
108108

109-
All timers in NEST measure the actual wall-time spent between starting and stopping the timer. In order to only measure
110-
time spent on calculations, there is an additional variant for each of the timers above, suffixed with ``_cpu``. They
111-
can be accessed in the exact same way. For example:
109+
Timers in NEST measure the wall-clock time spent between starting
110+
and stopping the timer. For each wall-clock timer, there is also a
111+
timer measuring only the actual CPU time used. This timer has the
112+
same name as the wall-clock timer with the suffix
113+
``_cpu``. Thus,
114+
::
115+
116+
nest.time_simulate
117+
118+
will return the wall-clock time used for simulation and
112119
::
113120

114121
nest.time_simulate_cpu
115122

123+
the CPU time. Specifically, the wall-clock timer uses the
124+
``CLOCK_MONOTONIC`` POSIX timer and the CPU timer uses
125+
``CLOCK_THREAD_CPUTIME_ID``; for details see: `clock_gettime_ <https://www.man7.org/linux/man-pages/man3/clock_gettime.3.html>`_.
126+
116127
**MPI synchronization timer**
117128

118129
In order to measure synchronization time between multiple MPI processes, an additional timer can be activated on demand

0 commit comments

Comments
 (0)