/[escript]/branches/windows_from_1456_trunk_1544_merged_in_old/autotest-scons
ViewVC logotype

Diff of /branches/windows_from_1456_trunk_1544_merged_in_old/autotest-scons

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

revision 739 by ksteube, Tue Jun 20 00:52:56 2006 UTC revision 774 by ksteube, Mon Jul 10 02:00:55 2006 UTC
# Line 13  Line 13 
13  # be sure to copy it there and commit after modification  # be sure to copy it there and commit after modification
14  #  #
15    
 # TODO: should try using the entire node: scons -j $NCPUS all_tests  
 # I've been told this produces poor results...why?  
   
16  # Which tests should we run?  # Which tests should we run?
17  target='run_tests'  # Default scons target that runs the tests  target='run_tests'  # Default scons target that runs the tests
18  test "x$1" != "x" && target="$1"  test "x$1" != "x" && target="$1"
19    requested_cpus=2
20    test "x$target" = "xall_tests" && requested_cpus=4
21    
22  MAIL_RECIPIENTS="gross@esscc.uq.edu.au elspeth@esscc.uq.edu.au matt@esscc.uq.edu.au robert.woodcock@csiro.au Peter.Hornby@csiro.au k.steube@uq.edu.au"  # MAIL_RECIPIENTS="l.gross@uq.edu.au elspeth@esscc.uq.edu.au matt@esscc.uq.edu.au robert.woodcock@csiro.au Peter.Hornby@csiro.au k.steube@uq.edu.au"
23  # MAIL_RECIPIENTS="k.steube@uq.edu.au"  MAIL_RECIPIENTS="k.steube@uq.edu.au"
24    
25  RunDate=`date '+%Y_%m_%d'`  # Time stamp for log file names  RunDate=`date '+%Y_%m_%d'`  # Time stamp for log file names
26    
# Line 42  cat << EOF > Logs/$RunDate.pbs.script.sh Line 41  cat << EOF > Logs/$RunDate.pbs.script.sh
41  #!/bin/bash  #!/bin/bash
42    
43  #PBS -q q1  #PBS -q q1
44  #PBS -l ncpus=2  #PBS -N autotest
45    #PBS -l ncpus=$requested_cpus
46  #PBS -o $RunDate.pbs.stdout  #PBS -o $RunDate.pbs.stdout
47  #PBS -e $RunDate.pbs.stderr  #PBS -e $RunDate.pbs.stderr
48    #PBS -W umask=022
49    
50  echo "PBS_JOBNAME       \$PBS_JOBNAME"  echo "PBS_JOBNAME       \$PBS_JOBNAME"
51  echo "PBS_JOBID         \$PBS_JOBID"  echo "PBS_JOBID         \$PBS_JOBID"
# Line 54  echo "USER              \$USER" Line 55  echo "USER              \$USER"
55  echo "PBS_O_HOST        \$PBS_O_HOST"  echo "PBS_O_HOST        \$PBS_O_HOST"
56  echo "PBS_O_WORKDIR     \$PBS_O_WORKDIR"  echo "PBS_O_WORKDIR     \$PBS_O_WORKDIR"
57  echo "PBS_O_SHELL       \$PBS_O_SHELL"  echo "PBS_O_SHELL       \$PBS_O_SHELL"
58    date
59  echo ""  echo ""
60  echo ""  echo ""
61    
# Line 62  echo "" Line 64  echo ""
64  START=\`date '+%Y/%m/%d %H:%M'\`  START=\`date '+%Y/%m/%d %H:%M'\`
65    
66  finish () {  finish () {
67      date
68      # Clean up the sandbox
69      cd $WorkDir
70      /bin/rm -rf sandbox.$RunDate
71    END=\`date '+%Y/%m/%d %H:%M'\`    END=\`date '+%Y/%m/%d %H:%M'\`
72    cat << END_MSG | mail -s "ESYS_TESTS $target $RunDate \$1" $MAIL_RECIPIENTS    cat << END_MSG | mail -s "ESYS_TESTS $target $RunDate \$1" $MAIL_RECIPIENTS
73  \$2.  \$2.
74  The tests ran from \$START to \$END.  The tests ran from \$START to \$END on \$NCPUS CPUs
75  See the log files in $WorkDir/Logs for more information.  See the log files in $WorkDir/Logs/$RunDate*
76  This mail was sent by $SCRIPT_NAME  This mail was sent by $SCRIPT_NAME
77  running as \$USER on \`hostname\`.  running as \$USER on \`hostname\`.
78  END_MSG  END_MSG
79    test "x$1" = "FAIL" && exit 1    test "x\$1" = "FAILURE" && exit 1
80    exit 0    exit 0
81  }  }
82    
# Line 94  svn checkout svn+ssh://shake200.esscc.uq Line 100  svn checkout svn+ssh://shake200.esscc.uq
100  module use /raid2/matt/modules/modulefiles  module use /raid2/matt/modules/modulefiles
101  module use /raid2/toolspp4/modulefiles/gcc-3.3.6  module use /raid2/toolspp4/modulefiles/gcc-3.3.6
102  module use /usr/share/modules/modulefiles  module use /usr/share/modules/modulefiles
103  module load esys/env    # Matt's recommended modules  module load esys/env    # Recommended modules
104  module load doxygen/1.4.6  module load doxygen/1.4.6
 # The next line is to avoid /raid3/ksteube/AutoTests/sandbox.2006_06_17/trunk/build/posix/bruce/test/bruce_UnitTest: error while loading shared libraries: libboost_python-mt-d.so.1.33.0: cannot open shared object file: No such file or directory  
105  module load boost/1.33.0/python-2.4.1  module load boost/1.33.0/python-2.4.1
106    
107    # How many threads? One per CPU.
108  # Had to request 2 CPUs, but only use one for the tests  export OMP_NUM_THREADS=\$NCPUS
 export OMP_NUM_THREADS=1  
109    
110  # Run the tests  # Run the tests
111  echo "Running the tests"  echo "Running the tests $target"
112  cd trunk                || finish FAILURE "Could not cd to trunk"  cd trunk                || finish FAILURE "Could not cd to trunk"
113  scons $target >> $out_file 2>&1     || finish FAILURE "Could not run scons $target"  scons -j \$NCPUS $target >> $out_file 2>&1      || finish FAILURE "Could not run scons $target"
114    
115    echo "Cleaning up after the tests"
116    
117  # Delete files older than 21 days  # Delete files older than 21 days
118  find $WorkDir -atime +21 -exec rm -f {} \;  find $WorkDir -atime +21 -exec rm -f {} \;
119    
120  # Clean up the sandbox  finish SUCCESS "Successfully ran 'scons $target' on \`hostname\`"
 cd $WorkDir             || finish FAILURE "Could not cd to clean up WorkDir $WorkDir"  
 /bin/rm -rf sandbox.$RunDate        || finish FAILURE "Could not delete sandbox"  
   
 finish SUCCESS "Successfully ran 'scons $target', see Logs in $WorkDir on ess"  
121    
122  EOF  EOF
123    

Legend:
Removed from v.739  
changed lines
  Added in v.774

  ViewVC Help
Powered by ViewVC 1.1.26