m_time/timab [ Functions ]

Timing subroutine. Calls machine-dependent "timein" which returns elapsed cpu and wall clock times in sec.
Depending on value of "option" routine will:
(0) zero all accumulators
(1) start with new incremental time slice for accumulator n using explicit call to timein (or PAPI)
(2) stop time slice; add time to accumulator n also increase by one the counter for this accumulator
(3) start with new incremental time slice for accumulator n
using stored values for cpu, wall, and PAPI infos ( ! do not use for stop )
(4) report time slice for accumlator n (not full time accumlated)
(5) option to suppress timing (nn should be 0) or reenable it (nn /=0)
If, on first entry, subroutine is not being initialized, it
will automatically initialize as well as rezero accumulator n.
However, initialization SHOULD be done explicitly by the user
so that it can be done near the top of his/her main routine.

INPUTS

nn=index of accumulator (distinguish what is being timed); NOT used if option=0
option=see comment above

OUTPUT

on option=4 :
tottim(2,nn)=accumulated time for accumulator nn; otherwise
tottim is a dummy variable.
option gives the number of times that the
accumulator has been incremented

m_time/time_accu [ Functions ]

Return the number of times the counter has been called
and corresponding data for given index

INPUTS

nn=index of accumulator (distinguish what is being timed);

OUTPUT

tottim(2)=accumulated time for accumulator nn
totftimes(2)=accumulated time for accumulator nn evaluated by papi
totffops =accumulated number of flops for accumulator nn evaluated by papi
return_ncount gives the number of times that the accumulator has been incremented