SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ pb_timer()

subroutine pb_timer ( integer  i)

Definition at line 2975 of file pblastim.f.

2976*
2977* -- PBLAS test routine (version 2.0) --
2978* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
2979* and University of California, Berkeley.
2980* April 1, 1998
2981*
2982* .. Scalar Arguments ..
2983 INTEGER I
2984* ..
2985*
2986* Purpose
2987* =======
2988*
2989* PB_TIMER provides a "stopwatch" functionality cpu/wall timer in se-
2990* conds. Up to 64 separate timers can be functioning at once. The first
2991* call starts the timer, and the second stops it. This routine can be
2992* disenabled, so that calls to the timer are ignored. This feature can
2993* be used to make sure certain sections of code do not affect timings,
2994* even if they call routines which have PB_TIMER calls in them.
2995*
2996* Arguments
2997* =========
2998*
2999* I (global input) INTEGER
3000* On entry, I specifies the timer to stop/start.
3001*
3002* -- Written on April 1, 1998 by
3003* R. Clint Whaley, University of Tennessee, Knoxville 37996, USA.
3004*
3005* =====================================================================
3006*
3007* .. Parameters ..
3008 INTEGER NTIMER
3009 parameter( ntimer = 64 )
3010 DOUBLE PRECISION STARTFLAG
3011 parameter( startflag = -5.0d+0 )
3012* ..
3013* .. External Functions ..
3014 DOUBLE PRECISION DCPUTIME00, DWALLTIME00
3015 EXTERNAL dcputime00, dwalltime00
3016* ..
3017* .. Common Blocks ..
3018 LOGICAL DISABLED
3019 DOUBLE PRECISION CPUSEC( NTIMER ), CPUSTART( NTIMER ),
3020 $ WALLSEC( NTIMER ), WALLSTART( NTIMER )
3021 COMMON /sltimer00/ cpusec, wallsec, cpustart, wallstart, disabled
3022* ..
3023* .. Executable Statements ..
3024*
3025* If timing disabled, return
3026*
3027 IF( disabled )
3028 $ RETURN
3029*
3030 IF( wallstart( i ).EQ.startflag ) THEN
3031*
3032* If timer has not been started, start it
3033*
3034 wallstart( i ) = dwalltime00()
3035 cpustart( i ) = dcputime00()
3036*
3037 ELSE
3038*
3039* Stop timer and add interval to count
3040*
3041 cpusec( i ) = cpusec( i ) + dcputime00() - cpustart( i )
3042 wallsec( i ) = wallsec( i ) + dwalltime00() - wallstart( i )
3043 wallstart( i ) = startflag
3044*
3045 END IF
3046*
3047 RETURN
3048*
3049* End of PB_TIMER
3050*
Here is the caller graph for this function: