NCEPLIBS-w3emc 2.12.0
|
Monitor wall-clock times, etc. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | instrument (k, kall, ttot, tmin, tmax) |
This subprogram is useful in instrumenting a code by monitoring the number of times each given section of a program is invoked as well as the minimum, maximum and total wall-clock time spent in the given section. | |
subroutine instrument | ( | integer, intent(in) | k, |
integer, intent(out) | kall, | ||
real, intent(out) | ttot, | ||
real, intent(out) | tmin, | ||
real, intent(out) | tmax | ||
) |
This subprogram is useful in instrumenting a code by monitoring the number of times each given section of a program is invoked as well as the minimum, maximum and total wall-clock time spent in the given section.
Program history log:
[in] | K | Integer positive section number or maximum section number in the first invocation or zero to reset all wall-clock statistics or negative section number to skip monitoring and just return statistics. |
[out] | KALL | integer number of times section is called. |
[out] | TTOT | real total seconds spent in section. |
[out] | TMIN | real minimum seconds spent in section. |
[out] | TMAX | real maximum seconds spent in section. |
CALL INSTRUMENT(2,KALL,TTOT,TMIN,TMAX) ! KEEP STATS FOR 2 SUBS DO K=1,N CALL SUB1 CALL INSTRUMENT(1,KALL,TTOT,TMIN,TMAX) ! ACCUM STATS FOR SUB1 CALL SUB2 CALL INSTRUMENT(2,KALL,TTOT,TMIN,TMAX) ! ACCUM STATS FOR SUB2 ENDDO PRINT *,'SUB2 STATS: ',KALL,TTOT,TMIN,TMAX CALL INSTRUMENT(-1,KALL,TTOT,TMIN,TMAX) ! RETURN STATS FOR SUB1 PRINT *,'SUB1 STATS: ',KALL,TTOT,TMIN,TMAX
Definition at line 46 of file instrument.f.