Ignore:
Timestamp:
Mar 5, 2009 3:33:42 PM (13 years ago)
Author:
heinze
Message:

Output of messages replaced by message handling routine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/cpu_log.f90

    r239 r254  
    22
    33!------------------------------------------------------------------------------!
    4 ! Actual revisions:
     4! Current revisions:
    55! -----------------
     6! Output of messages replaced by message handling routine.
    67! Type of count and count_rate changed to default INTEGER on NEC machines
    78!
     
    3132!------------------------------------------------------------------------------!
    3233
     34    USE control_parameters
    3335    USE cpulog
    3436    USE pegrid
     
    5658       log_event%place = place
    5759    ELSEIF ( log_event%place /= place )  THEN
    58        IF ( myid == 0 )  THEN
    59           PRINT*,'+++ cpu_log: wrong argument'
    60           PRINT*,'    expected: ',log_event%place,'  given: ', place
    61        ENDIF
    62        CALL local_stop
     60       WRITE( message_string, * ) 'wrong argument & expected: ', &
     61                         TRIM(log_event%place), '  given: ',  TRIM( place )
     62       CALL message( 'cpu_log', 'PA0174', 1, 2, 0, 6, 0 )
    6363    ENDIF
    6464
     
    7171    mtime = IRTC( ) * 1E-9
    7272#else
    73     IF ( myid == 0 )  THEN
    74        PRINT*, '+++ cpu_log: no time measurement defined on this host'
    75     ENDIF
    76     CALL local_stop
     73    message_string = 'no time measurement defined on this host'
     74    CALL message( 'cpu_log', 'PA0175', 1, 2, 0, 6, 0 )
    7775#endif
    7876
     
    8482    ELSEIF ( modus == 'pause' )  THEN
    8583       IF ( ( mtime - log_event%mtime ) < 0.0  .AND.  first )  THEN
    86           PRINT*,'+++ WARNING: cpu_log: negative time interval occured'
    87           PRINT*,'+++ PE',myid,' L=PAUSE "',TRIM(log_event%place),'" new=', &
    88                  mtime,' last=',log_event%mtime
     84          WRITE( message_string, * ) 'negative time interval occured', &
     85                                     ' &PE',myid,' L=PAUSE "',TRIM(log_event%place),'" new=', &
     86                                      mtime,' last=',log_event%mtime
     87          CALL message( 'cpu_log', 'PA0176', 0, 1, -1, 6, 0 )
    8988          first = .FALSE.
    9089       ENDIF
     
    9493       IF ( ( mtime - log_event%mtime + log_event%isum ) < 0.0  .AND. &
    9594            first )  THEN
    96           PRINT*,'+++ WARNING: cpu_log: negative time interval occured'
    97           PRINT*,'+++ PE',myid,' L=STOP "',TRIM(log_event%place),'" new=', &
    98                  mtime,' last=',log_event%mtime,' isum=',log_event%isum
     95          WRITE( message_string, * ) 'negative time interval occured', &
     96                                     ' &PE',myid,' L=STOP "',TRIM(log_event%place),'" new=', &
     97                                      mtime,' last=',log_event%mtime,' isum=',log_event%isum
     98          CALL message( 'cpu_log', 'PA0177', 0, 1, -1, 6, 0 )
    9999          first = .FALSE.
    100100       ENDIF
     
    103103       log_event%sum      = log_event%sum  + log_event%mtime
    104104       IF ( log_event%sum < 0.0  .AND.  first )  THEN
    105           PRINT*,'+++ WARNING: cpu_log: negative time interval occured'
    106           PRINT*,'+++ PE',myid,' L=STOP "',TRIM(log_event%place),'" sum=', &
    107                  log_event%sum,' mtime=',log_event%mtime
     105          WRITE( message_string, * ) 'negative time interval occured',&
     106                                     ' &PE',myid,' L=STOP "',TRIM(log_event%place),'" sum=', &
     107                                      log_event%sum,' mtime=',log_event%mtime
     108          CALL message( 'cpu_log', 'PA0178', 0, 1, -1, 6, 0 )
    108109          first = .FALSE.
    109110       ENDIF
     
    113114       log_event%ivect    = 0.0
    114115    ELSE
    115        PRINT*, '+++ unknown modus of time measurement: ', modus
     116       message_string = 'unknown modus of time measurement: ' // TRIM( modus )
     117       CALL message( 'cpu_log', 'PA0179', 0, 1, -1, 6, 0 )
    116118    ENDIF
    117119
Note: See TracChangeset for help on using the changeset viewer.