/[MITgcm]/MITgcm/tools/do_tst_2+2
ViewVC logotype

Diff of /MITgcm/tools/do_tst_2+2

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by jmc, Fri Feb 27 22:58:57 2009 UTC revision 1.7 by jmc, Thu Dec 16 20:15:21 2010 UTC
# Line 27  CLEAN=0 Line 27  CLEAN=0
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
33  OUTDIR=`hostname`  OUTDIR=`hostname | sed 's/\..*$//'`
34  SAVELOG=0  SAVELOG=0
35  ADDRESS=  ADDRESS=
36  MPACK="../tools/mpack-1.6/mpack"  MPACK="../tools/mpack-1.6/mpack"
# Line 151  do Line 152  do
152        if test "x$OPTFILE" = x -a -f $xx/build/Makefile ; then        if test "x$OPTFILE" = x -a -f $xx/build/Makefile ; then
153          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/^# //'`
154          echo "from '$xx/build/Makefile', extract:" > $DRESULTS/genmake_state          echo "from '$xx/build/Makefile', extract:" > $DRESULTS/genmake_state
155          echo $comm >> $DRESULTS/genmake_state          sed -n '/^# executed by:/,+1 p' $xx/build/Makefile >> $DRESULTS/genmake_state
156            echo " $comm" >> $DRESULTS/genmake_state
157          eval $comm          eval $comm
158            gmkLog=$xx/build/genmake.log
159            grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1
160            out=$?
161            if test "x$out" = x0 ; then
162                echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state
163                sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \
164                           | grep -v '^... compiler version ' > tr_vers.tmp_log
165                sed -n '1,/^$/p' tr_vers.tmp_log | sed '/^$/d' | sed 's/^./ &/' \
166                          >> $DRESULTS/genmake_state
167                rm -f tr_vers.tmp_log
168            fi
169        fi        fi
170        if test $yy = 'run' ; then nam=$xx        if test $yy = 'run' ; then nam=$xx
171        else nam=$xx`echo $yy | sed 's/tr_run//'` ; fi        else nam=$xx`echo $yy | sed 's/tr_run//'` ; fi
# Line 160  do Line 173  do
173        cd $xx/$yy        cd $xx/$yy
174        pwd > outp.tst_2+2.log        pwd > outp.tst_2+2.log
175        if test "x$COMMAND" = x ; then        if test "x$COMMAND" = x ; then
176          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
177          $SCRIPT All >> outp.tst_2+2.log 2>&1          $SCRIPT $scrArg >> outp.tst_2+2.log 2>&1
178          out=$?          out=$?
179        else        else
180          echo "$SCRIPT All -command \"$COMMAND\"" >> outp.tst_2+2.log          echo "$SCRIPT $scrArg -command \"$COMMAND\"" >> outp.tst_2+2.log
181          echo ' ' >> outp.tst_2+2.log          echo ' ' >> outp.tst_2+2.log
182          $SCRIPT All -command "$COMMAND" >> outp.tst_2+2.log 2>&1          $SCRIPT $scrArg -command "$COMMAND" >> outp.tst_2+2.log 2>&1
183          out=$?          out=$?
184        fi        fi
185        case $out in        case $out in

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22