/[MITgcm]/MITgcm/eesupp/src/timers.F
ViewVC logotype

Diff of /MITgcm/eesupp/src/timers.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4 by cnh, Wed Oct 28 03:11:35 1998 UTC revision 1.8 by heimbach, Wed Jun 21 20:44:06 2000 UTC
# Line 23  C     |================================= Line 23  C     |=================================
23  C     | Return index in timer data structure of timer named      |  C     | Return index in timer data structure of timer named      |
24  C     | by the function argument "name".                         |  C     | by the function argument "name".                         |
25  C     \==========================================================/  C     \==========================================================/
26          IMPLICIT NONE
27        INTEGER maxTimers        INTEGER maxTimers
28        INTEGER nTimers        INTEGER nTimers
29        CHARACTER*(*) name        CHARACTER*(*) name
# Line 54  C     | User callable interface to timin Line 55  C     | User callable interface to timin
55  C     | created, stopped, started and queried only through this  |  C     | created, stopped, started and queried only through this  |
56  C     | rtouine.                                                 |  C     | rtouine.                                                 |
57  C     \==========================================================/  C     \==========================================================/
58          IMPLICIT NONE
59  #include "SIZE.h"  #include "SIZE.h"
60  #include "EEPARAMS.h"  #include "EEPARAMS.h"
61  #include "EESUPPORT.h"  #include "EESUPPORT.h"
# Line 99  C Line 101  C
101        SAVE    timerNameLen        SAVE    timerNameLen
102        CHARACTER*(maxString) timerNames( maxTimers , MAX_NO_THREADS)        CHARACTER*(maxString) timerNames( maxTimers , MAX_NO_THREADS)
103        SAVE                  timerNames        SAVE                  timerNames
       CHARACTER*(maxString) timerAction  
104        INTEGER nTimers(MAX_NO_THREADS)        INTEGER nTimers(MAX_NO_THREADS)
105        CHARACTER*(maxString) tmpName        CHARACTER*(maxString) tmpName
106        CHARACTER*(maxString) tmpAction        CHARACTER*(maxString) tmpAction
# Line 407  C     | Three times are returned that co Line 408  C     | Three times are returned that co
408  C     | user time, system time and wall-clock time. Not all these|  C     | user time, system time and wall-clock time. Not all these|
409  C     | numbers are available on all machines.                   |  C     | numbers are available on all machines.                   |
410  C     \==========================================================/  C     \==========================================================/
411          IMPLICIT NONE
412        Real*8 userTime        Real*8 userTime
413        Real*8 systemTime        Real*8 systemTime
414        Real*8 wallClockTime        Real*8 wallClockTime
415  CEndOfInterface  CEndOfInterface
416        Real*4 ETIME, ACTUAL, TARRAY(2)        Real*4 ETIME, ACTUAL, TARRAY(2)
417    #ifndef TARGET_T3E
418    #ifndef TARGET_CRAY_VECTOR
419        EXTERNAL ETIME        EXTERNAL ETIME
420    #endif
421    #endif
422        Real*8 wtime        Real*8 wtime
423  C     Real*8 MPI_Wtime  C     Real*8 MPI_Wtime
424  C     EXTERNAL MPI_Wtime  C     EXTERNAL MPI_Wtime
425    
426    #if (defined (TARGET_T3E) || defined (TARGET_CRAY_VECTOR))
427          userTime = 0.
428          systemTime = 0.
429    #else
430        ACTUAL = ETIME(TARRAY)        ACTUAL = ETIME(TARRAY)
       
431        userTime      = TARRAY(1)        userTime      = TARRAY(1)
432        systemTime    = TARRAY(2)        systemTime    = TARRAY(2)
433    #endif
434    
435    #if (defined (TARGET_T3E) || defined (TARGET_CRAY_VECTOR))
436          wallClockTime = 0.
437    #else
438        CALL CLOC(wTime)        CALL CLOC(wTime)
439        wallClockTime = wtime        wallClockTime = wtime
440    #endif
441    
442  #ifdef ALLOW_USE_MPI  #ifdef ALLOW_USE_MPI
443  C     wtime         = MPI_Wtime()  C     wtime         = MPI_Wtime()
# Line 443  C     | o Print timer information Line 458  C     | o Print timer information
458  C     |==========================================================|  C     |==========================================================|
459  C     | Request print out of table of timing from all timers.    |  C     | Request print out of table of timing from all timers.    |
460  C     \==========================================================/  C     \==========================================================/
461          IMPLICIT NONE
462        INTEGER myThreadId        INTEGER myThreadId
463  CEndOfInterface  CEndOfInterface
464  C     Print out value for every timer.  C     Print out value for every timer.
# Line 455  C Line 471  C
471  C***********************************************************************  C***********************************************************************
472        SUBROUTINE TIMER_START ( string , myThreadId )        SUBROUTINE TIMER_START ( string , myThreadId )
473  C     Return start timer named "string".  C     Return start timer named "string".
474          IMPLICIT NONE
475        CHARACTER*(*) string        CHARACTER*(*) string
476        INTEGER myThreadId        INTEGER myThreadId
477  C  C
# Line 465  C Line 482  C
482  C***********************************************************************  C***********************************************************************
483        SUBROUTINE TIMER_STOP  ( string , myThreadId)        SUBROUTINE TIMER_STOP  ( string , myThreadId)
484  C     Return start timer named "string".  C     Return start timer named "string".
485          IMPLICIT NONE
486        CHARACTER*(*) string        CHARACTER*(*) string
487        INTEGER myThreadId        INTEGER myThreadId
488  C  C

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22