/[MITgcm]/MITgcm/verification/testreport
ViewVC logotype

Diff of /MITgcm/verification/testreport

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

revision 1.74 by edhill, Fri Jan 13 16:33:33 2006 UTC revision 1.79 by heimbach, Wed Jun 7 01:20:26 2006 UTC
# Line 181  dashnum() Line 181  dashnum()
181    
182  testoutput_ad()  testoutput_ad()
183  {  {
184      grep $3 $1/results_ad/output.txt_adm | awk '{print NR " " $5}' > t05.txt      grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $5}' > t05.txt
185      grep $3 $1/$2/output.txt_adm | awk '{print NR " " $5}' > t15.txt      grep $3 $1/$2/output_adm.txt | awk '{print NR " " $5}' > t15.txt
186      grep $3 $1/results_ad/output.txt_adm | awk '{print NR " " $6}' > t06.txt      grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $6}' > t06.txt
187      grep $3 $1/$2/output.txt_adm | awk '{print NR " " $6}' > t16.txt      grep $3 $1/$2/output_adm.txt | awk '{print NR " " $6}' > t16.txt
188      join t05.txt t15.txt > t5.txt      join t05.txt t15.txt > t5.txt
189      join t06.txt t16.txt > t6.txt      join t06.txt t16.txt > t6.txt
190      echo "-1" >> t5.txt      echo "-1" >> t5.txt
# Line 304  genmakemodel() Line 304  genmakemodel()
304                  command="$command --mods=../code"                  command="$command --mods=../code"
305              else              else
306                  command="$command --mods=../code_ad"                  command="$command --mods=../code_ad"
                 command="$command -adof=../../../tools/adjoint_options/adjoint_staf"  
307              fi              fi
308              if test "x$OPTFILE" != xNONE ; then              if test "x$OPTFILE" != xNONE ; then
309                  command="$command --optfile=$OPTFILE"                  command="$command --optfile=$OPTFILE"
# Line 515  runmodel() Line 514  runmodel()
514      #  (where "$COMMAND" is relative to "directory")      #  (where "$COMMAND" is relative to "directory")
515      (      (
516          cd $1          cd $1
517          printf 'runmodel ... ' 1>&2          printf 'runmodel in %s ...' $1 1>&2
518          # make output.txt          # make output.txt
519          echo          echo
520          rm -f run.log          rm -f run.log
521            if test $OUTPUTFILE -ot $EXECUTABLE ; then
522               ( eval $COMMAND ) > run.log 2>&1
523               RETVAL=$?
524            else
525               echo " $OUTPUTFILE is up to date " > run.log 2>&1
526               RETVAL=0
527            fi
528          # echo "COMMAND='$COMMAND'"          # echo "COMMAND='$COMMAND'"
529          # echo "pwd='"`pwd`"'"          # echo "pwd='"`pwd`"'"
         ( eval $COMMAND ) > run.log 2>&1  
         RETVAL=$?  
530          if test "x$RETVAL" = x0 ; then          if test "x$RETVAL" = x0 ; then
531              tail run.log              tail run.log
532              echo successful 1>&2              echo successful 1>&2
# Line 530  runmodel() Line 534  runmodel()
534              # if test "x$ADM" = x ; then              # if test "x$ADM" = x ; then
535              #   cp output.txt $CDIR"/output.txt"              #   cp output.txt $CDIR"/output.txt"
536              # else              # else
537              #   cp output.txt_adm $CDIR"/output.txt_adm"              #   cp output_adm.txt $CDIR"/output_adm.txt"
538              # fi              # fi
539              if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi              if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
540              return 0              return 0
# Line 806  if test "x$OPTFILE" = xNONE -a "x$MITGCM Line 810  if test "x$OPTFILE" = xNONE -a "x$MITGCM
810      OPTFILE=$MITGCM_OF      OPTFILE=$MITGCM_OF
811  fi  fi
812    
813    if test "x$ADM" = xt ; then
814        EXECUTABLE="mitgcmuv_ad"
815        OUTPUTFILE="output_adm.txt"
816    else
817        EXECUTABLE="mitgcmuv"
818        OUTPUTFILE="output.txt"
819    fi
820    
821  if test "x$ADM" = xt -a "x$COMMAND" = x ; then  if test "x$ADM" = xt -a "x$COMMAND" = x ; then
822      COMMAND="./mitgcmuv_ad > output.txt_adm 2>&1"      COMMAND="./$EXECUTABLE > $OUTPUTFILE"
823  fi  fi
824    
825  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
826      COMMAND="$MAKE output.txt"      COMMAND="./$EXECUTABLE > $OUTPUTFILE"
827  fi  fi
828    
829  echo "OK"  #echo "OK"
830    echo "OK (COMMAND= $COMMAND )"
831    
832  #  create the FORTRAN comparison code  #  create the FORTRAN comparison code
833  createcodelet  createcodelet
# Line 936  for dir in $TESTDIRS ; do Line 949  for dir in $TESTDIRS ; do
949      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
950          fout=$dir"/results/output.txt"          fout=$dir"/results/output.txt"
951      else      else
952          fout=$dir"/results_ad/output.txt_adm"          fout=$dir"/results_ad/output_adm.txt"
953      fi      fi
954      if test ! -r $fout ; then      if test ! -r $fout ; then
955          echo "can't read \"$fout\" -- skipping $dir"          echo "can't read \"$fout\" -- skipping $dir"
# Line 1048  for dir in $TESTDIRS ; do Line 1061  for dir in $TESTDIRS ; do
1061              done              done
1062              ldir=build              ldir=build
1063              (              (
1064                  cd "$dir/$ldir" > /dev/null 2>&1                  cd $dir/tr_run.$ex
1065                  ls -1 2>/dev/null                  test ! -e mitgcmuv  &&  ln -s "../"$ldir"/"mitgcmuv .
             ) > tr_exrun_tmp  
             echo "Makefile" > tr_exrun_links  
             echo "mitgcmuv" >> tr_exrun_links  
             cat tr_exrun_tmp | grep '\.[fFhco]$' >> tr_exrun_links  
             (  
                 cd "$dir/tr_run.$ex"  
                     cat ../../tr_exrun_links | while read i ; do  
                         if test ! "x$i" = x ; then  
                             test ! -r $i  &&  ln -s "../"$ldir"/"$i $i  
                         fi  
                     done  
1066              )              )
             test -e tr_exrun_tmp  &&  rm -f tr_exrun_tmp  
             test -e tr_exrun_links  &&  rm -f tr_exrun_links  
1067              runmodel $dir/tr_run.$ex && run=Y \              runmodel $dir/tr_run.$ex && run=Y \
1068                  && results=`testoutput $dir tr_run.$ex "."$ex`                  && results=`testoutput $dir tr_run.$ex "."$ex`
1069              fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`              fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`
# Line 1087  for dir in $TESTDIRS ; do Line 1087  for dir in $TESTDIRS ; do
1087          echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"          echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
1088          echo "DATE='$DATE'" >> $CDIR"/summary.txt"          echo "DATE='$DATE'" >> $CDIR"/summary.txt"
1089          echo "tdir='$dir'" >> $CDIR"/summary.txt"          echo "tdir='$dir'" >> $CDIR"/summary.txt"
1090            grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \
1091                               >> $CDIR"/summary.txt"
1092      fi      fi
1093    
1094      postclean $dir/$builddir      postclean $dir/$builddir

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.79

  ViewVC Help
Powered by ViewVC 1.1.22