/[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.6 by adcroft, Tue Mar 14 20:28:12 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 407  C     | Three times are returned that co Line 409  C     | Three times are returned that co
409  C     | user time, system time and wall-clock time. Not all these|  C     | user time, system time and wall-clock time. Not all these|
410  C     | numbers are available on all machines.                   |  C     | numbers are available on all machines.                   |
411  C     \==========================================================/  C     \==========================================================/
412          IMPLICIT NONE
413        Real*8 userTime        Real*8 userTime
414        Real*8 systemTime        Real*8 systemTime
415        Real*8 wallClockTime        Real*8 wallClockTime
416  CEndOfInterface  CEndOfInterface
417        Real*4 ETIME, ACTUAL, TARRAY(2)        Real*4 ETIME, ACTUAL, TARRAY(2)
418    #ifndef TARGET_T3E
419        EXTERNAL ETIME        EXTERNAL ETIME
420    #endif
421        Real*8 wtime        Real*8 wtime
422  C     Real*8 MPI_Wtime  C     Real*8 MPI_Wtime
423  C     EXTERNAL MPI_Wtime  C     EXTERNAL MPI_Wtime
424    
425    #ifdef TARGET_T3E
426          userTime = 0.
427          systemTime = 0.
428    #else
429        ACTUAL = ETIME(TARRAY)        ACTUAL = ETIME(TARRAY)
       
430        userTime      = TARRAY(1)        userTime      = TARRAY(1)
431        systemTime    = TARRAY(2)        systemTime    = TARRAY(2)
432    #endif
433    
434    #ifdef TARGET_T3E
435          wallClockTime = 0.
436    #else
437        CALL CLOC(wTime)        CALL CLOC(wTime)
438        wallClockTime = wtime        wallClockTime = wtime
439    #endif
440    
441  #ifdef ALLOW_USE_MPI  #ifdef ALLOW_USE_MPI
442  C     wtime         = MPI_Wtime()  C     wtime         = MPI_Wtime()
# Line 443  C     | o Print timer information Line 457  C     | o Print timer information
457  C     |==========================================================|  C     |==========================================================|
458  C     | Request print out of table of timing from all timers.    |  C     | Request print out of table of timing from all timers.    |
459  C     \==========================================================/  C     \==========================================================/
460          IMPLICIT NONE
461        INTEGER myThreadId        INTEGER myThreadId
462  CEndOfInterface  CEndOfInterface
463  C     Print out value for every timer.  C     Print out value for every timer.
# Line 455  C Line 470  C
470  C***********************************************************************  C***********************************************************************
471        SUBROUTINE TIMER_START ( string , myThreadId )        SUBROUTINE TIMER_START ( string , myThreadId )
472  C     Return start timer named "string".  C     Return start timer named "string".
473          IMPLICIT NONE
474        CHARACTER*(*) string        CHARACTER*(*) string
475        INTEGER myThreadId        INTEGER myThreadId
476  C  C
# Line 465  C Line 481  C
481  C***********************************************************************  C***********************************************************************
482        SUBROUTINE TIMER_STOP  ( string , myThreadId)        SUBROUTINE TIMER_STOP  ( string , myThreadId)
483  C     Return start timer named "string".  C     Return start timer named "string".
484          IMPLICIT NONE
485        CHARACTER*(*) string        CHARACTER*(*) string
486        INTEGER myThreadId        INTEGER myThreadId
487  C  C

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

  ViewVC Help
Powered by ViewVC 1.1.22