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.
Ticket Comment Diff – NEMO

Changes between Version 3 and Version 4 of Ticket #2133, comment 19


Ignore:
Timestamp:
2018-11-15T17:33:16+01:00 (5 years ago)
Author:
smasson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2133, comment 19

    v3 v4  
    44dev_r10164_HPC09_ESIWACE_PREP_MERGE: action 2a: add report calls of mppmin/max/sum, see #2133 
    55}}} 
    6  
    7  
    8 In action 2a, we used the following script to automatically modify all the calls to lbc_lnk and mpp_min/max/sum (that are not yet changed). 
    9  
    10  
    11 {{{#!bash 
    12 set -u 
    13  
    14 for dd in $( find . -wholename "*/MY_SRC" ) $( find src -type d | grep -v svn ) 
    15 do 
    16     cd $dd 
    17     pwd 
    18     echo 
    19     for file in `grep -i "call  *lbc_lnk *( *[a-zA-Z_0-9]" * | awk '{print $1}' | sed s/\:'.*'// | uniq` 
    20     do 
    21         routinename=` echo $file | sed s/\\\.'.*'//` 
    22         sed -e "s/ lbc_lnk\( *\)(\( *\)\([a-zA-Z_0-9]\)/ lbc_lnk\1(\2\'${routinename}\', \3/g"              \ 
    23             -e "s/ lbc_lnk_multi\( *\)(\( *\)\([a-zA-Z_0-9]\)/ lbc_lnk_multi\1(\2\'${routinename}\', \3/g"  \ 
    24             $file > toto 
    25         mv toto $file 
    26         echo $file done 
    27     done 
    28     for file in `grep -i "call  *mpp_... *( *[a-zA-Z_0-9]" * | awk '{print $1}' | sed s/\:'.*'// | uniq` 
    29     do 
    30         routinename=` echo $file | sed s/\\\.'.*'//` 
    31         sed -e "s/ mpp_min\( *\)(\( *\)\([a-zA-Z_0-9]\)/ mpp_min\1(\2\'${routinename}\', \3/g" \ 
    32             -e "s/ mpp_max\( *\)(\( *\)\([a-zA-Z_0-9]\)/ mpp_max\1(\2\'${routinename}\', \3/g" \ 
    33             -e "s/ mpp_sum\( *\)(\( *\)\([a-zA-Z_0-9]\)/ mpp_sum\1(\2\'${routinename}\', \3/g" \ 
    34             $file > toto 
    35         mv toto $file 
    36         echo $file done 
    37     done 
    38     echo 
    39     cd - 
    40 done 
    41  
    42 }}} 
    43