13 |
echo " (-help|-h) print usage" |
echo " (-help|-h) print usage" |
14 |
echo " (-mth) run multi-threaded (using eedata.mth)" |
echo " (-mth) run multi-threaded (using eedata.mth)" |
15 |
echo " (-mpi) compile and run using MPI" |
echo " (-mpi) compile and run using MPI" |
16 |
echo " (-ieee|-noieee) if possible, use IEEE compiler flags" |
echo " (-ieee/-noieee) if possible, use IEEE compiler flags" |
17 |
echo " (DEF=\"-ieee\")" |
echo " (DEF=\"-ieee\")" |
18 |
echo " (-gsl) compile with \"-gsl\" flag" |
echo " (-gsl) compile with \"-gsl\" flag" |
19 |
echo " (-ur4|-use_r4) if allowed, use real*4 type for '_RS' variable" |
echo " (-use_r4|-ur4) if allowed, use real*4 type for '_RS' variable" |
20 |
echo " (-of=|-optfile=)STRING list of optfiles to use" |
echo " (-optfile|-of) STRING list of optfiles to use" |
21 |
echo " (-a|-addr) STRING list of email recipients" |
echo " (-addr|-a) STRING list of email recipients" |
22 |
echo " (DEF=\"\" no email is sent)" |
echo " (DEF=\"\" no email is sent)" |
23 |
echo " (-mpd|-mpackdir) DIR location of the mpack utility" |
echo " (-mpackdir|-mpd) DIR location of the mpack utility" |
24 |
echo " (DEF=\"../tools/mpack-1.6\")" |
echo " (DEF=\"../tools/mpack-1.6\")" |
25 |
echo " (-t|-tdir) STRING list of group and/or exp. dirs to test" |
echo " (-tdir|-t) STRING list of group and/or exp. dirs to test" |
26 |
echo " (recognized groups: basic, tutorials)" |
echo " (recognized groups: basic, tutorials)" |
27 |
echo " (DEF=\"\" which test all)" |
echo " (DEF=\"\" which test all)" |
28 |
echo " (-skd|-skipdir) STRING list of exp. dirs to skip" |
echo " (-skipdir|-skd) STRING list of exp. dirs to skip" |
29 |
echo " (DEF=\"\" which test all)" |
echo " (DEF=\"\" which test all)" |
30 |
echo " (-b|-bash) STRING preferred location of a \"bash\" or" |
echo " (-bash|-b) STRING preferred location of a \"bash\" or" |
31 |
echo " Bourne-compatible \"sh\" shell" |
echo " Bourne-compatible \"sh\" shell" |
32 |
echo " (DEF=\"\" for \"bash\")" |
echo " (DEF=\"\" for \"bash\")" |
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) STRING command to run" |
echo " (-command|-c) STRING command to run" |
36 |
echo " (DEF=\"make output.txt\")" |
echo " (-make|-m) STRING command to use for \"make\"" |
|
echo " (-m|-make) STRING command to use for \"make\"" |
|
37 |
echo " (DEF=\"make\")" |
echo " (DEF=\"make\")" |
38 |
echo " (-odir) STRING used to build output directory name" |
echo " (-odir) STRING used to build output directory name" |
39 |
echo " (DEF=\"hostname\")" |
echo " (DEF=\"hostname\")" |
40 |
echo " (-ptr|-ptracers) STRING specify which ptracers to test" |
echo " (-ptracers|-ptr) STRING specify which ptracers to test" |
41 |
echo " (DEF=\"1 2 3 4 5\")" |
echo " (DEF=\"1 2 3 4 5\")" |
42 |
echo " (-match) NUMBER Matching Criteria (number of digits)" |
echo " (-match) NUMBER Matching Criteria (number of digits)" |
43 |
echo " (DEF=\"12\")" |
echo " (DEF=\"12\")" |
44 |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
45 |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
46 |
echo " (-norun|-nr) skip the \"runmodel\" stage (stop after make)" |
echo " (-norun|-nr) skip the \"runmodel\" stage (stop after make)" |
47 |
|
echo " (-runonly|-ro) *ONLY* run stage (=\"-quick\" without make)" |
48 |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
49 |
echo " (-nogenmake|-ng) skip the genmake stage" |
echo " (-nogenmake|-ng) skip the genmake stage" |
50 |
echo " (-noclean|-nc) skip the \"make clean\" stage" |
echo " (-noclean|-nc) skip the \"make clean\" stage" |
449 |
{ |
{ |
450 |
# makemodel directory |
# makemodel directory |
451 |
( |
( |
452 |
|
if test "x$NOMAKE" = xt ; then |
453 |
|
cd $1; |
454 |
|
if test -x $EXECUTABLE ; then |
455 |
|
echo "make skipped!" |
456 |
|
else |
457 |
|
echo "no executable!" |
458 |
|
return 2 |
459 |
|
fi |
460 |
|
else |
461 |
cd $1; |
cd $1; |
462 |
if test -r Makefile ; then |
if test -r Makefile ; then |
463 |
printf 'make ... ' 1>&2 |
printf 'make ... ' 1>&2 |
483 |
echo successful 1>&2 |
echo successful 1>&2 |
484 |
fi |
fi |
485 |
fi |
fi |
486 |
|
fi |
487 |
) |
) |
488 |
} |
} |
489 |
|
|
811 |
CLEANUP=f |
CLEANUP=f |
812 |
NORUN=f |
NORUN=f |
813 |
QUICK=f |
QUICK=f |
814 |
|
NOMAKE=f |
815 |
NOGENMAKE=f |
NOGENMAKE=f |
816 |
NOCLEAN=f |
NOCLEAN=f |
817 |
NODEPEND=f |
NODEPEND=f |
873 |
|
|
874 |
-addr | --addr | -a | --a) |
-addr | --addr | -a | --a) |
875 |
ac_prev=ADDRESSES ;; |
ac_prev=ADDRESSES ;; |
876 |
-addr=* | --addr=*) |
-addr=* | --addr=* | -a=* | --a=*) |
877 |
ADDRESSES=$ac_optarg ;; |
ADDRESSES=$ac_optarg ;; |
878 |
-mpackdir | --mpackdir | -mpd | --mpd) |
-mpackdir | --mpackdir | -mpd | --mpd) |
879 |
ac_prev=MPACKDIR ;; |
ac_prev=MPACKDIR ;; |
882 |
|
|
883 |
-tdir | --tdir | -t | --t) |
-tdir | --tdir | -t | --t) |
884 |
ac_prev=TESTDIRS ;; |
ac_prev=TESTDIRS ;; |
885 |
-tdir=* | --tdir=*) |
-tdir=* | --tdir=* | -t=* | --t=*) |
886 |
TESTDIRS=$ac_optarg ;; |
TESTDIRS=$ac_optarg ;; |
887 |
|
|
888 |
-skipdir | --skipdir | -skd | --skd) |
-skipdir | --skipdir | -skd | --skd) |
889 |
ac_prev=SKIPDIRS ;; |
ac_prev=SKIPDIRS ;; |
890 |
-skipdir=* | --skipdir=*) |
-skipdir=* | --skipdir=* | -skd=* | --skd=*) |
891 |
SKIPDIRS=$ac_optarg ;; |
SKIPDIRS=$ac_optarg ;; |
892 |
|
|
893 |
-bash | --bash | -b | --b) |
-bash | --bash | -b | --b) |
894 |
ac_prev=BASH ;; |
ac_prev=BASH ;; |
895 |
-bash=* | --bash=*) |
-bash=* | --bash=* | -b=* | --b=*) |
896 |
BASH=$ac_optarg ;; |
BASH=$ac_optarg ;; |
897 |
|
|
898 |
-command | --command | -c | --c) |
-command | --command | -c | --c) |
899 |
ac_prev=COMMAND ;; |
ac_prev=COMMAND ;; |
900 |
-command=* | --command=*) |
-command=* | --command=* | -c=* | --c=*) |
901 |
COMMAND=$ac_optarg ;; |
COMMAND=$ac_optarg ;; |
902 |
|
|
903 |
-make | --make | -m | --m) |
-make | --make | -m | --m) |
904 |
ac_prev=MAKE ;; |
ac_prev=MAKE ;; |
905 |
-make=* | --make=*) |
-make=* | --make=* | -m=* | --m=*) |
906 |
MAKE=$ac_optarg ;; |
MAKE=$ac_optarg ;; |
907 |
|
|
908 |
-odir | --odir) |
-odir | --odir) |
918 |
-match | --match ) ac_prev=MATCH_CRIT ;; |
-match | --match ) ac_prev=MATCH_CRIT ;; |
919 |
-match=* | --match=* ) MATCH_CRIT=$ac_optarg ;; |
-match=* | --match=* ) MATCH_CRIT=$ac_optarg ;; |
920 |
|
|
921 |
-j) ac_prev=JOBS ;; |
-j | --j) ac_prev=JOBS ;; |
922 |
-j=*) JOBS=$ac_optarg ;; |
-j=* | --j=*) JOBS=$ac_optarg ;; |
923 |
|
|
924 |
-clean | --clean) |
-clean | --clean) |
925 |
CLEANUP=t ; DELDIR=t ;; |
CLEANUP=t ; DELDIR=t ;; |
926 |
|
|
927 |
-norun | --norun | -nr | --nr) |
-norun | --norun | -nr | --nr) |
928 |
NORUN=t ;; |
NORUN=t ;; |
929 |
|
-runonly | --runonly | -ro | --ro) |
930 |
|
QUICK=t ; NOMAKE=t ;; |
931 |
-quick | --quick | -q | --q) |
-quick | --quick | -q | --q) |
932 |
QUICK=t ;; |
QUICK=t ;; |
933 |
-nogenmake | --nogenmake | -ng | --ng) |
-nogenmake | --nogenmake | -ng | --ng) |
958 |
|
|
959 |
-deldir | -dd) DELDIR=t ;; |
-deldir | -dd) DELDIR=t ;; |
960 |
|
|
961 |
-ur4|-use_r4) USE_R4=t ;; |
-use_r4|-ur4) USE_R4=t ;; |
962 |
|
|
963 |
-ts) TS=t;; |
-ts) TS=t;; |
964 |
-papis) PAPIS=t;; |
-papis) PAPIS=t;; |
1289 |
results=$EMPTY_RESULTS |
results=$EMPTY_RESULTS |
1290 |
|
|
1291 |
# Create an output dir for each OPTFILE/tdir combination |
# Create an output dir for each OPTFILE/tdir combination |
1292 |
rel_CDIR=$DRESULTS"/"$dir |
CDIR=$DRESULTS"/"$dir |
1293 |
mkdir $rel_CDIR |
mkdir $CDIR |
|
CDIR=`pwd`"/$rel_CDIR" |
|
1294 |
|
|
1295 |
if test "x$NORUN" = xt ; then |
if test "x$NORUN" = xt ; then |
1296 |
run=N |
run=N |
1335 |
# reference output file |
# reference output file |
1336 |
refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"` |
refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"` |
1337 |
# Create an output dir for each OPTFILE/tdir.ex combination |
# Create an output dir for each OPTFILE/tdir.ex combination |
1338 |
rel_CDIR=$DRESULTS"/"$dir"."$ex |
CDIR=$DRESULTS"/"$dir"."$ex |
1339 |
mkdir $rel_CDIR |
mkdir $CDIR |
|
CDIR=`pwd`"/$rel_CDIR" |
|
1340 |
test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex" |
test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex" |
1341 |
run_clean $dir/tr_run.$ex |
run_clean $dir/tr_run.$ex |
1342 |
linkdata $dir/tr_run.$ex $inputdir.$ex $inputdir input |
linkdata $dir/tr_run.$ex $inputdir.$ex $inputdir input |
1362 |
fi |
fi |
1363 |
done |
done |
1364 |
|
|
1365 |
|
if test -f $DRESULTS"/"genmake_state ; then : ; else |
1366 |
|
if test -f $dir/$builddir/Makefile ; then |
1367 |
|
mkOpt=`grep '^# OPTFILE=' $dir/$builddir/Makefile 2>/dev/null | head -1 | sed 's/^# //'` |
1368 |
|
echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state |
1369 |
|
sed -n '/^# executed by:/,+1 p' $dir/$builddir/Makefile >> $DRESULTS/genmake_state |
1370 |
|
echo $mkOpt >> $DRESULTS/genmake_state |
1371 |
|
fi |
1372 |
|
fi |
1373 |
#postclean $dir/$builddir |
#postclean $dir/$builddir |
1374 |
if test "x$POSTCLEAN" = xt ; then |
if test "x$POSTCLEAN" = xt ; then |
1375 |
makeclean $dir/$builddir \ |
makeclean $dir/$builddir \ |