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

◆ pb_combine()

subroutine pb_combine ( integer  ictxt,
character*1  scope,
character*1  op,
character*1  tmtype,
integer  n,
integer  ibeg,
double precision, dimension( n )  times 
)

Definition at line 3209 of file pblastim.f.

3211*
3212* -- PBLAS test routine (version 2.0) --
3213* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
3214* and University of California, Berkeley.
3215* April 1, 1998
3216*
3217* .. Scalar Arguments ..
3218 CHARACTER*1 OP, SCOPE, TMTYPE
3219 INTEGER IBEG, ICTXT, N
3220* ..
3221* .. Array Arguments ..
3222 DOUBLE PRECISION TIMES( N )
3223* ..
3224*
3225* Purpose
3226* =======
3227*
3228* PB_COMBINE returns wall or cpu time that has accumulated in timer I.
3229*
3230* Arguments
3231* =========
3232*
3233* TMTYPE (global input) CHARACTER
3234* On entry, TMTYPE specifies what time will be returned as fol-
3235* lows
3236* = 'W': wall clock time is returned,
3237* = 'C': CPU time is returned (default).
3238*
3239* I (global input) INTEGER
3240* On entry, I specifies the timer to return.
3241*
3242* -- Written on April 1, 1998 by
3243* R. Clint Whaley, University of Tennessee, Knoxville 37996, USA.
3244*
3245* =====================================================================
3246*
3247* .. Parameters ..
3248 INTEGER NTIMER
3249 parameter( ntimer = 64 )
3250 DOUBLE PRECISION ERRFLAG
3251 parameter( errflag = -1.0d+0 )
3252* ..
3253* .. Local Scalars ..
3254 CHARACTER*1 TOP
3255 LOGICAL TMPDIS
3256 INTEGER I
3257* ..
3258* .. External Subroutines ..
3259 EXTERNAL dgamx2d, dgamn2d, dgsum2d, pb_topget
3260* ..
3261* .. External Functions ..
3262 LOGICAL LSAME
3263 DOUBLE PRECISION DCPUTIME00, DWALLTIME00
3264 EXTERNAL dcputime00, dwalltime00, lsame
3265* ..
3266* .. Common Blocks ..
3267 LOGICAL DISABLED
3268 DOUBLE PRECISION CPUSEC( NTIMER ), CPUSTART( NTIMER ),
3269 $ WALLSEC( NTIMER ), WALLSTART( NTIMER )
3270 COMMON /sltimer00/ cpusec, wallsec, cpustart, wallstart, disabled
3271* ..
3272* .. Executable Statements ..
3273*
3274* Disable timer for combine operation
3275*
3276 tmpdis = disabled
3277 disabled = .true.
3278*
3279* Copy timer information into user's times array
3280*
3281 IF( lsame( tmtype, 'W' ) ) THEN
3282*
3283* If walltime not available on this machine, fill in times
3284* with -1 flag, and return
3285*
3286 IF( dwalltime00().EQ.errflag ) THEN
3287 DO 10 i = 1, n
3288 times( i ) = errflag
3289 10 CONTINUE
3290 RETURN
3291 ELSE
3292 DO 20 i = 1, n
3293 times( i ) = wallsec( ibeg + i - 1 )
3294 20 CONTINUE
3295 END IF
3296 ELSE
3297 IF( dcputime00().EQ.errflag ) THEN
3298 DO 30 i = 1, n
3299 times( i ) = errflag
3300 30 CONTINUE
3301 RETURN
3302 ELSE
3303 DO 40 i = 1, n
3304 times( i ) = cpusec( ibeg + i - 1 )
3305 40 CONTINUE
3306 END IF
3307 ENDIF
3308*
3309* Combine all nodes' information, restore disabled, and return
3310*
3311 IF( op.EQ.'>' ) THEN
3312 CALL pb_topget( ictxt, 'Combine', scope, top )
3313 CALL dgamx2d( ictxt, scope, top, n, 1, times, n, -1, -1,
3314 $ -1, -1, 0 )
3315 ELSE IF( op.EQ.'<' ) THEN
3316 CALL pb_topget( ictxt, 'Combine', scope, top )
3317 CALL dgamn2d( ictxt, scope, top, n, 1, times, n, -1, -1,
3318 $ -1, -1, 0 )
3319 ELSE IF( op.EQ.'+' ) THEN
3320 CALL pb_topget( ictxt, 'Combine', scope, top )
3321 CALL dgsum2d( ictxt, scope, top, n, 1, times, n, -1, 0 )
3322 ELSE
3323 CALL pb_topget( ictxt, 'Combine', scope, top )
3324 CALL dgamx2d( ictxt, scope, top, n, 1, times, n, -1, -1,
3325 $ -1, -1, 0 )
3326 END IF
3327*
3328 disabled = tmpdis
3329*
3330 RETURN
3331*
3332* End of PB_COMBINE
3333*
logical function lsame(ca, cb)
Definition tools.f:1724
Here is the caller graph for this function: