458 |
if test "x$NOCLEAN" = xt ; then |
if test "x$NOCLEAN" = xt ; then |
459 |
echo "run_clean skipped!" |
echo "run_clean skipped!" |
460 |
else |
else |
461 |
( |
( |
462 |
cd $1; |
cd $1; |
463 |
printf 'clean run-dir ... ' |
printf 'clean run-dir ... ' |
464 |
# part of what is done after "make clean" when doing "make CLEAN" |
# part of what is done after "make clean" when doing "make CLEAN" |
465 |
find . -name "*.meta" -exec rm {} \; |
find . -name "*.meta" -exec rm {} \; |
466 |
find . -name "*.data" -exec rm {} \; |
find . -name "*.data" -exec rm {} \; |
467 |
find . -name "fort.*" -exec rm {} \; |
find . -name "fort.*" -exec rm {} \; |
468 |
find . -type l -exec rm {} \; |
find . -type l -exec rm {} \; |
469 |
#- should remove executable only if sym-link (alredy done above) |
#- should remove executable only if sym-link (already done above) |
470 |
rm -f $RUNLOG *.txt STD* w2_tile_topology.????.log *diagnostics.log datetime |
rm -f $RUNLOG *.txt STDOUT.* STDERR.* *diagnostics.log *.[0-9][0-9][0-9][0-9].log |
471 |
rm -rf mnc_test_* |
rm -f datetime costfinal divided.ctrl snapshot* output_adm.*.diva_* |
472 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
473 |
rm -f oad_cp.000.[0-9][0-9][0-9][0-9][0-9] |
rm -f oad_cp.000.[0-9][0-9][0-9][0-9][0-9] |
474 |
echo successful |
rm -rf mnc_test_* |
475 |
exit 0 |
echo successful |
476 |
) |
exit 0 |
477 |
|
) |
478 |
fi |
fi |
479 |
} |
} |
480 |
|
|
548 |
nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` |
nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` |
549 |
if test -f taf_output ; then |
if test -f taf_output ; then |
550 |
n2er=`grep -c 'TAF *.* ERROR ' taf_output` |
n2er=`grep -c 'TAF *.* ERROR ' taf_output` |
551 |
nerr=`expr $nerr + $n2er` |
n3er=`grep -c '\*ERROR\* ' taf_output` |
552 |
|
nerr=`expr $nerr + $n2er + $n3er` |
553 |
fi |
fi |
554 |
echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ |
echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ |
555 |
>> $CDIR"/summary.txt" |
>> $CDIR"/summary.txt" |
798 |
# output do not exist or is older than executable: |
# output do not exist or is older than executable: |
799 |
rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG |
rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG |
800 |
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 |
801 |
#--a quick and dirty trick to run with Divided Adjoint (DIVA): |
#- Divided Adjoint Run: |
802 |
if test $KIND = 2 -a -x dorun.sh ; then |
# get the number of additional runs (add_DIVA_runs) from file "run_ADM_DIVA" |
803 |
./dorun.sh >> $RUNLOG 2>&1 |
if test $KIND = 2 -a -f run_ADM_DIVA ; then |
804 |
else |
adm_diva_nb=`sed -n '/^ *add_DIVA_runs\>.*=/p' run_ADM_DIVA | sed 's/ //g'` |
805 |
|
echo " Divided Adjoint Run: $adm_diva_nb" >> $RUNLOG |
806 |
|
eval "let $adm_diva_nb" |
807 |
|
if [ $add_DIVA_runs -ge 1 ] ; then |
808 |
|
rm -f costf* divided.ctrl snapshot* |
809 |
|
echo -n "(add_DIVA_runs=$add_DIVA_runs) ... " |
810 |
|
for ii in `seq 1 $add_DIVA_runs` ; do |
811 |
|
( eval $COMMAND ) >> $RUNLOG 2>&1 |
812 |
|
echo " additional DIVA run # $ii : done" >> $RUNLOG |
813 |
|
mv -f $OUTPUTFILE ${OUTPUTFILE}.diva_${ii} |
814 |
|
done |
815 |
|
fi |
816 |
|
fi |
817 |
|
#- special DIVA processing ends here |
818 |
( eval $COMMAND ) >> $RUNLOG 2>&1 |
( eval $COMMAND ) >> $RUNLOG 2>&1 |
|
fi |
|
|
#---------- |
|
819 |
RETVAL=$? |
RETVAL=$? |
820 |
ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` |
ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` |
821 |
if [ $POSTCLEAN -eq 1 -a $ENDVAL -gt 0 ] ; then |
if [ $POSTCLEAN -eq 1 -a $ENDVAL -gt 0 ] ; then |
1463 |
rm -f $EXECUTABLE *.bak |
rm -f $EXECUTABLE *.bak |
1464 |
rm -f genmake_state genmake_*optfile genmake.log |
rm -f genmake_state genmake_*optfile genmake.log |
1465 |
rm -f SIZE.h.mpi genmake.tr_log make.tr_log |
rm -f SIZE.h.mpi genmake.tr_log make.tr_log |
1466 |
|
rm -rf mpi_headers |
1467 |
) |
) |
1468 |
if test -d $dir/$rundir/CVS ; then |
if test -d $dir/$rundir/CVS ; then |
1469 |
echo -n ' --- dir:' $dir/$rundir ': ' |
echo -n ' --- dir:' $dir/$rundir ': ' |