/[MITgcm]/MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_tuv
ViewVC logotype

Annotation of /MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_tuv

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


Revision 1.26 - (hide annotations) (download)
Tue Aug 20 18:53:11 2013 UTC (10 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64o, checkpoint64n
Changes since 1.25: +8 -3 lines
send directly result-email from the batch job using new testreport options

1 jmc 1.1 #!/bin/bash
2     #
3     #PBS -q four-twelve
4     #PBS -N tst_tuv
5     #PBS -l nodes=1:ppn=2
6 jmc 1.18 #PBS -e /home/jmc/test_aces/output/tst_tuv.stderr
7     #PBS -o /home/jmc/test_aces/output/tst_tuv.stdout
8 jmc 1.8
9 jmc 1.26 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_tuv,v 1.25 2013/08/12 19:29:12 jmc Exp $
10 jmc 1.1 # $Name: $
11    
12 jmc 1.8 # ACES-grid PBS-batch script: test using open64 + "Trap Un-initialised Var." option
13    
14 jmc 1.1 if test -f /etc/profile.d/modules.sh ; then
15     . /etc/profile.d/modules.sh
16     fi
17 jmc 1.17 # Note: added "ulimit -s unlimited" in file "~/.bashrc"
18     # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
19    
20     dNam='aces'
21     TST_DIR="$HOME/test_$dNam"
22     echo "start from TST_DIR='$TST_DIR' at: "`date`
23 jmc 1.2
24 jmc 1.7 umask 0022
25     #- to get case insensitive "ls" (and order of tested experiments)
26     export LC_ALL="en_US.UTF-8"
27    
28 jmc 1.10 HERE=$TST_DIR/output
29 jmc 1.2 sfx='tuv'
30 jmc 1.15 module add open64
31 jmc 1.16 export NETCDF_ROOT='/usr/local/pkg/netcdf/netcdf-3.5.1/g77'
32     OPTFILE="../tools/build_options/linux_ia32_open64"
33 jmc 1.21 options='-j 2 -devel -gsl'
34 jmc 1.15 export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized
35    
36     #- keep a copy of MPI_MFILE:
37     cp -p $PBS_NODEFILE $HERE"/mf_"$sfx
38 jmc 1.1
39 jmc 1.21 checkOut=1 ; options="$options -do"
40 jmc 1.3 #options="$options -nc" ; checkOut=0
41     #options="$options -q" ; checkOut=0
42    
43 jmc 1.24 addExp=0
44     cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
45 jmc 1.2 gcmDIR="MITgcm_$sfx"
46     cd $TST_DIR
47 jmc 1.23 #- check for disk space: relative space (99%) or absolute (1.G):
48 jmc 1.17 #dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
49     #if [ $dsp -gt 99 ] ; then
50     dsp=`df -P . | tail -1 | awk '{print $4}'`
51 jmc 1.18 if [ $dsp -le 1000000 ] ; then
52 jmc 1.4 echo 'Not enough space on this disk => do not run testreport.'
53     df .
54     exit
55     fi
56     if [ $checkOut -eq 1 ] ; then
57     if test -d $gcmDIR/CVS ; then
58 jmc 1.20 #- remove previous output tar files and tar & remove previous output-dir
59     /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
60     ( cd $gcmDIR/verification
61 jmc 1.22 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
62 jmc 1.20 for dd in $listD
63     do
64     if test -d $dd ; then
65     tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
66     RETVAL=$?
67     if test "x$RETVAL" != x0 ; then
68     echo "ERROR in tar+gzip prev outp-dir: $dd"
69     echo " on '"`hostname`"' (return val=$RETVAL) but continue"
70     fi
71     fi
72     done )
73 jmc 1.9 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
74 jmc 1.25 #- clean-up previous TAF output temp dir (generated on old system like here)
75     # ( cd $gcmDIR/verification ; /bin/rm -rf */build/PaxHeaders.[0-9]* )
76 jmc 1.4 echo "cvs update of dir $gcmDIR :"
77 jmc 1.24 ( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1
78 jmc 1.14 RETVAL=$?
79     if test "x$RETVAL" != x0 ; then
80 jmc 1.15 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
81 jmc 1.14 exit
82     fi
83 jmc 1.4 else
84     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
85     checkOut=2
86     fi
87     fi
88     if [ $checkOut -eq 2 ] ; then
89 jmc 1.3 if test -e $gcmDIR ; then
90     rm -rf $gcmDIR
91     fi
92 jmc 1.13 # cvs co MITgcm
93 jmc 1.24 cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null 2>&1
94     if [ $addExp -ge 1 ]; then
95     echo " add dir: offline_cheapaml (from Contrib:verification_other)"
96     ( cd $gcmDIR/verification ; cvs $cvsArg co -P -d offline_cheapaml \
97     MITgcm_contrib/verification_other/offline_cheapaml > /dev/null 2>&1 )
98     fi
99 jmc 1.3 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
100     /usr/bin/find $gcmDIR -type f | xargs chmod g+r
101 jmc 1.14 fi
102    
103     #- change dir to $gcmDIR/verification dir:
104     if test -e $gcmDIR/verification ; then
105     if [ $checkOut -lt 2 ] ; then
106     echo " dir $gcmDIR/verification exist" ; fi
107     cd $gcmDIR/verification
108 jmc 1.3 else
109 jmc 1.15 echo "no dir: $gcmDIR/verification => exit"
110 jmc 1.14 exit
111 jmc 1.1 fi
112    
113 jmc 1.26 SavD="$HOME/test_$dNam/send"
114     SEND="ssh geo $SavD/mpack"
115    
116     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
117     -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
118     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
119     -send "$SEND" -sd $SavD -a jmc@mitgcm.org
120 jmc 1.1
121 jmc 1.13 #echo -n 'run ./testreport -clean ...'
122     #./testreport -clean > /dev/null 2>&1
123     #echo -n ' done at: ' ; date
124 jmc 1.8

  ViewVC Help
Powered by ViewVC 1.1.22