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 12569 for utils/CI/sette/sette_rpt.sh – NEMO

Ignore:
Timestamp:
2020-03-18T12:22:56+01:00 (4 years ago)
Author:
mathiot
Message:

ticket #2304: merge branch sette_ticket2304 into sette (thank you Simon for the review and all the suggestions you made). It include synchronisation and cleaning option between the REF config and the _ST config to ease the work when the reference configurations are changed and display bug in sette_check_avail_rev

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/CI/sette/sette_rpt.sh

    r11497 r12569  
    1515    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    1616    dorv=`echo $dorv | sed -e 's:.*/::'` 
    17     dorv2=`ls -1rt $vdir/$nam2/$mach/ | tail -1l ` 
     17    dorv2=`ls -1rt $vdir/$nam2/$mach/ 2>/dev/null | tail -1l ` 
    1818    dorv2=`echo $dorv2 | sed -e 's:.*/::'` 
    1919  else 
     
    211211      else 
    212212        get_ktdiff $f1t $f2t 
    213         printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " tracer.stat    reproducibility FAILED : " $dorv " (results are different after " $ktdiff " time steps)" 
     213        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " tracer.stat reproducibility FAILED : " $dorv " (results are different after " $ktdiff " time steps)" 
    214214# 
    215215# Offer view of differences on the second pass 
     
    283283        fi 
    284284      else 
    285         printf "%-20s %s %s\n" $nam  " run.stat    files are DIFFERENT " 
     285        get_ktdiff $f1s $f2s 
     286        printf "%-20s %s %s %-5s %s\n" $nam  " run.stat    files are DIFFERENT (results are different after " $ktdiff " time steps)" 
    286287# 
    287288# Offer view of differences on the second pass 
     
    306307        fi 
    307308      else 
    308         printf "%-20s %s %s\n" $nam  " tracer.stat files are DIFFERENT " 
     309        get_ktdiff $f1t $f2t 
     310        printf "%-20s %s %s %-5s %s\n" $nam  " tracer.stat files are DIFFERENT (results are different after " $ktdiff " time steps) " 
    309311# 
    310312# Offer view of differences on the second pass 
     
    418420  NEMO_VALID=${NEMO_VALIDATION_DIR} 
    419421  NEMO_VALID_REF=${NEMO_VALIDATION_REF} 
    420   LANG=en_US 
    421422# 
    422423  if [ ! -d $NEMO_VALID ]; then 
     
    425426  fi 
    426427# 
    427 # Directory to run the tests 
    428   CONFIG_DIR0=${MAIN_DIR}/cfgs 
    429   TOOLS_DIR=${MAIN_DIR}/tools 
    430   NPROC=32 
    431   SAS_RESTART_DIR=${CONFIG_DIR0}/ORCA2_SAS_ICE_ST 
    432428# 
    433429# Show current revision tag and branch name 
    434430# 
    435431echo "" 
    436 lastchange=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep 'Last Changed Rev' | awk '{print $NF}'` 
    437 revision=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep 'Revision' | awk '{print $NF}'` 
    438 branchname=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep ^URL | awk -F ipsl/forge/projets/nemo/svn/ '{print $NF}'` 
     432lastchange=`${SVN_CMD} info ${MAIN_DIR} | grep 'Last Changed Rev' | awk '{print $NF}'` 
     433revision=`${SVN_CMD} info ${MAIN_DIR} | grep 'Revision' | awk '{print $NF}'` 
     434branchname=`${SVN_CMD} info ${MAIN_DIR} | grep ^URL | awk -F ipsl/forge/projets/nemo/svn/ '{print $NF}'` 
    439435echo "Current code is : $branchname @ r$revision  ( last change @ r$lastchange )" 
    440436[ `${SVN_CMD} status -q ${MAIN_DIR}/{cfg,tests,src} | wc -l` -ge 1 ] && lastchange=${lastchange}+ 
    441437 
    442 # overwrite revision is argument 1 present 
    443 [[ $# -eq 1 ]] && lastchange=$1 
     438# overwrite revision or compiler 
     439  if [ $# -gt 0 ]; then 
     440    while getopts r:c:h option; do  
     441       case $option in 
     442          c) mach=$OPTARG;; 
     443          r) rev=$OPTARG;; 
     444          h | *) echo '' 
     445                 echo 'sette_rpt.sh : '  
     446                 echo '     display result for the latest change' 
     447                 echo ' -c COMPILER_name :' 
     448                 echo '     display result for the specified compiler' 
     449                 echo ' -r REVISION_number :' 
     450                 echo '     display sette results for the specified revision (set old for the latest revision available for each config)' 
     451                 echo '' 
     452                 exit 42;; 
     453       esac 
     454    done 
     455    shift $((OPTIND - 1)) 
     456fi 
     457 
     458# if $1 (remaining arguments) 
     459if [[ ! -z $1 ]] ; then rev=$1 ; fi 
     460 
     461# by default use the current lastchanged revision 
     462lastchange=${rev:-$lastchange} 
    444463 
    445464echo "" 
     
    454473# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory 
    455474 
    456 for pass in  0 1  
     475for pass in  $RPT_PASSES  
    457476do 
    458477# 
Note: See TracChangeset for help on using the changeset viewer.