/[MITgcm]/MITgcm/verification/testscript
ViewVC logotype

Diff of /MITgcm/verification/testscript

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

revision 1.19.2.1 by adcroft, Tue Feb 26 16:04:50 2002 UTC revision 1.19.2.2 by dimitri, Thu Dec 5 08:06:18 2002 UTC
# Line 21  testoutput_for_prop() Line 21  testoutput_for_prop()
21   fi   fi
22   if [ -r $1/input/output.txt ]; then   if [ -r $1/input/output.txt ]; then
23    grep "$2" $1/input/output.txt | sed 's/.*=//' | nl > tmp1.txt    grep "$2" $1/input/output.txt | sed 's/.*=//' | nl > tmp1.txt
24      lncnt=`wc -l tmp1.txt | awk '{print $1}' `
25      if [ $lncnt -lt 3 ]; then
26       if [ $verbose -gt 0 ]; then
27        echo Not enough lines of output when searching for "$2" 1>&2
28       fi
29       return 99
30      fi
31   else   else
32    echo testoutput_for_prop: output.txt from model run was not readable 1>&2    echo testoutput_for_prop: output.txt from model run was not readable 1>&2
33    return 99    return 99
# Line 29  testoutput_for_prop() Line 36  testoutput_for_prop()
36    echo testoutput_for_prop: grep "$2" $1/results/output.txt 1>&2    echo testoutput_for_prop: grep "$2" $1/results/output.txt 1>&2
37   fi   fi
38   grep "$2" $1/results/output.txt | sed 's/.*=//' | nl > tmp2.txt   grep "$2" $1/results/output.txt | sed 's/.*=//' | nl > tmp2.txt
39      lncnt=`wc -l tmp2.txt | awk '{print $1}' `
40      if [ $lncnt -lt 3 ]; then
41       if [ $verbose -gt 0 ]; then
42        echo Not enough lines of output when searching for "$2" 1>&2
43       fi
44       return 99
45      fi
46   if [ $debug -gt 0 ]; then   if [ $debug -gt 0 ]; then
47    echo testoutput_for_prop: join tmp1.txt tmp2.txt 1>&2    echo testoutput_for_prop: join tmp1.txt tmp2.txt 1>&2
48   fi   fi
# Line 316  $0 [-help] [-quick] [-verbose] dir1 [dir Line 330  $0 [-help] [-quick] [-verbose] dir1 [dir
330   -clean     Do "make CLEAN" after compiling and testing.   -clean     Do "make CLEAN" after compiling and testing.
331   -shorttest Don't compare numeric output for mean and s.d. of variables.   -shorttest Don't compare numeric output for mean and s.d. of variables.
332   -noieee    By default, $0 uses the -ieee option for genmake. This turns it off.   -noieee    By default, $0 uses the -ieee option for genmake. This turns it off.
333     -cleanup   Aggresively removes all model output, executables and object files
334                and then exits. Use with care.
335    
336  Normal usage:  Normal usage:
337   $0 *       Configure, compile, run and analyze in all experiment directories   $0 *       Configure, compile, run and analyze in all experiment directories
# Line 334  else Line 350  else
350  fi  fi
351  }  }
352    
353    clean_up()
354    {
355    # Find all executables, object files, CPP'd source and model output
356    # and DELETE it.
357    for opt in '-name mitgcmuv*' '-name *.o' '-name *.f' '-name *.c' '-path *results -prune -o -name *.meta' '-path *results -prune -o -name *.data' '-type l'
358     do
359       echo Cleaning: find . $opt -exec rm {} \;
360       find . $opt -exec rm {} \;
361    done
362    }
363    
364  ###############################################################################  ###############################################################################
365    
366  # Main function  # Main function
# Line 352  expts='' Line 379  expts=''
379  for arg in $@  for arg in $@
380  do  do
381   case $arg in   case $arg in
382       -cleanup) clean_up; exit 0;;
383     -quick) quick=1;;     -quick) quick=1;;
384     -verbose) verbose=2;;     -verbose) verbose=2;;
385     -debug) debug=1;;     -debug) debug=1;;

Legend:
Removed from v.1.19.2.1  
changed lines
  Added in v.1.19.2.2

  ViewVC Help
Powered by ViewVC 1.1.22