27 |
TESTDIRS= |
TESTDIRS= |
28 |
SKIPDIRS= |
SKIPDIRS= |
29 |
SCRIPT='../tools/tst_2+2' |
SCRIPT='../tools/tst_2+2' |
30 |
|
scrArg='All' |
31 |
COMMAND= |
COMMAND= |
32 |
mpi=0 |
mpi=0 |
|
#OUTDIR=`hostname` |
|
33 |
OUTDIR=`hostname | sed 's/\..*$//'` |
OUTDIR=`hostname | sed 's/\..*$//'` |
34 |
SAVELOG=0 |
SAVELOG=0 |
35 |
ADDRESS= |
ADDRESS= |
145 |
for xx in $LIST |
for xx in $LIST |
146 |
do |
do |
147 |
echo ============================================================================== |
echo ============================================================================== |
148 |
|
if [ $mpi -ge 1 ] ; then |
149 |
|
NP_MPI=2 |
150 |
|
mpi_size=$xx/build/SIZE.h.mpi |
151 |
|
if test -f $mpi_size ; then |
152 |
|
px=`grep '^ & *nPx *=' $mpi_size | sed 's/^ & *nPx *= *//' | sed 's/, *$//'` |
153 |
|
py=`grep '^ & *nPy *=' $mpi_size | sed 's/^ & *nPy *= *//' | sed 's/, *$//'` |
154 |
|
pp=`expr $px \* $py` > /dev/null 2>&1 ; out=$? |
155 |
|
if test "x$out" = x0 ; then NP_MPI=$pp ; fi |
156 |
|
fi |
157 |
|
rCommand=`echo $COMMAND | sed "s/ TR_NPROC / $NP_MPI /"` |
158 |
|
else |
159 |
|
rCommand=$COMMAND |
160 |
|
fi |
161 |
listD='run '`(cd $xx/results ; ls output.*.txt 2> /dev/null | sed 's/^output\./tr_run./g' | sed 's/\.txt$//g' )` |
listD='run '`(cd $xx/results ; ls output.*.txt 2> /dev/null | sed 's/^output\./tr_run./g' | sed 's/\.txt$//g' )` |
162 |
for yy in $listD |
for yy in $listD |
163 |
do |
do |
165 |
if test "x$OPTFILE" = x -a -f $xx/build/Makefile ; then |
if test "x$OPTFILE" = x -a -f $xx/build/Makefile ; then |
166 |
comm=`grep '^# OPTFILE=' $xx/build/Makefile 2>/dev/null | head -1 | sed 's/^# //'` |
comm=`grep '^# OPTFILE=' $xx/build/Makefile 2>/dev/null | head -1 | sed 's/^# //'` |
167 |
echo "from '$xx/build/Makefile', extract:" > $DRESULTS/genmake_state |
echo "from '$xx/build/Makefile', extract:" > $DRESULTS/genmake_state |
168 |
echo $comm >> $DRESULTS/genmake_state |
sed -n '/^# executed by:/,+1 p' $xx/build/Makefile >> $DRESULTS/genmake_state |
169 |
|
echo " $comm" >> $DRESULTS/genmake_state |
170 |
eval $comm |
eval $comm |
171 |
|
gmkLog=$xx/build/genmake.log |
172 |
|
grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1 |
173 |
|
out=$? |
174 |
|
if test "x$out" = x0 ; then |
175 |
|
echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state |
176 |
|
sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \ |
177 |
|
| grep -v '^... compiler version ' > tr_vers.tmp_log |
178 |
|
sed -n '1,/^$/p' tr_vers.tmp_log | sed '/^$/d' | sed 's/^./ &/' \ |
179 |
|
>> $DRESULTS/genmake_state |
180 |
|
rm -f tr_vers.tmp_log |
181 |
|
fi |
182 |
fi |
fi |
183 |
if test $yy = 'run' ; then nam=$xx |
if test $yy = 'run' ; then nam=$xx |
184 |
else nam=$xx`echo $yy | sed 's/tr_run//'` ; fi |
else nam=$xx`echo $yy | sed 's/tr_run//'` ; fi |
186 |
cd $xx/$yy |
cd $xx/$yy |
187 |
pwd > outp.tst_2+2.log |
pwd > outp.tst_2+2.log |
188 |
if test "x$COMMAND" = x ; then |
if test "x$COMMAND" = x ; then |
189 |
echo $SCRIPT All >> outp.tst_2+2.log ; echo ' ' >> outp.tst_2+2.log |
echo $SCRIPT $scrArg >> outp.tst_2+2.log ; echo ' ' >> outp.tst_2+2.log |
190 |
$SCRIPT All >> outp.tst_2+2.log 2>&1 |
$SCRIPT $scrArg >> outp.tst_2+2.log 2>&1 |
191 |
out=$? |
out=$? |
192 |
else |
else |
193 |
echo "$SCRIPT All -command \"$COMMAND\"" >> outp.tst_2+2.log |
echo "$SCRIPT $scrArg -command \"$rCommand\"" >> outp.tst_2+2.log |
194 |
echo ' ' >> outp.tst_2+2.log |
echo ' ' >> outp.tst_2+2.log |
195 |
$SCRIPT All -command "$COMMAND" >> outp.tst_2+2.log 2>&1 |
$SCRIPT $scrArg -command "$rCommand" >> outp.tst_2+2.log 2>&1 |
196 |
out=$? |
out=$? |
197 |
fi |
fi |
198 |
case $out in |
case $out in |