/[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 by adcroft, Tue Sep 4 17:17:48 2001 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 314  $0 [-help] [-quick] [-verbose] dir1 [dir Line 328  $0 [-help] [-quick] [-verbose] dir1 [dir
328   -debug     Produce even more output which will mean nothing to most   -debug     Produce even more output which will mean nothing to most
329   -force     Do "make CLEAN" before compiling. This forces a complete rebuild.   -force     Do "make CLEAN" before compiling. This forces a complete rebuild.
330   -clean     Do "make CLEAN" after compiling and testing.   -clean     Do "make CLEAN" after compiling and testing.
331   -longtest  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 345  quick=0 Line 372  quick=0
372  force=0  force=0
373  clean=0  clean=0
374  ieee=1  ieee=1
375  longtest=0  longtest=1
376  expts=''  expts=''
377    
378  # Process arguments  # Process arguments
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;;
386     -force) force=1;;     -force) force=1;;
387     -clean) clean=1;;     -clean) clean=1;;
388     -noieee) ieee=0;;     -noieee) ieee=0;;
389     -longtest) longtest=1;;     -shorttest) longtest=0;;
390     -quiet) verbose=0;;     -quiet) verbose=0;;
391     -help) show_help; exit 0;;     -help) show_help; exit 0;;
392     -*) echo Unrecognized option:$arg; exit 9;;     -*) echo Unrecognized option:$arg; exit 9;;

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

  ViewVC Help
Powered by ViewVC 1.1.22