/[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.16 - (show annotations) (download)
Thu May 8 18:44:03 2014 UTC (10 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64x
Changes since 1.15: +11 -11 lines
adjust previous modifications

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

  ViewVC Help
Powered by ViewVC 1.1.22