New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 3222 – NEMO

Changeset 3222


Ignore:
Timestamp:
2011-12-14T21:29:40+01:00 (12 years ago)
Author:
rblod
Message:

Correct a bug in timing with more than 2 levels of imbrication

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/timing.F90

    r3140 r3222  
    129129      INTEGER  :: ifinal_count, iperiods     
    130130      REAL(wp) :: zcpu_end, zmpitime 
     131      ! 
     132      s_wrk => NULL() 
    131133 
    132134      ! clock time collection 
     
    158160       
    159161      ! Correction of parent section 
    160       IF( ASSOCIATED(s_timer%parent_section) .AND. .NOT. PRESENT(csection) ) THEN 
    161          s_timer%parent_section%tsub_cpu   = s_timer%parent_section%tsub_cpu   + s_timer%t_cpu  
    162          s_timer%parent_section%tsub_clock = s_timer%parent_section%tsub_clock + s_timer%t_clock  
     162      IF( .NOT. PRESENT(csection) ) THEN 
     163         s_wrk => s_timer 
     164         DO WHILE ( ASSOCIATED(s_wrk%parent_section ) ) 
     165            s_wrk => s_wrk%parent_section 
     166            s_wrk%tsub_cpu   = s_wrk%tsub_cpu   + s_timer%t_cpu  
     167            s_wrk%tsub_clock = s_wrk%tsub_clock + s_timer%t_clock               
     168         END DO 
    163169      ENDIF 
    164        
     170             
    165171      ! time diagnostics  
    166172      s_timer%tsum_clock = s_timer%tsum_clock + s_timer%t_clock  
Note: See TracChangeset for help on using the changeset viewer.