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 4472 for branches/2011/DEV_r2739_STFC_dCSE – NEMO

Ignore:
Timestamp:
2014-02-04T13:18:34+01:00 (10 years ago)
Author:
trackstand2
Message:

Improvements in timing.F90 to try and avoid using dissociated ptrs

File:
1 edited

Legend:

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

    r3837 r4472  
    148148      ! 
    149149      s_timer => s_timer_root 
     150      IF(.NOT. ASSOCIATED(s_timer))THEN 
     151         WRITE(*,*) 'Timing ERROR!'  
     152         WRITE(*,*) 'timing_stop called for ',TRIM(cdinfo),' but timing structures not initialised!' 
     153         RETURN 
     154      END IF 
     155 
    150156      DO WHILE( TRIM(s_timer%cname) /= TRIM(cdinfo) )  
    151157         IF( ASSOCIATED(s_timer%next) ) s_timer => s_timer%next 
     
    278284!!$         RETURN 
    279285!!$      END IF 
    280       
     286      ! If timing was never initialised then there's nothing to finalise. 
     287      IF( .NOT. l_initdone ) RETURN 
     288 
    281289      ll_averep = .TRUE. 
    282290     
     
    380388         ll_ord = .TRUE. 
    381389         s_timer => s_timer_root 
     390         IF(.NOT. ASSOCIATED(s_timer)) EXIT 
    382391         DO WHILE ( ASSOCIATED( s_timer%next ) ) 
    383392         IF (.NOT. ASSOCIATED(s_timer%next)) EXIT 
Note: See TracChangeset for help on using the changeset viewer.