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

Contents of /MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_tlm

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


Revision 1.2 - (show annotations) (download)
Fri Jan 25 23:26:00 2013 UTC (11 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64e, checkpoint64d
Changes since 1.1: +2 -2 lines
minor improvement

1 #!/bin/bash
2 #
3 #PBS -q four-twelve
4 #PBS -N tst_tlm
5 #PBS -l nodes=1:ppn=2
6 #PBS -e /home/jmc/test_aces/output/tst_tlm.stderr
7 #PBS -o /home/jmc/test_aces/output/tst_tlm.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_tlm,v 1.1 2012/08/17 17:11:14 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='tlm'
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='-tlm -devel -gsl'
34 export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized
35 #- need this to get "staf":
36 export PATH="$PATH:$HOME/bin"
37
38
39 #- keep a copy of MPI_MFILE:
40 cp -p $PBS_NODEFILE $HERE"/mf_"$sfx
41
42 checkOut=1 ; options="$options -do"
43 #options="$options -nc" ; checkOut=0
44 #options="$options -q" ; checkOut=0
45
46 gcmDIR="MITgcm_$sfx"
47 cd $TST_DIR
48 #- check for disk space:
49 #dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
50 #if [ $dsp -gt 99 ] ; then
51 dsp=`df -P . | tail -1 | awk '{print $4}'`
52 if [ $dsp -le 1000000 ] ; then
53 echo 'Not enough space on this disk => do not run testreport.'
54 df .
55 exit
56 fi
57 if [ $checkOut -eq 1 ] ; then
58 if test -d $gcmDIR/CVS ; then
59 #- remove previous output tar files and tar & remove previous output-dir
60 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
61 ( cd $gcmDIR/verification
62 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
63 for dd in $listD
64 do
65 if test -d $dd ; then
66 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
67 RETVAL=$?
68 if test "x$RETVAL" != x0 ; then
69 echo "ERROR in tar+gzip prev outp-dir: $dd"
70 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
71 fi
72 fi
73 done )
74 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
75 echo "cvs update of dir $gcmDIR :"
76 ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1
77 RETVAL=$?
78 if test "x$RETVAL" != x0 ; then
79 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
80 exit
81 fi
82 else
83 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
84 checkOut=2
85 fi
86 fi
87 if [ $checkOut -eq 2 ] ; then
88 if test -e $gcmDIR ; then
89 rm -rf $gcmDIR
90 fi
91 # cvs co MITgcm
92 cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1
93 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
94 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
95 fi
96
97 #- change dir to $gcmDIR/verification dir:
98 if test -e $gcmDIR/verification ; then
99 if [ $checkOut -lt 2 ] ; then
100 echo " dir $gcmDIR/verification exist" ; fi
101 cd $gcmDIR/verification
102 else
103 echo "no dir: $gcmDIR/verification => exit"
104 exit
105 fi
106
107 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx
108 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx
109
110 #echo -n 'run ./testreport -clean ...'
111 #./testreport -tlm -clean > /dev/null 2>&1
112 #echo -n ' done at: ' ; date

  ViewVC Help
Powered by ViewVC 1.1.22