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

Contents 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 - (show annotations) (download)
Tue Aug 20 18:53:11 2013 UTC (10 years, 8 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 #!/bin/bash
2 #
3 #PBS -q four-twelve
4 #PBS -N tst_tuv
5 #PBS -l nodes=1:ppn=2
6 #PBS -e /home/jmc/test_aces/output/tst_tuv.stderr
7 #PBS -o /home/jmc/test_aces/output/tst_tuv.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_tuv,v 1.25 2013/08/12 19:29:12 jmc Exp $
10 # $Name: $
11
12 # ACES-grid PBS-batch script: test using open64 + "Trap Un-initialised Var." option
13
14 if test -f /etc/profile.d/modules.sh ; then
15 . /etc/profile.d/modules.sh
16 fi
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
24 umask 0022
25 #- to get case insensitive "ls" (and order of tested experiments)
26 export LC_ALL="en_US.UTF-8"
27
28 HERE=$TST_DIR/output
29 sfx='tuv'
30 module add open64
31 export NETCDF_ROOT='/usr/local/pkg/netcdf/netcdf-3.5.1/g77'
32 OPTFILE="../tools/build_options/linux_ia32_open64"
33 options='-j 2 -devel -gsl'
34 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
39 checkOut=1 ; options="$options -do"
40 #options="$options -nc" ; checkOut=0
41 #options="$options -q" ; checkOut=0
42
43 addExp=0
44 cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
45 gcmDIR="MITgcm_$sfx"
46 cd $TST_DIR
47 #- check for disk space: relative space (99%) or absolute (1.G):
48 #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 if [ $dsp -le 1000000 ] ; then
52 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 #- 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 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
62 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 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
74 #- 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 echo "cvs update of dir $gcmDIR :"
77 ( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1
78 RETVAL=$?
79 if test "x$RETVAL" != x0 ; then
80 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
81 exit
82 fi
83 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 if test -e $gcmDIR ; then
90 rm -rf $gcmDIR
91 fi
92 # cvs co MITgcm
93 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 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
100 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
101 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 else
109 echo "no dir: $gcmDIR/verification => exit"
110 exit
111 fi
112
113 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
121 #echo -n 'run ./testreport -clean ...'
122 #./testreport -clean > /dev/null 2>&1
123 #echo -n ' done at: ' ; date

  ViewVC Help
Powered by ViewVC 1.1.22