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.
timing_memleak_fix.patch on Ticket #1942 – Attachment – NEMO

Ticket #1942: timing_memleak_fix.patch

File timing_memleak_fix.patch, 1.3 KB (added by mdunphy, 7 years ago)

Patch to fix three minor memory leaks in timing.F90

  • NEMOGCM/CONFIG/SalishSea/MY_SRC/timing.F90

    # HG changeset patch
    # User Michael Dunphy <mdunphy@eoas.ubc.ca>
    # Date 1495218656 25200
    #      Fri May 19 11:30:56 2017 -0700
    # Node ID f819f623d247c5edabecf286308296fb934b2b3a
    # Parent  2ce1124c887d893e5a339dfbd49f7001143c7496
    Fix three minor memory leaks in timing.F90
    
    diff -r 2ce1124c887d -r f819f623d247 NEMOGCM/CONFIG/SalishSea/MY_SRC/timing.F90
    a b  
    458458         sl_timer_ave_root%l_tdone  = .FALSE. 
    459459         sl_timer_ave_root%next => NULL() 
    460460         sl_timer_ave_root%prev => NULL() 
    461          ALLOCATE(sl_timer_ave) 
    462461         sl_timer_ave => sl_timer_ave_root             
    463462      ENDIF  
    464463 
     
    567566         DEALLOCATE(sl_timer_ave_root) 
    568567      ENDIF 
    569568      ! 
     569      DEALLOCATE(sl_timer_glob_root%cname     , & 
     570                 sl_timer_glob_root%tsum_cpu  , & 
     571                 sl_timer_glob_root%tsum_clock, & 
     572                 sl_timer_glob_root%niter) 
     573      ! 
    570574      DEALLOCATE(sl_timer_glob_root) 
    571575      !                   
    572576   END SUBROUTINE waver_info 
     
    671675         s_timer_root%prev => NULL() 
    672676         s_timer => s_timer_root 
    673677         ! 
    674          ALLOCATE(s_wrk) 
    675678         s_wrk => NULL() 
    676679          
    677680      ELSE