Changeset 5302


Ignore:
Timestamp:
2015-05-28T09:11:24+02:00 (5 years ago)
Author:
smasson
Message:

wrk_alloc/dealloc check

Location:
trunk/NEMOGCM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90

    r5215 r5302  
    18831883      CALL crs_lbc_lnk( p_surf_crs_msk, cd_type, 1.0, pval=1.0 ) 
    18841884 
    1885       CALL wrk_dealloc( jpi, jpj, jpk, zsurf, zsurfmsk ) 
     1885      CALL wrk_dealloc( jpi, jpj, jpk, zsurfmsk, zsurf ) 
    18861886 
    18871887   END SUBROUTINE crs_dom_sfc 
     
    22752275      ENDDO 
    22762276      
    2277       CALL wrk_alloc( jpi_crs, jpj_crs, zmbk ) 
    2278  
    22792277      zmbk(:,:) = 0.0 
    22802278      zmbk(:,:) = REAL( mbathy_crs(:,:), wp ) ;   CALL crs_lbc_lnk(zmbk,'T',1.0)   ;   mbathy_crs(:,:) = INT( zmbk(:,:) ) 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90

    r5215 r5302  
    561561      CALL iom_put('isfgammat', zgammat2d) 
    562562      CALL iom_put('isfgammas', zgammas2d) 
    563          ! 
    564       !CALL wrk_dealloc( jpi,jpj, zfrz,zpress,zti, zqisf, zfwfisf  ) 
     563      ! 
    565564      CALL wrk_dealloc( jpi,jpj, zfrz,zpress,zti, zgammat2d, zgammas2d ) 
    566565      ! 
  • trunk/NEMOGCM/TOOLS/MISCELLANEOUS/chk_wrk_alloc.sh

    r3294 r5302  
    1212#   ../TOOLS/MISCELLANEOUS/chk_wrk_alloc.sh 
    1313# 
    14 set -ue 
     14set -u 
    1515# 
    1616echo "check for all *90 files contained in "$( pwd )" and its subdirectories" 
    1717# 
    18 for ff in $( grep -il wrk_nemo_2 $( find . -name "*90" ) ) 
     18for ff in $( grep -il "^ *use  *wrk_nemo" $( find . -name "*90" )  $( find . -name "*h90" ) ) 
    1919do 
    20  
    2120    # number of lines with wrk_alloc 
    22     n1=$( grep -ic "call *wrk_alloc *(" $ff )   
    23     # replace wrk_alloc with wrk_dealloc and count the lines 
    24     n2=$( sed -e "s/wrk_alloc/wrk_dealloc/" $ff | grep -ic "call *wrk_dealloc *(" ) 
    25     # we should get n2 = 2 * n1... 
    26     [ $(( 2 * $n1 )) -ne $n2 ] && echo "problem with wrk_alloc in $ff"  
    27     
    28     # same story but for wrk_dealloc 
    29     n1=$( grep -ic "call *wrk_dealloc *(" $ff )   
    30     n2=$( sed -e "s/wrk_dealloc/wrk_alloc/" $ff | grep -ic "call *wrk_alloc *(" ) 
    31     [ $(( 2 * $n1 )) -ne $n2 ] && echo "problem with wrk_dealloc in $ff"  
    32     
     21    n1=$( grep -ic "call *wrk_alloc *(" $ff ) 
     22    # number of lines with wrk_dealloc 
     23    nn1=$( grep -ic "call *wrk_dealloc *(" $ff )   
     24     
     25    if [ $(( $n1 + $nn1 )) -ne 0 ] 
     26    then 
     27   # replace wrk_alloc with wrk_dealloc and count the lines 
     28   n2=$( sed -e "s/wrk_alloc/wrk_dealloc/" $ff | grep -ic "call *wrk_dealloc *(" ) 
     29   # we should get n2 = 2 * n1... 
     30   [ $(( 2 * $n1 )) -ne $n2 ] && echo "problem with wrk_alloc in $ff"  
     31    
     32   # same story but for wrk_dealloc 
     33   nn2=$( sed -e "s/wrk_dealloc/wrk_alloc/" $ff | grep -ic "call *wrk_alloc *(" ) 
     34   [ $(( 2 * $nn1 )) -ne $nn2 ] && echo "problem with wrk_dealloc in $ff"  
     35    fi 
     36     
    3337done 
Note: See TracChangeset for help on using the changeset viewer.