11 |
echo |
echo |
12 |
echo "where possible OPTIONS are:" |
echo "where possible OPTIONS are:" |
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\")" |
320 |
elif test "x$OADM" = xt ; then |
elif test "x$OADM" = xt ; then |
321 |
command="$command -adof ../../../tools/adjoint_options/adjoint_oad -mods '../code_oad ../../OpenAD/code_oad_all'" |
command="$command -adof ../../../tools/adjoint_options/adjoint_oad -mods '../code_oad ../../OpenAD/code_oad_all'" |
322 |
else |
else |
323 |
command="$command --mods=../code" |
command="$command -mods=../code" |
324 |
fi |
fi |
325 |
if test "x$OPTFILE" != xNONE ; then |
if test "x$OPTFILE" != xNONE ; then |
326 |
command="$command --optfile=$OPTFILE" |
command="$command -optfile=$OPTFILE" |
327 |
fi |
fi |
328 |
if test "x$IEEE" != x ; then |
if test "x$IEEE" != x ; then |
329 |
command="$command -ieee" |
command="$command -ieee" |
334 |
if test "x$MPI" = xt ; then |
if test "x$MPI" = xt ; then |
335 |
command="$command -mpi" |
command="$command -mpi" |
336 |
fi |
fi |
337 |
|
if test "x$MULTI_THREAD" = xt ; then |
338 |
|
#- run multi-threaded using OpenMP: |
339 |
|
command="$command -omp" |
340 |
|
fi |
341 |
if test "x$TS" = xt ; then |
if test "x$TS" = xt ; then |
342 |
command="$command -ts" |
command="$command -ts" |
343 |
fi |
fi |
722 |
} |
} |
723 |
|
|
724 |
|
|
725 |
|
check_eedata() |
726 |
|
{ |
727 |
|
# check_eedata size.h eedata |
728 |
|
if [ $# -eq 2 ] ; then |
729 |
|
if test -f $1 -a -f $2 ; then |
730 |
|
sx=`grep "^ & *nSx *=" $1 | sed "s/^ & *nSx *=//" | sed 's/, *$//'` |
731 |
|
nx=`grep "^ *nTx *=" $2 | tail -1 | sed 's/^ *nTx *= *//' | sed "s/, *$//"` |
732 |
|
if test "x$nx" = x ; then |
733 |
|
rx=10 |
734 |
|
else |
735 |
|
rx=`expr $sx % $nx` |
736 |
|
fi |
737 |
|
sy=`grep "^ & *nSy *=" $1 | sed "s/^ & *nSy *=//" | sed 's/, *$//'` |
738 |
|
ny=`grep "^ *nTy *=" $2 | tail -1 | sed 's/^ *nTy *= *//' | sed "s/, *$//"` |
739 |
|
if test "x$ny" = x ; then |
740 |
|
ry=20 |
741 |
|
else |
742 |
|
ry=`expr $sy % $ny` |
743 |
|
fi |
744 |
|
echo `expr $rx + $ry` |
745 |
|
else |
746 |
|
echo '-1' |
747 |
|
fi |
748 |
|
else |
749 |
|
echo '-2' |
750 |
|
fi |
751 |
|
|
752 |
|
} |
753 |
|
|
754 |
############################################################################### |
############################################################################### |
755 |
|
|
756 |
|
|
1047 |
BASE="tr_"$MACH"_"$DATE"_" |
BASE="tr_"$MACH"_"$DATE"_" |
1048 |
if test "x$OUTDIR" != x ; then |
if test "x$OUTDIR" != x ; then |
1049 |
BASE="tr_"$OUTDIR"_"$DATE"_" |
BASE="tr_"$OUTDIR"_"$DATE"_" |
1050 |
|
else |
1051 |
|
short_name=`hostname | sed 's/\..*$//'` |
1052 |
|
BASE="tr_"$short_name"_"$DATE"_" |
1053 |
fi |
fi |
1054 |
DNUM=0 |
DNUM=0 |
1055 |
DRESULTS="$BASE$DNUM" |
DRESULTS="$BASE$DNUM" |
1183 |
echo "can't find \"$dir/input/eedata.mth\" -- skipping $dir" |
echo "can't find \"$dir/input/eedata.mth\" -- skipping $dir" |
1184 |
continue |
continue |
1185 |
fi |
fi |
1186 |
|
if test "x$MPI" = "xt" -a "x$MULTI_THREAD" = "xt" ; then |
1187 |
|
retv=`check_eedata $CODE_DIR"/SIZE.h_mpi" $dir"/input/eedata.mth"` |
1188 |
|
if test $retv != 0 ; then |
1189 |
|
echo "input/eedata.mth tiling misfit -- skipping $dir" |
1190 |
|
continue |
1191 |
|
fi |
1192 |
|
fi |
1193 |
|
|
1194 |
# Check whether there are "extra runs" for this testdir |
# Check whether there are "extra runs" for this testdir |
1195 |
extra_runs= |
extra_runs= |
1200 |
refExOut=`echo $ref_outp | sed "s/\./.${name}./"` |
refExOut=`echo $ref_outp | sed "s/\./.${name}./"` |
1201 |
outf="$dir/results/$refExOut" |
outf="$dir/results/$refExOut" |
1202 |
if test -f $outf -a -r $outf ; then |
if test -f $outf -a -r $outf ; then |
1203 |
if test "x$MULTI_THREAD" = "xt" ; then |
if test "x$MULTI_THREAD" = "xt" ; then |
1204 |
if test -r $dir"/"$exd"/eedata.mth" ; then |
if test -r $dir"/"$exd"/eedata.mth" ; then |
1205 |
|
if test "x$MPI" = "xt" ; then |
1206 |
|
retv=`check_eedata $CODE_DIR"/SIZE.h_mpi" $dir"/"$exd"/eedata.mth"` |
1207 |
|
if test $retv = 0 ; then |
1208 |
extra_runs="$extra_runs $name" |
extra_runs="$extra_runs $name" |
1209 |
#else echo $dir"/"$exd"/eedata.mth: not found" |
else |
1210 |
|
echo $exd"/eedata.mth tiling misfit -- skipping $dir" |
1211 |
fi |
fi |
1212 |
else |
else |
1213 |
extra_runs="$extra_runs $name" |
extra_runs="$extra_runs $name" |
1214 |
|
fi |
1215 |
|
#else echo $dir"/"$exd"/eedata.mth: not found" |
1216 |
fi |
fi |
1217 |
|
else |
1218 |
|
extra_runs="$extra_runs $name" |
1219 |
|
fi |
1220 |
fi |
fi |
1221 |
done |
done |
1222 |
|
|