- Timestamp:
- 2017-11-30T16:01:29+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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}
Note: See TracChangeset
for help on using the changeset viewer.