Changeset 8859
- Timestamp:
- 2017-11-30T16:01:29+01:00 (7 years ago)
- Location:
- branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/X64_ADA.cfg
- Property svn:mime-type deleted
- Property svn:executable set to *
-
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/X64_CURIE.cfg
- Property svn:mime-type deleted
- Property svn:executable set to *
-
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/X64_CURIE_trust.cfg
- Property svn:mime-type deleted
- Property svn:executable set to *
-
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/arch_template.cfg
- Property svn:mime-type deleted
- Property svn:executable set to *
-
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/martin.cfg
- Property svn:mime-type deleted
- Property svn:executable set to *
r8843 r8859 24 24 TRUST_IO_XIOS=$CCCWORKDIR/XIOS 25 25 26 if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then 27 TRUST_IO_XIOS+='/xios-1.0' 28 elif [ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ]; then 29 TRUST_IO_XIOS+='/XIOS_DEV_CMIP6' 26 if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then 27 28 if [ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ]; then 29 TRUST_IO_XIOS+='/XIOS_DEV_CMIP6' 30 else 31 TRUST_IO_XIOS+='/xios-1.0' 32 fi 33 30 34 else 31 35 TRUST_IO_XIOS+='/trunk' … … 36 40 ##-------------- 37 41 38 TRUST_TEST_MAILING=$( cat./cfg/mailing_list.txt )42 TRUST_TEST_MAILING=$( < ./cfg/mailing_list.txt ) -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/romr005.cfg
- Property svn:mime-type deleted
- Property svn:executable set to *
-
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/user_template.cfg
- Property svn:mime-type deleted
- Property svn:executable set to *
-
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting.env
r8843 r8859 12 12 ##------------------------------------------------------------------- 13 13 14 if [ ${TRUST_FLAG_DEBUG} == 'false' ]; then 15 ## std mode (merge stdout & stderr to /dev/null, XIOS compilation from scratch) 14 if [ ${TRUST_FLAG_DEBUG} == 'true' ]; then 15 ## debug mode (skip XIOS compilation , output stdout & stderr) 16 TRUST_IO_XIOS_MODE='' 17 TRUST_MAIN_STDOUT='' 18 elif [ ${TRUST_FLAG_DEV} == 'true' ]; then 19 ## dev mode (skip XIOS compilation , output only stderr ) 20 TRUST_IO_XIOS_MODE='' 21 TRUST_MAIN_STDOUT='1> /dev/null' 22 else 23 ## prod mode (compile XIOS from scratch, no stdout nor stderr ) 16 24 TRUST_IO_XIOS_MODE='--full' 17 25 TRUST_MAIN_STDOUT='>& /dev/null' 18 else19 ## debug mode (verbose output and skip XIOS compilation)20 TRUST_IO_XIOS_MODE=''21 TRUST_MAIN_STDOUT='1> /dev/null'22 26 fi 23 27 … … 208 212 fi 209 213 210 export TRUST_TEST_LOG=${TRUST_ DIR_BENCHMARK}/trusting_${TRUST_TEST_NAME}.txt214 export TRUST_TEST_LOG=${TRUST_TEST_BENCHMARK}/trusting_${TRUST_TEST_NAME}.txt 211 215 212 216 export TRUST_TEST_MAILING -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting_func.sh
- Property eol-style deleted
- Property svn:keywords deleted
r8843 r8859 18 18 ##-------------------------------------------------------------------------------- 19 19 20 print_step() {20 step() { 21 21 local char_nb=$( echo "$1" | wc -c ) 22 22 local outline=$( printf "%${char_nb}s" ) 23 23 24 printf "\n \nStep.....\n%s\n%s\n\n" "$1" ${outline// /-}24 printf "\n%s\n%s\n\n" "$1" ${outline// /-} 25 25 } 26 26 … … 152 152 cd ${TRUST_SVN_NEMOGCM}/CONFIG 153 153 154 ## Recompiling from scratch if not in debug mode 155 if [[ -d ${TRUST_CFG_NEW} && ${TRUST_FLAG_DEBUG} == 'false' ]]; then 156 ./makenemo -n ${TRUST_CFG_NEW} clean_config \ 157 > /dev/null <<EOF 154 ## Recompiling from scratch if not in debug or dev mode 155 if [[ ${TRUST_FLAG_DEBUG} == 'false' && ${TRUST_FLAG_DEV} == 'false' ]]; then 156 157 if [[ -d ${TRUST_CFG_NEW} ]]; then 158 ./makenemo -n ${TRUST_CFG_NEW} clean_config \ 159 > /dev/null <<EOF 158 160 y 159 161 EOF 162 fi 163 160 164 fi 161 165 … … 420 424 if [ -e ${TRUST_TEST_BENCHMARK}/$filebase.nc ]; then 421 425 422 #bcmk='true'423 426 cdo diffn $filebase.nc ${TRUST_TEST_BENCHMARK}/$filebase.nc \ 424 427 > cdo_diff.out 2> /dev/null … … 574 577 575 578 ## Computing 576 'H') TRUST_FLAG_ERROR='Crashed at time step' ;; 577 'I') TRUST_FLAG_ERROR='Exceeded time limit' ;; 579 'H') TRUST_FLAG_ERROR='Crashed at time step ' 580 comments 'E R R O R' 581 [ -e time.step ] && time_step=$( cat time.step ) 582 TRUST_FLAG_ERROR+=${time_step:=0} ;; 583 'I') TRUST_FLAG_ERROR='Exceeded time limit of ' 584 TRUST_FLAG_ERROR+=$(( ${TRUST_JOB_TIMEOUT}/3600 ))'h' ;; 578 585 579 586 ## Results … … 592 599 593 600 ## Eventual comments from ocean.output 594 if [ ${TRUST_FLAG_ERROR} == 'Crashed at time step' ]; then 595 comments 'E R R O R' 596 [ -e time.step ] && time_step=$( cat time.step ) 597 TRUST_FLAG_ERROR+=' '${time_step:=0} 598 else 599 comments 'W A R N I N G' 600 601 if [ ${TRUST_FLAG_ERROR} == 'Exceeded time limit' ]; then 602 TRUST_FLAG_ERROR+=' '$(( ${TRUST_JOB_TIMEOUT}/3600 ))'h' 603 fi 604 605 fi 601 [[ ! ${TRUST_FLAG_ERROR} =~ 'Crashed at time step' ]] && comments 'W A R N I N G' 606 602 607 603 ## Last messenger files … … 609 605 sed -i "2 s/.*/$TRUST_FLAG_ERROR/" ${file_stat} 610 606 611 ## Save tested configuration if trusting failed in production mode ( -p|--prod)607 ## Save tested configuration if trusting failed in production mode ('-p') 612 608 if [[ ${TRUST_FLAG_RESULT} == 'FAILED' && ${TRUST_FLAG_PROD} == 'true' ]]; then 613 609 echo 'Creating archive '${TRUST_TEST_BACKUP}' under '${TRUST_TEST_BENCHMARK} -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting.sh
- Property eol-style deleted
- Property svn:keywords deleted
r8843 r8859 9 9 10 10 TRUST_MAIN_DIR=$PWD 11 TRUST_FLAG_HELP='false' 12 TRUST_FLAG_DEBUG='false'; TRUST_FLAG_DEV='false' ; TRUST_FLAG_PROD='false' 11 13 12 TRUST_FLAG_DEBUG='false' ; TRUST_FLAG_HELP='false' ; TRUST_FLAG_PROD='false' 13 14 # Revision number of the tool 14 15 rev=$( svn info | awk '/Last Changed Rev/ {print $NF}' ) 15 16 16 17 17 18 ##-------------------------------------------------------------------------------- 18 ## Get arguments from command line19 ## Get short or long arguments from command line 19 20 ##-------------------------------------------------------------------------------- 20 21 … … 45 46 cat ./inc/trusting_help.txt 46 47 48 ## Color this section to part with help 49 printf "\033[0;33m" 50 47 51 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} 52 56 fi 53 57 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 57 63 exit 1 58 64 else … … 95 101 ##------------------ 96 102 97 print_step 'Timestamped testing directory'103 step 'Testing directory' 98 104 init 99 105 … … 102 108 ##------------------- 103 109 104 print_step 'SVN action on NEMO directories' 105 printf "${TRUST_SVN_ACTION} on ${TRUST_SVN_NEMOGCM}:\n\n" 110 step 'Local working copy' 111 112 echo "${TRUST_SVN_ACTION} on ${TRUST_SVN_NEMOGCM}:" 106 113 get_nemo_rev 107 114 … … 110 117 ##------------ 111 118 112 print_step 'Get testing environment'119 step 'Environment' 113 120 get_soft_rel 114 121 … … 117 124 ##--------------- 118 125 119 print_step 'Compile XIOS' 126 step 'Compilation(s)' 127 128 printf "XIOS? " 120 129 compile_xios 121 130 122 print _step "Compile ${TRUST_CFG_NEW} cfg from ${TRUST_CFG_REF}"131 printf "\nNEMO ${TRUST_CFG_NEW} cfg. from ${TRUST_CFG_REF}? " 123 132 compile_nemo 124 133 … … 127 136 ##------- 128 137 129 print_step 'Set job (copying or extracting inputs)' 138 step 'Inputs' 139 130 140 get_inputs 131 141 132 print _step 'Compare inputs'142 printf "\nCompare with benchmark? " 133 143 diff_inputs 134 144 … … 137 147 ##---- 138 148 139 print_step 'Submit job' 149 step 'Job' 150 151 printf "Submit? " 140 152 job_submit 141 153 142 print_step 'Pending job'154 echo 'Pending...' 143 155 job_pending 144 156 145 print_step 'Job finished'157 echo 'Finished!' 146 158 147 print _step 'Test job state'159 printf "State? " 148 160 job_state 149 161 150 print _step 'Get job performances'162 printf "Perfs?" 151 163 job_perfs 152 164 153 165 154 ## Output s155 ##-------- 166 ## Output(s) 167 ##---------- 156 168 157 print_step 'Compare outputs' 169 step 'Ouput(s)' 170 171 echo 'Compare with benchmark:' 172 173 printf "Plain text files? " 158 174 diff_results 159 175 160 print _step 'Compare restarts'176 printf "Restart files? " 161 177 diff_restarts 162 178
Note: See TracChangeset
for help on using the changeset viewer.