Changeset 5514
- Timestamp:
- 2015-06-30T12:06:05+02:00 (9 years ago)
- Location:
- trunk/NEMOGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90
r5215 r5514 121 121 122 122 LOGICAL :: linit = .FALSE. 123 LOGICAL :: ldebug = .FALSE. 123 124 !!---------------------------------------------------------------------- 124 125 !! NEMO/OPA 4.0 , NEMO Consortium (2011) … … 486 487 487 488 IF( SUM( tree(ii)%ishape ) == 0 ) THEN ! create a new branch 489 IF(ldebug) PRINT *, 'create new branch ', ii,ishape, isrt, itype 488 490 tree(ii)%itype = itype ! define the type of this branch 489 491 tree(ii)%ishape(:) = ishape(:) ! define the shape of this branch … … 515 517 tree(ii)%current%next%in_use = .FALSE. ! this leaf is not yet used 516 518 tree(ii)%current%next%indic = tree(ii)%current%indic + 1 ! number of this leaf 519 IF(ldebug) PRINT *, 'add a leaf ', ii, tree(ii)%current%indic 517 520 tree(ii)%current%next%prev => tree(ii)%current ! previous leaf of the new leaf is the current leaf 518 521 tree(ii)%current%next%next => NULL() ! next leaf is not yet defined -
trunk/NEMOGCM/TOOLS/MISCELLANEOUS/chk_wrk_alloc.sh
r5407 r5514 18 18 for ff in $( grep -il "^ *use *wrk_nemo" $( find . -name "*90" ) $( find . -name "*h90" ) ) 19 19 do 20 ierr=0 21 20 22 # number of lines with wrk_alloc 21 23 n1=$( grep -ic "call *wrk_alloc *(" $ff ) … … 28 30 n2=$( sed -e "s/wrk_alloc/wrk_dealloc/" $ff | grep -ic "call *wrk_dealloc *(" ) 29 31 # we should get n2 = 2 * n1... 30 [ $(( 2 * $n1 )) -ne $n2 ] && echo "problem with wrk_alloc in $ff" 31 32 if [ $(( 2 * $n1 )) -ne $n2 ] 33 then 34 ierr=1 35 echo "problem with wrk_alloc in $ff" 36 fi 32 37 # same story but for wrk_dealloc 33 38 nn2=$( sed -e "s/wrk_dealloc/wrk_alloc/" $ff | grep -ic "call *wrk_alloc *(" ) 34 39 if [ $(( 2 * $nn1 )) -ne $nn2 ] 35 40 then 36 echo "problem with wrk_dealloc in $ff" 41 ierr=1 42 echo "problem with wrk_dealloc in $ff" 43 fi 44 45 if [ $ierr -eq 0 ] # check that wrk_alloc block is the same as wrk_dealloc block 46 then 47 grep -i "call *wrk_alloc *(" $ff | sed -e "s/ //g" | sed -e "s/!.*//g" > txt1$$ 48 grep -i "call *wrk_dealloc *(" $ff | sed -e "s/wrk_dealloc/wrk_alloc/" | sed -e "s/ //g" | sed -e "s/!.*//g" > txt2$$ 49 cmp txt1$$ txt2$$ 50 if [ $? -ne 0 ] 51 then 52 echo "different syntax in wrk_alloc and wrk_dealloc in $ff" 53 echo 54 for ll in $( seq 1 $n1 ) # compare each line 55 do 56 sed -n ${ll}p txt1$$ > ll1$$ 57 sed -n ${ll}p txt2$$ > ll2$$ 58 cmp ll1$$ ll2$$ > /dev/null 59 if [ $? -ne 0 ] 60 then 61 grep -i "call *wrk_alloc *(" $ff | sed -n ${ll}p 62 grep -i "call *wrk_dealloc *(" $ff | sed -n ${ll}p 63 echo 64 fi 65 rm -f ll1$$ ll2$$ 66 done 67 fi 68 rm -f txt1$$ txt2$$ 69 else 37 70 grep -i "call *wrk_alloc *(" $ff 38 grep -i "call *wrk_dealloc *(" $ff 71 echo 72 grep -i "call *wrk_dealloc *(" $ff 39 73 echo 40 74 fi 75 41 76 fi 42 77
Note: See TracChangeset
for help on using the changeset viewer.