547 |
nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` |
nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` |
548 |
if test -f taf_output ; then |
if test -f taf_output ; then |
549 |
n2er=`grep -c 'TAF *.* ERROR ' taf_output` |
n2er=`grep -c 'TAF *.* ERROR ' taf_output` |
550 |
nerr=`expr $nerr + $n2er` |
n3er=`grep -c '\*ERROR\* ' taf_output` |
551 |
|
nerr=`expr $nerr + $n2er + $n3er` |
552 |
fi |
fi |
553 |
echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ |
echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ |
554 |
>> $CDIR"/summary.txt" |
>> $CDIR"/summary.txt" |
797 |
# output do not exist or is older than executable: |
# output do not exist or is older than executable: |
798 |
rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG |
rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG |
799 |
if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi |
if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi |
800 |
#--a quick and dirty trick to run with Divided Adjoint (DIVA): |
#- Divided Adjoint Run: |
801 |
if test $KIND = 2 -a -x dorun.sh ; then |
# get the number of additional runs (add_DIVA_runs) from file "run_ADM_DIVA" |
802 |
./dorun.sh >> $RUNLOG 2>&1 |
if test $KIND = 2 -a -f run_ADM_DIVA ; then |
803 |
else |
adm_diva_nb=`sed -n '/^ *add_DIVA_runs\>.*=/p' run_ADM_DIVA | sed 's/ //g'` |
804 |
|
echo " Divided Adjoint Run: $adm_diva_nb" >> $RUNLOG |
805 |
|
eval "let $adm_diva_nb" |
806 |
|
if [ $add_DIVA_runs -ge 1 ] ; then |
807 |
|
rm -f costf* divided.ctrl snapshot* |
808 |
|
echo -n "(add_DIVA_runs=$add_DIVA_runs) ... " |
809 |
|
for ii in `seq 1 $add_DIVA_runs` ; do |
810 |
|
( eval $COMMAND ) >> $RUNLOG 2>&1 |
811 |
|
echo " additional DIVA run # $ii : done" >> $RUNLOG |
812 |
|
mv -f $OUTPUTFILE ${OUTPUTFILE}.diva_${ii} |
813 |
|
done |
814 |
|
fi |
815 |
|
fi |
816 |
|
#- special DIVA processing ends here |
817 |
( eval $COMMAND ) >> $RUNLOG 2>&1 |
( eval $COMMAND ) >> $RUNLOG 2>&1 |
|
fi |
|
|
#---------- |
|
818 |
RETVAL=$? |
RETVAL=$? |
819 |
ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` |
ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` |
820 |
if [ $POSTCLEAN -eq 1 -a $ENDVAL -gt 0 ] ; then |
if [ $POSTCLEAN -eq 1 -a $ENDVAL -gt 0 ] ; then |