33 |
echo " (-adm|-ad) perform an adjoint run" |
echo " (-adm|-ad) perform an adjoint run" |
34 |
echo " (-oad) perform an OpenAD adjoint run" |
echo " (-oad) perform an OpenAD adjoint run" |
35 |
echo " (-command|-c) STRING command to run" |
echo " (-command|-c) STRING command to run" |
36 |
|
echo " (-makedepend|-md) STRING command to use for \"makedepend\"" |
37 |
echo " (-make|-m) STRING command to use for \"make\"" |
echo " (-make|-m) STRING command to use for \"make\"" |
38 |
echo " (DEF=\"make\")" |
echo " (DEF=\"make\")" |
39 |
echo " (-odir) STRING used to build output directory name" |
echo " (-odir) STRING used to build output directory name" |
41 |
echo " (-ptracers|-ptr) STRING specify which ptracers to test" |
echo " (-ptracers|-ptr) STRING specify which ptracers to test" |
42 |
echo " (DEF=\"1 2 3 4 5\")" |
echo " (DEF=\"1 2 3 4 5\")" |
43 |
echo " (-match) NUMBER Matching Criteria (number of digits)" |
echo " (-match) NUMBER Matching Criteria (number of digits)" |
44 |
echo " (DEF=\"12\")" |
echo " (DEF=\"$MATCH_CRIT\")" |
45 |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
46 |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
47 |
echo " (-norun|-nr) skip the \"runmodel\" stage (stop after make)" |
echo " (-norun|-nr) skip the \"runmodel\" stage (stop after make)" |
232 |
listVar=" $sVar "`echo "$listVar " | sed "s/ $sVar / /g"` |
listVar=" $sVar "`echo "$listVar " | sed "s/ $sVar / /g"` |
233 |
fi |
fi |
234 |
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 |
235 |
echo "listVar='$listVar'" > $CDIR"/summary.txt" |
echo "listVar='$listVar'" > $locDIR"/summary.txt" |
236 |
allargs="" |
allargs="" |
237 |
for xx in $listVar |
for xx in $listVar |
238 |
do |
do |
318 |
( |
( |
319 |
cd $1; |
cd $1; |
320 |
command="$GENMAKE2 -ds -m $MAKE" |
command="$GENMAKE2 -ds -m $MAKE" |
321 |
|
if test "x$MKDEPEND" != x ; then |
322 |
|
command="$command -makedepend=$MKDEPEND" |
323 |
|
fi |
324 |
if test "x$ADM" = xt ; then |
if test "x$ADM" = xt ; then |
325 |
command="$command --mods=../code_ad" |
command="$command --mods=../code_ad" |
326 |
elif test "x$OADM" = xt ; then |
elif test "x$OADM" = xt ; then |
357 |
command="$command -pcls" |
command="$command -pcls" |
358 |
fi |
fi |
359 |
fi |
fi |
360 |
printf 'genmake ... ' 1>&2 |
printf 'genmake ... ' |
|
# $command > make.log 2>&1 |
|
361 |
eval $command > make.log 2>&1 |
eval $command > make.log 2>&1 |
362 |
RETVAL=$? |
RETVAL=$? |
363 |
# Reduce the size of the testing emails! |
# Reduce the size of the testing emails! |
364 |
head -100 Makefile > $CDIR/Makefile_head |
head -100 Makefile > $CDIR/Makefile_head |
365 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
366 |
tail make.log |
tail make.log |
367 |
echo "genmakemodel: genmake failed" 1>&2 |
echo "genmakemodel: genmake failed" |
368 |
cp genmake_* make.log $CDIR |
cp genmake_* make.log $CDIR |
369 |
return 1 |
return 1 |
370 |
else |
else |
371 |
echo "successful" 1>&2 |
echo "successful" |
372 |
fi |
fi |
373 |
) |
) |
374 |
fi |
fi |
384 |
cd $1; |
cd $1; |
385 |
#if test -e $OUTPUTFILE ; then rm -f $OUTPUTFILE ; fi |
#if test -e $OUTPUTFILE ; then rm -f $OUTPUTFILE ; fi |
386 |
if test -r Makefile ; then |
if test -r Makefile ; then |
387 |
printf 'clean build-dir: make Clean ... ' 2>&1 |
printf 'clean build-dir: make Clean ... ' |
388 |
$MAKE Clean >> make.log 2>&1 |
$MAKE Clean >> make.log 2>&1 |
389 |
RETVAL=$? |
RETVAL=$? |
390 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
391 |
tail make.log |
tail make.log |
392 |
echo "makeclean: \"make Clean\" failed" 1>&2 |
echo "makeclean: \"make Clean\" failed" |
393 |
cp make.log $CDIR"/make.log" |
cp make.log $CDIR"/make.log" |
394 |
return 1 |
return 1 |
395 |
fi |
fi |
396 |
echo successful 1>&2 |
echo successful |
397 |
else |
else |
398 |
echo '' |
echo '' |
399 |
fi |
fi |
410 |
else |
else |
411 |
( |
( |
412 |
cd $1; |
cd $1; |
413 |
printf 'clean run-dir ... ' 2>&1 |
printf 'clean run-dir ... ' |
414 |
# part of what is done after "make clean" when doing "make CLEAN" |
# part of what is done after "make clean" when doing "make CLEAN" |
415 |
find . -name "*.meta" -exec rm {} \; |
find . -name "*.meta" -exec rm {} \; |
416 |
find . -name "*.data" -exec rm {} \; |
find . -name "*.data" -exec rm {} \; |
419 |
rm -f $EXECUTABLE *.txt STD* *diagnostics.log datetime |
rm -f $EXECUTABLE *.txt STD* *diagnostics.log datetime |
420 |
rm -rf mnc_test_* |
rm -rf mnc_test_* |
421 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
422 |
echo successful 1>&2 |
echo successful |
423 |
exit 0 |
exit 0 |
424 |
) |
) |
425 |
fi |
fi |
433 |
else |
else |
434 |
( |
( |
435 |
cd $1; |
cd $1; |
436 |
printf 'make depend ... ' 1>&2 |
printf 'make depend ... ' |
437 |
$MAKE depend >> make.log 2>&1 |
$MAKE depend >> make.log 2>&1 |
438 |
RETVAL=$? |
RETVAL=$? |
439 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
440 |
tail make.log |
tail make.log |
441 |
echo "makedependmodel: make depend failed" 1>&2 |
echo "makedependmodel: make depend failed" |
442 |
cp make.log $CDIR"/make.log" |
cp make.log $CDIR"/make.log" |
443 |
return 1 |
return 1 |
444 |
else |
else |
445 |
echo successful 1>&2 |
echo successful |
446 |
fi |
fi |
447 |
) |
) |
448 |
fi |
fi |
463 |
else |
else |
464 |
cd $1; |
cd $1; |
465 |
if test -r Makefile ; then |
if test -r Makefile ; then |
466 |
printf 'make ... ' 1>&2 |
printf 'make ... ' |
467 |
if test "x$ADM" = xt ; then |
if test "x$ADM" = xt ; then |
468 |
$MAKE adall >> make.log 2>&1 |
$MAKE adall >> make.log 2>&1 |
469 |
elif test "x$OADM" = xt ; then |
elif test "x$OADM" = xt ; then |
478 |
RETVAL=$? |
RETVAL=$? |
479 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
480 |
tail make.log |
tail make.log |
481 |
echo failed 1>&2 |
echo failed |
482 |
cp make.log $CDIR"/make.log" |
cp make.log $CDIR"/make.log" |
483 |
rm -f $EXECUTABLE |
rm -f $EXECUTABLE |
484 |
return 1 |
return 1 |
485 |
else |
else |
486 |
echo successful 1>&2 |
echo successful |
487 |
fi |
fi |
488 |
fi |
fi |
489 |
fi |
fi |
546 |
if test -d $1 ; then |
if test -d $1 ; then |
547 |
( |
( |
548 |
cd $1 ; shift |
cd $1 ; shift |
549 |
|
echo 'linkdata from dirs:' $* |
550 |
inpMPI=`(cd ../$1 ; find . -name "*.mpi" -print | sed 's:^\./::')` |
inpMPI=`(cd ../$1 ; find . -name "*.mpi" -print | sed 's:^\./::')` |
551 |
for xx in $inpMPI ; do |
for xx in $inpMPI ; do |
552 |
if test -r "../"$1"/"$xx ; then |
if test -r "../"$1"/"$xx ; then |
557 |
if test -h $yy ; then rm -f $yy ; fi |
if test -h $yy ; then rm -f $yy ; fi |
558 |
if test ! -r $yy ; then |
if test ! -r $yy ; then |
559 |
ln -sf "../"$1"/"$xx $yy ; |
ln -sf "../"$1"/"$xx $yy ; |
560 |
printf "$xx " 1>&2 |
printf " $xx" 1>&2 |
561 |
fi |
fi |
562 |
else |
else |
563 |
# not mpi test: remove symbolic link |
# not mpi test: remove symbolic link |
572 |
if test -h eedata ; then rm -f eedata ; fi |
if test -h eedata ; then rm -f eedata ; fi |
573 |
if test ! -r eedata ; then |
if test ! -r eedata ; then |
574 |
ln -sf "../"$1"/eedata.mth" eedata ; |
ln -sf "../"$1"/eedata.mth" eedata ; |
575 |
printf 'eedata.mth ' 1>&2 |
printf ' eedata.mth' 1>&2 |
576 |
fi |
fi |
577 |
else |
else |
578 |
# not multi-threaded test: remove eedata symbolic link |
# not multi-threaded test: remove eedata symbolic link |
582 |
prevDir='NONE' |
prevDir='NONE' |
583 |
for ldir in $* ; do |
for ldir in $* ; do |
584 |
if test -d "../"$ldir -a $ldir != $prevDir ; then |
if test -d "../"$ldir -a $ldir != $prevDir ; then |
585 |
printf 'ldir='${ldir} 1>&2 |
printf " ldir=${ldir}:" 1>&2 |
586 |
files=`( cd "../"$ldir ; ls -1 | grep -v CVS )` |
files=`( cd "../"$ldir ; ls -1 | grep -v CVS )` |
587 |
for i in $files ; do |
for i in $files ; do |
588 |
if test ! -d "../"$ldir/$i ; then |
if test ! -d "../"$ldir/$i ; then |
592 |
fi |
fi |
593 |
fi |
fi |
594 |
done |
done |
595 |
|
printf ' ;' 1>&2 |
596 |
if test -x "../"$ldir"/"prepare_run ; then |
if test -x "../"$ldir"/"prepare_run ; then |
597 |
"../"$ldir"/"prepare_run |
"../"$ldir"/"prepare_run 1>&2 |
598 |
|
else |
599 |
|
echo '' 1>&2 |
600 |
fi |
fi |
|
printf ' ; ' 1>&2 |
|
601 |
fi |
fi |
602 |
prevDir=$ldir |
prevDir=$ldir |
603 |
done |
done |
613 |
# (where "$COMMAND" is relative to "directory") |
# (where "$COMMAND" is relative to "directory") |
614 |
( |
( |
615 |
cd $1 |
cd $1 |
616 |
printf 'runmodel in %s ...' $1 1>&2 |
printf 'runmodel in %s ... ' $1 |
|
# make output.txt |
|
|
echo |
|
617 |
if test -L $EXECUTABLE ; then |
if test -L $EXECUTABLE ; then |
618 |
if test -x "../"$builddir"/"$EXECUTABLE ; then |
if test -x "../"$builddir"/"$EXECUTABLE ; then |
619 |
diff -q $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1 |
diff -q $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1 |
654 |
fi |
fi |
655 |
rm -f run.log_tmp |
rm -f run.log_tmp |
656 |
if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then |
if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then |
657 |
tail $RUNLOG |
echo successful |
658 |
echo successful 1>&2 |
printf '=> output from running in %s :\n' $1 1>&2 |
659 |
|
tail $RUNLOG | sed 's/^.*/> &/g' 1>&2 |
660 |
# === Reduce the size of the testing emails! |
# === Reduce the size of the testing emails! |
661 |
#cp $OUTPUTFILE $CDIR"/"$OUTPUTFILE |
#cp $OUTPUTFILE $CDIR"/"$OUTPUTFILE |
662 |
if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi |
if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi |
663 |
return 0 |
return 0 |
664 |
elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then |
elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then |
665 |
#-- for some weird cases (run is finihed but with error code) |
#-- for some weird cases (run is finihed but with error code) |
666 |
tail $RUNLOG |
echo 'finished with error (run:' $RETVAL ' end:' $ENDVAL ')' |
667 |
echo finished with error '(run:' $RETVAL ' end:' $ENDVAL ')' 1>&2 |
printf '=> output from running in %s :\n' $1 1>&2 |
668 |
|
tail $RUNLOG | sed 's/^.*/> &/g' 1>&2 |
669 |
return 0 |
return 0 |
670 |
else |
else |
671 |
tail $RUNLOG |
echo 'failed (run:' $RETVAL ' end:' $ENDVAL ')' |
672 |
echo failed '(run:' $RETVAL ' end:' $ENDVAL ')' 1>&2 |
printf '=> output from running in %s :\n' $1 1>&2 |
673 |
|
tail $RUNLOG | sed 's/^.*/> &/g' 1>&2 |
674 |
cp $RUNLOG $CDIR"/"$RUNLOG |
cp $RUNLOG $CDIR"/"$RUNLOG |
675 |
if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi |
if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi |
676 |
return 1 |
return 1 |
833 |
HAVE_MPACK= |
HAVE_MPACK= |
834 |
MPACK= |
MPACK= |
835 |
COMMAND= |
COMMAND= |
836 |
|
MKDEPEND= |
837 |
if test "x$MAKE" = x ; then |
if test "x$MAKE" = x ; then |
838 |
MAKE=make |
MAKE=make |
839 |
fi |
fi |
908 |
-command=* | --command=* | -c=* | --c=*) |
-command=* | --command=* | -c=* | --c=*) |
909 |
COMMAND=$ac_optarg ;; |
COMMAND=$ac_optarg ;; |
910 |
|
|
911 |
|
-makedepend | --makedepend | -md | --md) |
912 |
|
ac_prev=MKDEPEND ;; |
913 |
|
-makedepend=* | --makedepend=* | -md=* | --md=*) |
914 |
|
MKDEPEND=$ac_optarg ;; |
915 |
|
|
916 |
-make | --make | -m | --m) |
-make | --make | -m | --m) |
917 |
ac_prev=MAKE ;; |
ac_prev=MAKE ;; |
918 |
-make=* | --make=* | -m=* | --m=*) |
-make=* | --make=* | -m=* | --m=*) |
1015 |
EXECUTABLE="mitgcmuv" |
EXECUTABLE="mitgcmuv" |
1016 |
fi |
fi |
1017 |
|
|
1018 |
|
xx=`echo $TESTDIRS | awk '{print $1}'` |
1019 |
if test "x$TESTDIRS" = x ; then |
if test "x$TESTDIRS" = x ; then |
1020 |
LIST=`scandirs results/$ref_outp` |
LIST=`scandirs results/$ref_outp` |
1021 |
|
elif test $xx = 'start_from' ; then |
1022 |
|
xx=`echo $TESTDIRS | awk '{print $2}'` |
1023 |
|
LIST=`scandirs results/$ref_outp | sed -n "/$xx/,$ p"` |
1024 |
else |
else |
1025 |
#- expand group of experiments: |
#- expand group of experiments: |
1026 |
LIST=" " |
LIST=" " |
1172 |
then line_0="default "$MATCH_CRIT ; |
then line_0="default "$MATCH_CRIT ; |
1173 |
else line_0="default "$MATCH_CRIT ; fi |
else line_0="default "$MATCH_CRIT ; fi |
1174 |
line_0="$line_0 ----T----- ----S----- ----U----- ----V-----" |
line_0="$line_0 ----T----- ----S----- ----U----- ----V-----" |
|
# line_0=" ----T----- ----S----- ----U----- ----V-----" |
|
1175 |
line_1="G D M c m s m s m s m s" |
line_1="G D M c m s m s m s m s" |
1176 |
line_2="E p a R g m m e . m m e . m m e . m m e ." |
line_2="E p a R g m m e . m m e . m m e . m m e ." |
1177 |
line_3="N n k u 2 i a a d i a a d i a a d i a a d" |
line_3="N n k u 2 i a a d i a a d i a a d i a a d" |
1204 |
|
|
1205 |
EOF |
EOF |
1206 |
fi |
fi |
1207 |
|
echo "-------------------------------------------------------------------------------" |
1208 |
|
|
1209 |
# ...and each test directory... |
# ...and each test directory... |
1210 |
for dir in $TESTDIRS ; do |
for dir in $TESTDIRS ; do |
1213 |
builddir="build" |
builddir="build" |
1214 |
if test ! -d $dir/$builddir ; then mkdir $dir/$builddir ; fi |
if test ! -d $dir/$builddir ; then mkdir $dir/$builddir ; fi |
1215 |
rundir="run" |
rundir="run" |
1216 |
|
pfxdir="tr_$rundir" |
1217 |
if test ! -d $dir/$rundir ; then |
if test ! -d $dir/$rundir ; then |
1218 |
rundir=$builddir |
rundir=$builddir |
1219 |
fi |
fi |
1229 |
echo -n ' --- dir:' $dir/$rundir ': ' |
echo -n ' --- dir:' $dir/$rundir ': ' |
1230 |
run_clean $dir/$rundir |
run_clean $dir/$rundir |
1231 |
fi |
fi |
1232 |
trdir=`( cd $dir ; find . -type d -name "tr_run.*" -print | sed 's/^.\///')` |
trdir=`( cd $dir ; find . -type d -name "$pfxdir.*" -print | sed 's/^.\///')` |
1233 |
ttd=`echo $trdir | wc -w` |
ttd=`echo $trdir | wc -w` |
1234 |
if test $ttd != 0 ; then |
if test $ttd != 0 ; then |
1235 |
echo ' --- rm dir:' $trdir |
echo ' --- rm dir:' $trdir |
1295 |
fi |
fi |
1296 |
done |
done |
1297 |
|
|
|
echo "-------------------------------------------------------------------------------" |
|
1298 |
echo |
echo |
1299 |
if test "x$extra_runs" = "x" ; then |
if test "x$extra_runs" = "x" ; then |
1300 |
echo "Experiment: $dir" |
echo "Experiment: $dir" |
1306 |
results=$EMPTY_RESULTS |
results=$EMPTY_RESULTS |
1307 |
|
|
1308 |
# Create an output dir for each OPTFILE/tdir combination |
# Create an output dir for each OPTFILE/tdir combination |
1309 |
CDIR=$DRESULTS"/"$dir |
locDIR=$DRESULTS"/"$dir |
1310 |
mkdir $CDIR |
mkdir $locDIR |
1311 |
|
CDIR=`pwd`"/$locDIR" |
1312 |
|
|
1313 |
if test "x$NORUN" = xt ; then |
if test "x$NORUN" = xt ; then |
1314 |
run=N |
run=N |
1315 |
genmakemodel $dir/$builddir && genmake=Y \ |
genmakemodel $dir/$builddir && genmake=Y \ |
1316 |
&& makeclean $dir/$builddir \ |
&& makeclean $dir/$builddir \ |
|
&& run_clean $dir/$rundir \ |
|
1317 |
&& symlink_mpifiles $dir $code_dir $builddir \ |
&& symlink_mpifiles $dir $code_dir $builddir \ |
1318 |
&& makedependmodel $dir/$builddir && makedepend=Y \ |
&& makedependmodel $dir/$builddir && makedepend=Y \ |
1319 |
&& makemodel $dir/$builddir && make=Y |
&& makemodel $dir/$builddir && make=Y |
1320 |
else |
else |
1321 |
genmakemodel $dir/$builddir && genmake=Y \ |
genmakemodel $dir/$builddir && genmake=Y \ |
1322 |
&& makeclean $dir/$builddir \ |
&& makeclean $dir/$builddir \ |
|
&& run_clean $dir/$rundir \ |
|
1323 |
&& symlink_mpifiles $dir $code_dir $builddir \ |
&& symlink_mpifiles $dir $code_dir $builddir \ |
1324 |
&& makedependmodel $dir/$builddir && makedepend=Y \ |
&& makedependmodel $dir/$builddir && makedepend=Y \ |
1325 |
&& makemodel $dir/$builddir && make=Y \ |
&& makemodel $dir/$builddir && make=Y \ |
1326 |
&& linkdata $dir/$rundir $inputdir input \ |
&& run_clean $dir/$rundir \ |
1327 |
|
&& linkdata $dir/$rundir $inputdir \ |
1328 |
&& runmodel $dir/$rundir && run=Y \ |
&& runmodel $dir/$rundir && run=Y \ |
1329 |
&& results=`testoutput_run $dir $rundir $ref_outp` |
&& results=`testoutput_run $dir $rundir $ref_outp` |
1330 |
fi |
fi |
|
|
|
1331 |
#echo "results='$results'" |
#echo "results='$results'" |
1332 |
echo |
|
1333 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
1334 |
echo |
echo 1>&2 |
1335 |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
1336 |
touch $CDIR"/summary.txt" |
touch $locDIR"/summary.txt" |
1337 |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $CDIR"/summary.txt" |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
1338 |
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
echo "MACH='$MACH'" >> $locDIR"/summary.txt" |
1339 |
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt" |
1340 |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
echo "DATE='$DATE'" >> $locDIR"/summary.txt" |
1341 |
echo "tdir='$dir'" >> $CDIR"/summary.txt" |
echo "tdir='$dir'" >> $locDIR"/summary.txt" |
1342 |
if test "x$ADM" = xt ; then |
if test "x$ADM" = xt ; then |
1343 |
head -1 $dir/$builddir/taf_ad.log >> $CDIR"/summary.txt" |
head -1 $dir/$builddir/taf_ad.log >> $locDIR"/summary.txt" |
1344 |
grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \ |
grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \ |
1345 |
>> $CDIR"/summary.txt" |
>> $locDIR"/summary.txt" |
1346 |
fi |
fi |
1347 |
|
|
1348 |
for ex in $extra_runs ; do |
for ex in $extra_runs ; do |
1351 |
# reference output file |
# reference output file |
1352 |
refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"` |
refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"` |
1353 |
# Create an output dir for each OPTFILE/tdir.ex combination |
# Create an output dir for each OPTFILE/tdir.ex combination |
1354 |
CDIR=$DRESULTS"/"$dir"."$ex |
locDIR=$DRESULTS"/"$dir"."$ex |
1355 |
mkdir $CDIR |
mkdir $locDIR |
1356 |
test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex" |
CDIR=`pwd`"/$locDIR" |
1357 |
run_clean $dir/tr_run.$ex |
test ! -e "$dir/$pfxdir.$ex" && mkdir "$dir/$pfxdir.$ex" |
1358 |
linkdata $dir/tr_run.$ex $inputdir.$ex $inputdir input |
run_clean $dir/$pfxdir.$ex |
1359 |
runmodel $dir/tr_run.$ex && run=Y \ |
linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir |
1360 |
&& results=`testoutput_run $dir tr_run.$ex $refExOut` |
runmodel $dir/$pfxdir.$ex && run=Y \ |
1361 |
|
&& results=`testoutput_run $dir $pfxdir.$ex $refExOut` |
1362 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
1363 |
fres="$fres.$ex" |
fres="$fres.$ex" |
1364 |
echo |
echo 1>&2 |
1365 |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
1366 |
touch $CDIR"/summary.txt" |
touch $locDIR"/summary.txt" |
1367 |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $CDIR"/summary.txt" |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
1368 |
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
echo "MACH='$MACH'" >> $locDIR"/summary.txt" |
1369 |
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt" |
1370 |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
echo "DATE='$DATE'" >> $locDIR"/summary.txt" |
1371 |
echo "tdir='$dir.$ex'" >> $CDIR"/summary.txt" |
echo "tdir='$dir.$ex'" >> $locDIR"/summary.txt" |
1372 |
if test "x$ADM" = xt ; then |
if test "x$ADM" = xt ; then |
1373 |
head -1 $dir/$builddir/taf_ad.log >> $CDIR"/summary.txt" |
head -1 $dir/$builddir/taf_ad.log >> $locDIR"/summary.txt" |
1374 |
grep -A3 'Seconds in section "ALL' $dir/tr_run.$ex/$OUTPUTFILE \ |
grep -A3 'Seconds in section "ALL' $dir/$pfxdir.$ex/$OUTPUTFILE \ |
1375 |
>> $CDIR"/summary.txt" |
>> $locDIR"/summary.txt" |
1376 |
fi |
fi |
1377 |
if test "x$POSTCLEAN" = xt ; then |
if test "x$POSTCLEAN" = xt ; then |
1378 |
run_clean $dir/tr_run.$ex |
run_clean $dir/$pfxdir.$ex |
1379 |
fi |
fi |
1380 |
done |
done |
1381 |
|
|
1382 |
if test -f $DRESULTS"/"genmake_state ; then : ; else |
if test -f $DRESULTS"/"genmake_state ; then : ; else |
1383 |
if test -f $dir/$builddir/Makefile ; then |
if test -f $dir/$builddir/Makefile ; then |
1384 |
mkOpt=`grep '^# OPTFILE=' $dir/$builddir/Makefile 2>/dev/null | head -1 | sed 's/^# //'` |
mkOpt=`grep '^# OPTFILE=' $dir/$builddir/Makefile 2>/dev/null | head -1 | sed 's/^# //'` |
1385 |
echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state |
echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state |