Performance timer functions. More...
#include <stdio.h>

Go to the source code of this file.
Macros | |
| #define | startTimer(handle) |
| Use the startTimer and stopTimer macros for timers in code regions that may be performance sensitive. More... | |
| #define | stopTimer(handle) |
Enumerations | |
| enum | TimerHandle { totalTimer, loopTimer, timestepTimer, positionTimer, velocityTimer, redistributeTimer, atomHaloTimer, computeForceTimer, eamHaloTimer, commHaloTimer, commReduceTimer, numberOfTimers } |
| Timer handles. More... | |
Functions | |
| void | profileStart (const enum TimerHandle handle) |
| Use profileStart and profileStop only for timers that should never be turned off. More... | |
| void | profileStop (const enum TimerHandle handle) |
| double | getElapsedTime (const enum TimerHandle handle) |
| Use to get elapsed time (lap timer). More... | |
| void | printPerformanceResults (int nGlobalAtoms) |
| Print timing results. More... | |
| void | printPerformanceResultsYaml (FILE *file) |
| Print timing results to Yaml file. More... | |
Performance timer functions.
Definition in file performanceTimers.h.
| #define startTimer | ( | handle | ) |
Use the startTimer and stopTimer macros for timers in code regions that may be performance sensitive.
These can be compiled away by defining NTIMING. If you are placing a timer anywere outside of a tight loop, consider calling profileStart and profileStop instead.
Place calls as follows to collect time for code pieces. Time is collected everytime this portion of code is executed.
... startTimer(computeForceTimer); computeForce(sim); stopTimer(computeForceTimer); ...
Definition at line 29 of file performanceTimers.h.
| #define stopTimer | ( | handle | ) |
Definition at line 34 of file performanceTimers.h.
| enum TimerHandle |
Timer handles.
| Enumerator | |
|---|---|
| totalTimer | |
| loopTimer | |
| timestepTimer | |
| positionTimer | |
| velocityTimer | |
| redistributeTimer | |
| atomHaloTimer | |
| computeForceTimer | |
| eamHaloTimer | |
| commHaloTimer | |
| commReduceTimer | |
| numberOfTimers | |
Definition at line 9 of file performanceTimers.h.
| double getElapsedTime | ( | const enum TimerHandle | handle | ) |
Use to get elapsed time (lap timer).
Return elapsed time (in seconds) since last call with this handle and clear for next lap.
Definition at line 99 of file performanceTimers.c.


| void printPerformanceResults | ( | int | nGlobalAtoms | ) |
Print timing results.
The report contains two blocks. The upper block is performance information for the printRank. The lower block is statistical information over all ranks.
Definition at line 111 of file performanceTimers.c.


| void printPerformanceResultsYaml | ( | FILE * | file | ) |
Print timing results to Yaml file.
Definition at line 159 of file performanceTimers.c.


| void profileStart | ( | const enum TimerHandle | handle | ) |
Use profileStart and profileStop only for timers that should never be turned off.
Typically this means they are outside the main simulation loop. If the timer is inside the main loop use startTimer and stopTimer instead.
Definition at line 83 of file performanceTimers.c.


| void profileStop | ( | const enum TimerHandle | handle | ) |
Definition at line 88 of file performanceTimers.c.

