/[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.6 by jmc, Thu Mar 25 23:09:29 2010 UTC revision 1.8 by jmc, Sat Jan 15 19:16:32 2011 UTC
# Line 145  fi Line 145  fi
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/-np * XX /-np $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
# Line 153  do Line 166  do
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          sed -n '/^# executed by:/,+1 p' $xx/build/Makefile >> $DRESULTS/genmake_state          sed -n '/^# executed by:/,+1 p' $xx/build/Makefile >> $DRESULTS/genmake_state
169          echo $comm >> $DRESULTS/genmake_state          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
# Line 166  do Line 190  do
190          $SCRIPT $scrArg >> 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 $scrArg -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 $scrArg -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

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22