238 |
listVar=" $sVar "`echo "$listVar " | sed "s/ $sVar / /g"` |
listVar=" $sVar "`echo "$listVar " | sed "s/ $sVar / /g"` |
239 |
fi |
fi |
240 |
if [ $debug -gt 0 ]; then echo "testoutput_run: listVar(M)='$listVar'" 1>&2 ; fi |
if [ $debug -gt 0 ]; then echo "testoutput_run: listVar(M)='$listVar'" 1>&2 ; fi |
|
#- report to this experiment local summary file --- |
|
|
echo "MACH='$MACH'" > $locDIR"/summary.txt" |
|
|
echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt" |
|
|
echo "DATE='$DATE'" >> $locDIR"/summary.txt" |
|
|
grep '(PID\.TID 0000\.0001) n.. =' $1/$2/$OUTPUTFILE \ |
|
|
| sed 's/(PID.TID 0000.0001) //' >> $locDIR"/summary.txt" |
|
241 |
echo "listVar='$listVar'" >> $locDIR"/summary.txt" |
echo "listVar='$listVar'" >> $locDIR"/summary.txt" |
242 |
#--- |
#--- |
243 |
allargs="" |
allargs="" |
424 |
find . -name "*.data" -exec rm {} \; |
find . -name "*.data" -exec rm {} \; |
425 |
find . -name "fort.*" -exec rm {} \; |
find . -name "fort.*" -exec rm {} \; |
426 |
find . -type l -exec rm {} \; |
find . -type l -exec rm {} \; |
427 |
rm -f $EXECUTABLE $RUNLOG *.txt STD* *diagnostics.log datetime |
#- should remove executable only if sym-link (and above does it) |
428 |
|
#rm -f $EXECUTABLE |
429 |
|
rm -f $RUNLOG *.txt STD* *diagnostics.log datetime |
430 |
rm -rf mnc_test_* |
rm -rf mnc_test_* |
431 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
432 |
echo successful |
echo successful |
462 |
{ |
{ |
463 |
# makemodel directory |
# makemodel directory |
464 |
( |
( |
465 |
|
mk_fail=0 |
466 |
if test "x$NOMAKE" = xt ; then |
if test "x$NOMAKE" = xt ; then |
467 |
cd $1; |
cd $1; |
468 |
if test -x $EXECUTABLE ; then |
if test -x $EXECUTABLE ; then |
469 |
echo "make skipped!" |
echo "make skipped!" |
470 |
else |
else |
471 |
echo "no executable!" |
echo "no executable!" |
472 |
return 2 |
mk_fail=3 |
473 |
fi |
fi |
474 |
else |
else |
475 |
cd $1; |
cd $1; |
492 |
echo failed |
echo failed |
493 |
cp make.tr_log genmake.log genmake.tr_log $CDIR |
cp make.tr_log genmake.log genmake.tr_log $CDIR |
494 |
rm -f $EXECUTABLE |
rm -f $EXECUTABLE |
495 |
return 1 |
mk_fail=1 |
496 |
else |
else |
497 |
echo successful |
echo successful |
498 |
fi |
fi |
499 |
|
else |
500 |
|
echo "no Makefile !" |
501 |
|
mk_fail=2 |
502 |
fi |
fi |
503 |
fi |
fi |
504 |
|
if test "x$ADM" = xt -a -f taf_ad.log ; then |
505 |
|
head -1 taf_ad.log >> $CDIR"/summary.txt" |
506 |
|
nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log` |
507 |
|
nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` |
508 |
|
echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ |
509 |
|
>> $CDIR"/summary.txt" |
510 |
|
fi |
511 |
|
if test $mk_fail != 0 ; then return $mk_fail ; fi |
512 |
) |
) |
513 |
} |
} |
514 |
|
|
690 |
( |
( |
691 |
cd $1 |
cd $1 |
692 |
printf 'runmodel in %s ... ' $1 |
printf 'runmodel in %s ... ' $1 |
693 |
|
if test "x$MPI" != x0 ; then |
694 |
|
#- adjust the MPI run command with the right number of Procs |
695 |
|
#echo '' ; echo " COMMAND='$COMMAND'" |
696 |
|
COMMAND=`echo $COMMAND | sed "s/ TR_NPROC / $LOC_NPROC /"` |
697 |
|
if test "x$MPI_MFILE" != x ; then |
698 |
|
COMMAND=`echo $COMMAND | sed "s/ TR_MFILE / ..\/..\/$LOC_MFILE /"` |
699 |
|
fi |
700 |
|
#echo " COMMAND='$COMMAND'" |
701 |
|
fi |
702 |
if test -L $EXECUTABLE ; then |
if test -L $EXECUTABLE ; then |
703 |
if test -x "../"$builddir"/"$EXECUTABLE ; then |
if test -x "../"$builddir"/"$EXECUTABLE ; then |
704 |
cmp $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1 |
cmp $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1 |
710 |
echo " link" $EXECUTABLE "from dir ../"$builddir > run.log_tmp |
echo " link" $EXECUTABLE "from dir ../"$builddir > run.log_tmp |
711 |
ln -sf "../"$builddir"/"$EXECUTABLE . |
ln -sf "../"$builddir"/"$EXECUTABLE . |
712 |
fi |
fi |
|
if test "x$MPI" != x0 ; then |
|
|
#- adjust the MPI run command with the right number of Procs |
|
|
#echo '' ; echo " COMMAND='$COMMAND'" |
|
|
COMMAND=`echo $COMMAND | sed "s/ TR_NPROC / $LOC_NPROC /"` |
|
|
if test "x$MPI_MFILE" != x ; then |
|
|
COMMAND=`echo $COMMAND | sed "s/ TR_MFILE / ..\/..\/$LOC_MFILE /"` |
|
|
fi |
|
|
#echo " COMMAND='$COMMAND'" |
|
|
fi |
|
713 |
if test ! -x $EXECUTABLE ; then |
if test ! -x $EXECUTABLE ; then |
714 |
rm -f $RUNLOG ; touch $RUNLOG |
rm -f $RUNLOG ; touch $RUNLOG |
715 |
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 |
738 |
fi |
fi |
739 |
fi |
fi |
740 |
rm -f run.log_tmp |
rm -f run.log_tmp |
741 |
|
#- in all cases where OutputFile exists, report SIZE (and AD time) |
742 |
|
if test -f $OUTPUTFILE ; then |
743 |
|
grep '(PID\.TID 0000\.0001) n.. =' $OUTPUTFILE \ |
744 |
|
| sed 's/(PID.TID 0000.0001) //' >> $CDIR"/summary.txt" |
745 |
|
if test "x$ADM" = xt ; then |
746 |
|
grep -A3 'Seconds in section "ALL' $OUTPUTFILE >> $CDIR"/summary.txt" |
747 |
|
fi |
748 |
|
fi |
749 |
|
if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi |
750 |
if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then |
if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then |
751 |
echo successful |
echo successful |
752 |
printf '=> output from running in %s :\n' $1 1>&2 |
printf '=> output from running in %s :\n' $1 1>&2 |
753 |
tail $RUNLOG | sed 's/^.*/> &/g' 1>&2 |
tail $RUNLOG | sed 's/^.*/> &/g' 1>&2 |
|
# === Reduce the size of the testing emails! |
|
|
#cp $OUTPUTFILE $CDIR"/"$OUTPUTFILE |
|
|
if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi |
|
754 |
return 0 |
return 0 |
755 |
elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then |
elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then |
756 |
#-- for some weird cases (run is finihed but with error code) |
#-- for some weird cases (run is finihed but with error code) |
763 |
printf '=> output from running in %s :\n' $1 1>&2 |
printf '=> output from running in %s :\n' $1 1>&2 |
764 |
tail $RUNLOG | sed 's/^.*/> &/g' 1>&2 |
tail $RUNLOG | sed 's/^.*/> &/g' 1>&2 |
765 |
cp $RUNLOG $CDIR"/"$RUNLOG |
cp $RUNLOG $CDIR"/"$RUNLOG |
|
if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi |
|
766 |
return 1 |
return 1 |
767 |
fi |
fi |
768 |
) |
) |
1417 |
unset genmake makedepend make run |
unset genmake makedepend make run |
1418 |
results=$EMPTY_RESULTS |
results=$EMPTY_RESULTS |
1419 |
|
|
1420 |
# Create an output dir for each OPTFILE/tdir combination |
# Create an output dir & summary.txt file for each tested experiment (tdir) |
1421 |
locDIR=$DRESULTS"/"$dir |
locDIR=$DRESULTS"/"$dir |
1422 |
mkdir $locDIR |
mkdir $locDIR |
1423 |
|
#- report to this experiment local summary file --- |
1424 |
|
echo "DATE='$DATE' ; tdir='$dir'" > $locDIR"/summary.txt" |
1425 |
|
echo "MACH='$MACH'" >> $locDIR"/summary.txt" |
1426 |
|
echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt" |
1427 |
CDIR=`pwd`"/$locDIR" |
CDIR=`pwd`"/$locDIR" |
1428 |
|
|
1429 |
if test "x$NORUN" = xt ; then |
if test "x$NORUN" = xt ; then |
1449 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
1450 |
echo 1>&2 |
echo 1>&2 |
1451 |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
|
touch $locDIR"/summary.txt" |
|
1452 |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
|
echo "tdir='$dir'" >> $locDIR"/summary.txt" |
|
|
if test "x$ADM" = xt ; then |
|
|
head -1 $dir/$builddir/taf_ad.log >> $locDIR"/summary.txt" |
|
|
grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \ |
|
|
>> $locDIR"/summary.txt" |
|
|
fi |
|
1453 |
|
|
1454 |
for ex in $extra_runs ; do |
for ex in $extra_runs ; do |
1455 |
unset run |
unset run |
1456 |
results=$EMPTY_RESULTS |
results=$EMPTY_RESULTS |
1457 |
# reference output file |
# reference output file |
1458 |
refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"` |
refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"` |
1459 |
# Create an output dir for each OPTFILE/tdir.ex combination |
# Create an output dir & summary.txt file for each extra run (tdir.ex) |
1460 |
locDIR=$DRESULTS"/"$dir"."$ex |
locDIR=$DRESULTS"/"$dir"."$ex |
1461 |
mkdir $locDIR |
mkdir $locDIR |
1462 |
|
#- report to this experiment local summary file --- |
1463 |
|
echo "DATE='$DATE' ; tdir='$dir.$ex'" > $locDIR"/summary.txt" |
1464 |
|
#echo "MACH='$MACH'" >> $locDIR"/summary.txt" |
1465 |
|
#echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt" |
1466 |
CDIR=`pwd`"/$locDIR" |
CDIR=`pwd`"/$locDIR" |
1467 |
test ! -e "$dir/$pfxdir.$ex" && mkdir "$dir/$pfxdir.$ex" |
test ! -e "$dir/$pfxdir.$ex" && mkdir "$dir/$pfxdir.$ex" |
1468 |
run_clean $dir/$pfxdir.$ex |
run_clean $dir/$pfxdir.$ex |
1473 |
fres="$fres.$ex" |
fres="$fres.$ex" |
1474 |
echo 1>&2 |
echo 1>&2 |
1475 |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
|
touch $locDIR"/summary.txt" |
|
1476 |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
|
echo "tdir='$dir.$ex'" >> $locDIR"/summary.txt" |
|
|
if test "x$ADM" = xt ; then |
|
|
head -1 $dir/$builddir/taf_ad.log >> $locDIR"/summary.txt" |
|
|
grep -A3 'Seconds in section "ALL' $dir/$pfxdir.$ex/$OUTPUTFILE \ |
|
|
>> $locDIR"/summary.txt" |
|
|
fi |
|
1477 |
if test "x$POSTCLEAN" = x2 ; then |
if test "x$POSTCLEAN" = x2 ; then |
1478 |
run_clean $dir/$pfxdir.$ex |
run_clean $dir/$pfxdir.$ex |
1479 |
fi |
fi |