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

Contents of /MITgcm/tools/example_scripts/ACESgrid/test_aces_op64_tuv

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


Revision 1.8 - (show annotations) (download)
Tue May 1 13:20:39 2012 UTC (12 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63r, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint63q, checkpoint63n, checkpoint63o, checkpoint63p, checkpoint63s, checkpoint64
Changes since 1.7: +16 -2 lines
cleaning of previous output-dir: save latest as a tar file

1 #!/bin/bash
2 #
3 #PBS -q one
4 #PBS -N tst_tuv
5 #PBS -l nodes=1:ppn=2
6 #PBS -e /mit/jm_c/test_acesgrid/output/tst_tuv.stderr
7 #PBS -o /mit/jm_c/test_acesgrid/output/tst_tuv.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/test_aces_op64_tuv,v 1.7 2012/03/23 21:09:55 jmc Exp $
10 # $Name: $
11
12 if test -f /etc/profile.d/modules.sh ; then
13 . /etc/profile.d/modules.sh
14 fi
15 # Note: added "ulimit -s unlimited" in file "~/.tcshrc"
16 # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
17
18 dNam='acesgrid'
19 TST_DIR="$HOME/test_$dNam"
20 echo "start from TST_DIR='$TST_DIR' at: "`date`
21
22 umask 0022
23 #- to get case insensitive "ls" (and order of tested experiments)
24 export LC_ALL="en_US.UTF-8"
25
26 HERE=$TST_DIR/output
27 sfx='tuv'
28 module add open64
29 OPTFILE="../tools/build_options/linux_amd64_open64"
30 options="-j 2 -devel"
31 #options="-j 2 -mth -gsl"
32 #export OMP_NUM_THREADS=2
33 #export OMP_SLAVE_STACK_SIZE=400m
34 #export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized
35 ulimit -s unlimited
36 #- need this to get "staf":
37 export PATH="$PATH:$HOME/bin"
38
39
40 dAlt=`date +%d` ; dAlt=`expr $dAlt % 3`
41 if [ $dAlt -eq 1 ] ; then options="-adm -do -devel" ; fi
42
43 #- keep a copy of MPI_MFILE:
44 cp -p $PBS_NODEFILE $HERE"/mf_"$sfx
45
46 checkOut=1
47 #options="$options -nc" ; checkOut=0
48 #options="$options -q" ; checkOut=0
49
50 gcmDIR="MITgcm_$sfx"
51 cd $TST_DIR
52 #- check for disk space:
53 dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
54 if [ $dsp -gt 99 ] ; then
55 echo 'Not enough space on this disk => do not run testreport.'
56 df .
57 exit
58 fi
59 if [ $checkOut -eq 1 ] ; then
60 if test -d $gcmDIR/CVS ; then
61 #- remove previous output tar files and tar & remove previous output-dir
62 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
63 ( cd $gcmDIR/verification
64 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_?`
65 for dd in $listD
66 do
67 if test -d $dd ; then
68 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
69 RETVAL=$?
70 if test "x$RETVAL" != x0 ; then
71 echo "ERROR in tar+gzip prev outp-dir: $dd"
72 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
73 fi
74 fi
75 done )
76 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
77 echo "cvs update of dir $gcmDIR :"
78 ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1
79 RETVAL=$?
80 if test "x$RETVAL" != x0 ; then
81 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
82 exit
83 fi
84 else
85 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
86 checkOut=2
87 fi
88 fi
89 if [ $checkOut -eq 2 ] ; then
90 if test -e $gcmDIR ; then
91 rm -rf $gcmDIR
92 fi
93 # cvs co MITgcm
94 cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1
95 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
96 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
97 fi
98
99 #- change dir to $gcmDIR/verification dir:
100 if test -e $gcmDIR/verification ; then
101 if [ $checkOut -lt 2 ] ; then
102 echo " dir $gcmDIR/verification exist" ; fi
103 cd $gcmDIR/verification
104 else
105 echo "no dir: $gcmDIR/verification => exit"
106 exit
107 fi
108
109 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx
110 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx
111
112 #echo ''
113 #echo ../tools/do_tst_2+2 -o ${dNam}-$sfx -a NONE
114 #../tools/do_tst_2+2 -o ${dNam}-$sfx -a NONE

  ViewVC Help
Powered by ViewVC 1.1.22