267
268
269
270
271
272
273
274 CHARACTER OP, SCOPE, TIMETYPE
275 INTEGER IBEG, ICTXT, N
276
277
278 DOUBLE PRECISION TIMES( N )
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320 INTEGER NTIMER
321 parameter( ntimer = 64 )
322 DOUBLE PRECISION ERRFLAG
323 parameter( errflag = -1.0d+0 )
324
325
326 LOGICAL TMPDIS
327 INTEGER I
328
329
330 EXTERNAL dgamx2d, dgamn2d, dgsum2d
331
332
333 LOGICAL LSAME
334 DOUBLE PRECISION DCPUTIME00, DWALLTIME00
335 EXTERNAL dcputime00, dwalltime00,
lsame
336
337
338 LOGICAL DISABLED
339 DOUBLE PRECISION CPUSEC( NTIMER ), CPUSTART( NTIMER ),
340 $ WALLSEC( NTIMER ), WALLSTART( NTIMER )
341 COMMON /sltimer00/ cpusec, wallsec, cpustart, wallstart, disabled
342
343
344
345
346
347 tmpdis = disabled
348 disabled = .true.
349
350
351
352 IF(
lsame( timetype,
'W' ) )
THEN
353
354
355
356
357 IF( dwalltime00().EQ.errflag ) THEN
358 DO 10 i = 1, n
359 times( i ) = errflag
360 10 CONTINUE
361 RETURN
362 ELSE
363 DO 20 i = 1, n
364 times( i ) = wallsec( ibeg + i - 1 )
365 20 CONTINUE
366 END IF
367 ELSE
368 IF( dcputime00().EQ.errflag ) THEN
369 DO 30 i = 1, n
370 times( i ) = errflag
371 30 CONTINUE
372 RETURN
373 ELSE
374 DO 40 i = 1, n
375 times( i ) = cpusec( ibeg + i - 1 )
376 40 CONTINUE
377 END IF
378 ENDIF
379
380
381
382 IF( op.EQ.'>' ) THEN
383 CALL dgamx2d( ictxt, scope, ' ', n, 1, times, n, -1, -1,
384 $ -1, -1, 0 )
385 ELSE IF( op.EQ.'<' ) THEN
386 CALL dgamn2d( ictxt, scope, ' ', n, 1, times, n, -1, -1,
387 $ -1, -1, 0 )
388 ELSE IF( op.EQ.'+' ) THEN
389 CALL dgsum2d( ictxt, scope, ' ', n, 1, times, n, -1, 0 )
390 ELSE
391 CALL dgamx2d( ictxt, scope, ' ', n, 1, times, n, -1, -1,
392 $ -1, -1, 0 )
393 END IF
394
395 disabled = tmpdis
396
397 RETURN
398
399
400