Changeset 1157 for trunk/NVTK/INSTALL/JOBS/assessment.ksh
- Timestamp:
- 2008-06-27T10:15:05+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NVTK/INSTALL/JOBS/assessment.ksh
r1155 r1157 81 81 # - zoutfile : output file name to print results 82 82 # - zwork : kind of prints to perform 83 # - zreprint : (optional) to avoid printing twice a message 83 # - zreprint : print a message once (yes/no) 84 # - ziter : (optional) print time steps number (yes/no) 84 85 ########################################################### 85 86 ################ Begin checkfile function ################# … … 94 95 # Print a message only once 95 96 zreprint=$4 97 # Print iterations number 98 ziter=$5 96 99 97 100 #set -x 98 101 99 test -n "${z reprint}"100 zrep =$?102 test -n "${ziter}" 103 zrepiter=$? 101 104 102 105 … … 112 115 if [ -a ${zf2check} ] ; then 113 116 fmes1=" List ${genf} files and check date creation: " 114 fmes2=" `ls - l${zf2check}` "117 fmes2=" `ls -o ${zf2check}` " 115 118 fmes3=" - file ${zf2check} is empty " 116 [ ${zrep} == 0 ] && echo "${blnk}${fmes1}" >> ${zoutfile} 119 fmes4=" Num. time steps: done / expected " 120 if [ ${zreprint} = 'yes' ] ; then 121 if [ ${zrepiter} == 0 ] ; then 122 echo "${blnk}${fmes1}" "${fmes4}" >> ${zoutfile} 123 else 124 echo "${blnk}${fmes1}" >> ${zoutfile} 125 fi 126 fi 117 127 118 128 # Check file is not empty 119 129 if [ -s ${zf2check} ] ; then 120 [ ${zoutfile} ] && echo "${blnk}${fmes2}" >> ${zoutfile} 121 xist=0 ; return ${xist} 130 if [ ${zrepiter} == 0 ] ; then 131 # Check run's iterations number from solver.stat 132 basedir="`dirname ${zf2check}`" 133 echo "`tail -1 ${zf2check}`" > temp1 134 echo "`grep nitend ${basedir}/namelist`" > temp2 135 typeset -Z4 ziter_run 136 typeset -Z4 ziter_ask 137 ziter_run="`awk '{print $3}' temp1`" 138 ziter_ask="`awk '{print $3}' temp2`" 139 \rm temp1 temp2 140 [ ${zoutfile} ] && echo "${blnk}${fmes2}" " ${ziter_run} / ${ziter_ask}" >> ${zoutfile} 141 xist=0 ; return ${xist} 142 else 143 [ ${zoutfile} ] && echo "${blnk}${fmes2}" >> ${zoutfile} 144 xist=0 ; return ${xist} 145 fi 122 146 else 123 147 [ ${zoutfile} ] && echo "${blnk}${fmes3}" >> ${zoutfile} … … 348 372 #-------- 349 373 checkfile ${filecs} 'endjob.txt' DIFF yes ; xfilecs=$? 350 checkfile ${filers} 'endjob.txt' DIFF 351 checkfile ${filecm} 'endjob.txt' DIFF 352 checkfile ${filerm} 'endjob.txt' DIFF 374 checkfile ${filers} 'endjob.txt' DIFF no ; xfilers=$? 375 checkfile ${filecm} 'endjob.txt' DIFF no ; xfilecm=$? 376 checkfile ${filerm} 'endjob.txt' DIFF no ; xfilerm=$? 353 377 354 378 # If current version files exist … … 396 420 # Check that timing file for the ${runt} reference version exist 397 421 filerv="${runt}/GTIME/REF/${runt}${CONF}_err" 398 checkfile ${filerv} 'endjob.txt' NORM ; xfilerv=$?422 checkfile ${filerv} 'endjob.txt' NORM no ; xfilerv=$? 399 423 echo " " >> endjob.txt 400 424 … … 432 456 xfilemon=0 433 457 434 checkfile ${filemon} 'endjob.txt' NORM yes ; xfilemon=$?435 checkfile ${filexxx} 'endjob.txt' NORM ; xfilemon=$?458 checkfile ${filemon} 'endjob.txt' NORM yes yes ; xfilemon=$? 459 checkfile ${filexxx} 'endjob.txt' NORM no yes ; xfilemon=$? 436 460 437 461 mak_diff_file -x ${xfilemon} -a ${filemon} -b ${filexxx} -r ${runt} -s LONG -k repro … … 447 471 448 472 checkfile ${filemon} 'endjob.txt' NORM yes ; xfilemon=$? 449 checkfile ${filexxx} 'endjob.txt' NORM ; xfilemon=$?473 checkfile ${filexxx} 'endjob.txt' NORM no ; xfilemon=$? 450 474 451 475 # check that tracer.stat files have been built based on ocean.output ones … … 456 480 457 481 checkfile ${filemon} 'endjob.txt' NORM yes ; xfilemon=$? 458 checkfile ${filexxx} 'endjob.txt' NORM ; xfilemon=$?482 checkfile ${filexxx} 'endjob.txt' NORM no ; xfilemon=$? 459 483 460 484 mak_diff_file -x ${xfilemon} -a ${filemon} -b ${filexxx} -r ${runt} -s LONG -k repro … … 483 507 xfile1=0 484 508 #------- 485 checkfile ${file1} 'endjob.txt' NORM yes ; xfile1=$?486 checkfile ${file2} 'endjob.txt' NORM ; xfile1=$?509 checkfile ${file1} 'endjob.txt' NORM yes yes ; xfile1=$? 510 checkfile ${file2} 'endjob.txt' NORM no yes ; xfile1=$? 487 511 # 488 512 cat ${file1} ${file2} > short_solver_${runt}.stat … … 502 526 503 527 checkfile ${file1} 'endjob.txt' NORM yes ; xfile1=$? 504 checkfile ${file2} 'endjob.txt' NORM 528 checkfile ${file2} 'endjob.txt' NORM no ; xfile1=$? 505 529 506 530 # check that tracer.stat files have been built based on ocean.output ones … … 511 535 512 536 checkfile ${file1} 'endjob.txt' NORM yes ; xfile1=$? 513 checkfile ${file2} 'endjob.txt' NORM 537 checkfile ${file2} 'endjob.txt' NORM no ; xfile1=$? 514 538 # 515 539 mak_diff_file -x ${xfile1} -a ${file2} -b ${file1} -r ${runt} -k resta … … 554 578 # solver.stat STREAM 1 555 579 checkfile ${file1} 'endjob.txt' NORM yes ; xfilev1=$? 556 checkfile ${filev1} 'endjob.txt' NORM ; xfilev1=$?580 checkfile ${filev1} 'endjob.txt' NORM no ; xfilev1=$? 557 581 558 582 mak_diff_file -x ${xfilev1} -a ${file1} -b ${filev1} -r ${runt} -s STREAM_1 -t ${REF_TAG} … … 561 585 # ocean.output STREAM 1 562 586 checkfile ${file_oc1} 'endjob.txt' NORM yes ; xfile_oc1=$? 563 checkfile ${file_roc1} 'endjob.txt' NORM ; xfile_oc1=$?587 checkfile ${file_roc1} 'endjob.txt' NORM no ; xfile_oc1=$? 564 588 565 589 mak_diff_file -x ${xfile_oc1} -a ${file_oc1} -b ${file_roc1} -r ${runt} -s STREAM_1 -t ${REF_TAG} … … 572 596 # solver.stat STREAM 2 573 597 checkfile ${file2} 'endjob.txt' NORM yes ; xfilev2=$? 574 checkfile ${filev2} 'endjob.txt' NORM ; xfilev2=$?598 checkfile ${filev2} 'endjob.txt' NORM no ; xfilev2=$? 575 599 576 600 mak_diff_file -x ${xfilev2} -a ${file2} -b ${filev2} -r ${runt} -s STREAM_2 -t ${REF_TAG} … … 579 603 # ocean.output STREAM 2 580 604 checkfile ${file_oc2} 'endjob.txt' NORM yes ; xfile_oc2=$? 581 checkfile ${file_roc2} 'endjob.txt' NORM ; xfile_oc2=$?605 checkfile ${file_roc2} 'endjob.txt' NORM no ; xfile_oc2=$? 582 606 583 607 mak_diff_file -x ${xfile_oc2} -a ${file_oc2} -b ${file_roc2} -r ${runt} -s STREAM_2 -t ${REF_TAG}
Note: See TracChangeset
for help on using the changeset viewer.