TuckermanGroup/PINY — pull request #16 by OndrejMarsalek (2014-01-07 04:51:08+00:00)
Title: Add a code section timer mechanism

This is a mechanism to time marked sections of code. It uses macros so that it can be completely disabled at compile time, though the overhead should be very small. Enable it using "-DTIMER" in make_head.h. Work both in serial and in parallel, where it reports from MPI rank 0.

Mark sections of code with a matching pair of `TIMER_START("label");` and `TIMER_STOP("label");`.

to time them. A timing log is written to standard error output, redirect that to a suitable file. Create a timing report from the log using python/bin/process-timer. The processing is copied from PyMD.