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 8859 for branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting.sh – NEMO

Ignore:
Timestamp:
2017-11-30T16:01:29+01:00 (6 years ago)
Author:
nicolasmartin
Message:

Continuation of global refactoring of Trusting tool

  • Introduce new 'dev' mode beetween 'debug' and 'prod' modes to skip XIOS compilation from scratch and working in a solely testing directory (thanks Andrew for the suggestion)
  • Switch cfg files from 'svn:mime-type=text/x-shellscript' to 'svn:executable' trying to get syntax highlighting under Trac
  • Bugfixes: correct XIOS branch 'XIOS_DEV_CMIP6' for ORCA1 and remove remaining 'TRUST_DIR_BENCHMARK' (replace by TRUST_TEST_BENCHMARK)
  • Improve the workflow displayed in the terminal
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting.sh

    • Property eol-style deleted
    • Property svn:keywords deleted
    r8843 r8859  
    99 
    1010TRUST_MAIN_DIR=$PWD 
     11TRUST_FLAG_HELP='false' 
     12TRUST_FLAG_DEBUG='false'; TRUST_FLAG_DEV='false' ; TRUST_FLAG_PROD='false' 
    1113 
    12 TRUST_FLAG_DEBUG='false'  ; TRUST_FLAG_HELP='false' ; TRUST_FLAG_PROD='false' 
    13  
     14# Revision number of the tool 
    1415rev=$( svn info | awk '/Last Changed Rev/ {print $NF}' ) 
    1516 
    1617 
    1718##-------------------------------------------------------------------------------- 
    18 ## Get arguments from command line 
     19## Get short or long arguments from command line 
    1920##-------------------------------------------------------------------------------- 
    2021 
     
    4546    cat ./inc/trusting_help.txt 
    4647 
     48    ## Color this section to part with help 
     49    printf "\033[0;33m" 
     50 
    4751    if [ ${TRUST_FLAG_HELP} == 'false' ]; then 
    48    printf "\n\n\033[0;33m" 
    49    printf "At least one configuration (arch or user) file is missing or misspelled:" 
    50    printf "\t'%s'.cfg\t'%s'.cfg" ${TRUST_MAIN_USER} ${TRUST_MAIN_HPCC} 
    51    printf "\033[0m" 
     52   printf "                                                           \ 
     53       \nAt least 1 cfg file (arch or user) is missing or misspelled: \ 
     54       '%s.cfg' or '%s.cfg'\n"                                        \ 
     55       ${TRUST_MAIN_USER} ${TRUST_MAIN_HPCC} 
    5256    fi 
    5357 
    54     printf "\n\nContent of 'config' folder:" 
    55     find config -name *.cfg | cut -d/ -f2 \ 
    56    | xargs -n 4 printf "%-25s\t%-25s\t%-25s\n" 
     58    echo -e "\nContent of './cfg' folder:" 
     59    find ./cfg -name *.cfg | cut -d/ -f3 \ 
     60   | xargs -n 3 printf "%-20s\t%-20s\t%-20s\n" 
     61    printf "\033[0m\n" 
     62 
    5763    exit 1 
    5864else 
     
    95101##------------------ 
    96102 
    97 print_step 'Timestamped testing directory' 
     103step 'Testing directory' 
    98104init 
    99105 
     
    102108##------------------- 
    103109 
    104 print_step 'SVN action on NEMO directories' 
    105 printf "${TRUST_SVN_ACTION} on ${TRUST_SVN_NEMOGCM}:\n\n"   
     110step 'Local working copy' 
     111 
     112echo "${TRUST_SVN_ACTION} on ${TRUST_SVN_NEMOGCM}:" 
    106113get_nemo_rev 
    107114 
     
    110117##------------ 
    111118 
    112 print_step 'Get testing environment' 
     119step 'Environment' 
    113120get_soft_rel 
    114121 
     
    117124##--------------- 
    118125 
    119 print_step 'Compile XIOS' 
     126step 'Compilation(s)' 
     127 
     128printf "XIOS? " 
    120129compile_xios 
    121130 
    122 print_step "Compile ${TRUST_CFG_NEW} cfg from ${TRUST_CFG_REF}" 
     131printf "\nNEMO ${TRUST_CFG_NEW} cfg. from ${TRUST_CFG_REF}? " 
    123132compile_nemo 
    124133 
     
    127136##------- 
    128137 
    129 print_step 'Set job (copying or extracting inputs)' 
     138step 'Inputs' 
     139 
    130140get_inputs 
    131141 
    132 print_step 'Compare inputs' 
     142printf "\nCompare with benchmark? " 
    133143diff_inputs 
    134144 
     
    137147##---- 
    138148 
    139 print_step 'Submit job' 
     149step 'Job' 
     150 
     151printf "Submit? " 
    140152job_submit 
    141153 
    142 print_step 'Pending job' 
     154echo 'Pending...' 
    143155job_pending 
    144156 
    145 print_step 'Job finished' 
     157echo 'Finished!' 
    146158 
    147 print_step 'Test job state' 
     159printf "State? " 
    148160job_state 
    149161 
    150 print_step 'Get job performances' 
     162printf "Perfs?" 
    151163job_perfs 
    152164 
    153165 
    154 ## Outputs 
    155 ##-------- 
     166## Output(s) 
     167##---------- 
    156168 
    157 print_step 'Compare outputs' 
     169step 'Ouput(s)' 
     170 
     171echo 'Compare with benchmark:' 
     172 
     173printf "Plain text files? " 
    158174diff_results 
    159175 
    160 print_step 'Compare restarts' 
     176printf "Restart files? " 
    161177diff_restarts 
    162178 
Note: See TracChangeset for help on using the changeset viewer.