- Timestamp:
- 2015-06-30T16:20:45+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh
r5509 r5521 7 7 if [ "$state" == 'E R R O R' ]; then 8 8 [ -e time.step ] && LAST_TIME_STEP=$( cat time.step | tr -d [:space:] ) 9 export ${LAST_TIME_STEP} ERR=19 export ${LAST_TIME_STEP} 10 10 fi 11 11 12 12 [ -e ocean.output ] && line=$( grep -m1 -A5 "$state" ocean.output | tr -d '\n' ) 13 13 14 if [[ -e ${REFE_DIR}/model.log && $( diff -q model.log ${REFE_DIR}/model.log ) ]]; then 14 15 line=$( diff model.log ${REFE_DIR}/model.log | tr -d '\n' ) … … 22 23 mesg='Same' 23 24 for file in inputs_list.txt $( ls namelist_* ) $( ls *.xml ); do 24 diff -q $file ${REFE_DIR}/$file 25 diff -q $file ${REFE_DIR}/$file > /dev/null 25 26 [ $? -ne 0 ] && mesg='Different' 26 27 done 27 28 28 printf "Input files\n$mesg\n" | tee mesg_09_input files_${CFG_USER}_${CFG_ARCH}.txt29 printf "Input files\n$mesg\n" | tee mesg_09_inputs_${CFG_USER}_${CFG_ARCH}.txt 29 30 } 30 31 31 32 diff_results() { 32 33 for file in ocean.output $( ls *.stat ); do 33 [ ! -e ${REFE_DIR}/$file ] && export ST='FAILED' && get_out $ST ERR=734 [ ! -e ${REFE_DIR}/$file ] && export ST='FAILED' && get_out 7 34 35 diff -q $file ${REFE_DIR}/$file 35 36 [ $? -ne 0 ] && export ST='FAILED' … … 38 39 39 40 diff_restart() { 40 [ ! -e ${REFE_DIR}/time.step ] && export ST='FAILED' && get_out $ST ERR=941 [ ! -e ${REFE_DIR}/time.step ] && export ST='FAILED' && get_out 9 41 42 42 43 export LAST_TIME_STEP=$( cat ${REFE_DIR}/time.step | tr -d [:space:] ) … … 82 83 get_cpu_time() { 83 84 real_cpu_time=$( eval "${JOB_INFO} ${JOB_ID} | ${JOB_TIME}" ) 84 printf "Real CPU time\n${real_cpu_time}\n" | tee mesg_10_ realcputime_${CFG_USER}_${CFG_ARCH}.txt85 printf "Real CPU time\n${real_cpu_time}\n" | tee mesg_10_cputime_${CFG_USER}_${CFG_ARCH}.txt 85 86 } 86 87 … … 175 176 176 177 END_MAIL 177 #`tail -n 1 ${TEST_DIR}/mesg_03_error_${CFG_USER}_${CFG_ARCH}.txt` 178 178 179 if [ -e ${TEST_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt ]; then 179 180 cat ${TEST_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt >> trusting.mail … … 188 189 189 190 get_out() { 191 ERR=$1 192 190 193 printf "Status\n$ST\n" > mesg_02_status_${CFG_USER}_${CFG_ARCH}.txt 191 194 192 # Save tested configuration if trusting failed193 195 if [ "$ST" == 'FAILED' ]; then 194 196 cd ${TEST_DIR} 195 printf "Input files\n\n" > mesg_09_inputfiles_${CFG_USER}_${CFG_ARCH}.txt 196 printf "Real CPU time\n\n" > mesg_10_realcputime_${CFG_USER}_${CFG_ARCH}.txt 197 198 if [ ! -e mesg_09_inputs_${CFG_USER}_${CFG_ARCH}.txt ]; then 199 printf "Input files\n\n" > mesg_09_inputs_${CFG_USER}_${CFG_ARCH}.txt 200 fi 201 202 if [ ! -e mesg_10_cputime_${CFG_USER}_${CFG_ARCH}.txt ]; then 203 printf "Real CPU time\n\n" > mesg_10_cputime_${CFG_USER}_${CFG_ARCH}.txt 204 fi 197 205 198 206 if [ ! -e mesg_11_comments_${CFG_USER}_${CFG_ARCH}.txt ]; then … … 201 209 202 210 # Error identification 203 case ERR in211 case $ERR in 204 212 # Compilation 205 213 1) ERR='XIOS compilation failed' ;; 2) ERR='NEMO compilation failed' ;; … … 215 223 esac 216 224 217 #tar -czf ${REFE_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.tar.gz *225 export ERR 218 226 fi 219 227 220 228 printf "Result.....\n$ERR\n" > mesg_03_result_${CFG_USER}_${CFG_ARCH}.txt 229 230 # Save tested configuration if trusting failed 231 [ "$ST" == 'FAILED' ] && tar -czf ${REFE_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.tar.gz * 221 232 222 233 mesg_make … … 234 245 ${JOB_INFO} ${JOB_ID} >> computation.log 235 246 sleep ${time_increment} 236 # let time_elapsed+=${time_increment}237 247 time_elapsed=$(( ${time_elapsed} + ${time_increment} )) 238 248 done … … 244 254 export ${TIME_LIMIT} 245 255 get_out $ST ERR=6 246 } 256 fi 257 }
Note: See TracChangeset
for help on using the changeset viewer.