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

Contents of /MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_adm

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


Revision 1.12 - (show annotations) (download)
Wed Jun 25 20:50:06 2014 UTC (9 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64z, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint65
Changes since 1.11: +2 -2 lines
change queue to "long"

1 #!/bin/bash
2 #
3 #PBS -q long
4 #PBS -N tst_opa
5 #PBS -l nodes=1:ppn=2
6 #PBS -e /home/jmc/test_aces/output/tst_opa.stderr
7 #PBS -o /home/jmc/test_aces/output/tst_opa.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_adm,v 1.11 2014/05/08 18:44:03 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 umask 0022
21 #- to get case insensitive "ls" (and order of tested experiments)
22 export LC_ALL="en_US.UTF-8"
23 echo " running on: "`hostname`
24
25 dNam='aces'
26 HERE="$HOME/test_$dNam"
27 OUTP="$HERE/output"; SavD="$HERE/send"
28 SEND="ssh geo $SavD/mpack"
29 TST_DIR=$HERE
30
31 if test -d $TST_DIR ; then
32 echo "start from TST_DIR='$TST_DIR' at: "`date`
33 else
34 # if test ! -d /scratch/jm_c ; then mkdir /scratch/jm_c ; fi
35 if test ! -d $TST_DIR ; then mkdir $TST_DIR ; fi
36 if test ! -d $TST_DIR ; then
37 echo "ERROR: Can't create directory \"$TST_DIR\""
38 exit 1
39 fi
40 echo "start in new dir TST_DIR='$TST_DIR' at: "`date`
41 fi
42
43 sfx='opa'
44 addExp=''
45 module add open64
46 export NETCDF_ROOT='/usr/local/pkg/netcdf/netcdf-3.5.1/g77'
47 OPTFILE="../tools/build_options/linux_ia32_open64"
48 options='-adm -devel -gsl'
49 export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized
50 #- need this to get "staf":
51 export PATH="$PATH:$HOME/bin"
52
53 checkOut=1 ; options="$options -do"
54 #options="$options -nc" ; checkOut=0
55 #options="$options -q" ; checkOut=0
56
57 #- keep a copy of MPI_MFILE:
58 cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
59
60 cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
61 gcmDIR="MITgcm_$sfx"
62 cd $TST_DIR
63 #- check for disk space: relative space (99%) or absolute (1.G):
64 #dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
65 #if [ $dsp -gt 99 ] ; then
66 dsp=`df -P . | tail -1 | awk '{print $4}'`
67 if [ $dsp -le 1000000 ] ; then
68 echo 'Not enough space on this disk => do not run testreport.'
69 df .
70 exit
71 fi
72 if [ $checkOut -eq 1 ] ; then
73 if test -d $gcmDIR/CVS ; then
74 #- remove previous output tar files and tar & remove previous output-dir
75 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
76 ( cd $gcmDIR/verification
77 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
78 for dd in $listD
79 do
80 if test -d $dd ; then
81 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
82 RETVAL=$?
83 if test "x$RETVAL" != x0 ; then
84 echo "ERROR in tar+gzip prev outp-dir: $dd"
85 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
86 fi
87 fi
88 done )
89 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
90 #- clean-up previous TAF output temp dir (generated on old system like here)
91 ( cd $gcmDIR/verification ; /bin/rm -rf */build/PaxHeaders.[0-9]* )
92 echo "cvs update of dir $gcmDIR :"
93 ( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1
94 RETVAL=$?
95 if test "x$RETVAL" != x0 ; then
96 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
97 exit
98 fi
99 else
100 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
101 checkOut=2
102 fi
103 fi
104 if [ $checkOut -eq 2 ] ; then
105 if test -e $gcmDIR ; then
106 rm -rf $gcmDIR
107 fi
108 # cvs co MITgcm
109 cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null 2>&1
110 for exp2add in $addExp ; do
111 echo " add dir: $exp2add (from Contrib:verification_other)"
112 ( cd $gcmDIR/verification ; cvs $cvsArg co -P -d $exp2add \
113 MITgcm_contrib/verification_other/$exp2add > /dev/null 2>&1 )
114 done
115 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
116 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
117 fi
118
119 #- change dir to $gcmDIR/verification dir:
120 if test -e $gcmDIR/verification ; then
121 if [ $checkOut -lt 2 ] ; then
122 echo " dir $gcmDIR/verification exist" ; fi
123 cd $gcmDIR/verification
124 else
125 echo "no dir: $gcmDIR/verification => exit"
126 exit
127 fi
128
129 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
130 -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
131 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
132 -send "$SEND" -sd $SavD -a jmc@mitgcm.org
133
134 #echo -n 'run ./testreport -clean ...'
135 #./testreport -adm -clean > /dev/null 2>&1
136 #echo -n ' done at: ' ; date

  ViewVC Help
Powered by ViewVC 1.1.22