1 |
jmc |
1.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 |
jmc |
1.4 |
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_tuv,v 1.3 2008/05/22 22:32:48 jmc Exp $ |
10 |
jmc |
1.1 |
# $Name: $ |
11 |
|
|
|
12 |
jmc |
1.2 |
umask 0022 |
13 |
|
|
TST_DIR="/home/jmc/test_ACES/gcm_tests" |
14 |
|
|
HERE='/home/jmc/test_ACES/output' |
15 |
|
|
cd $HERE |
16 |
|
|
|
17 |
jmc |
1.1 |
if test -f /etc/profile.d/modules.sh ; then |
18 |
|
|
. /etc/profile.d/modules.sh |
19 |
|
|
fi |
20 |
jmc |
1.2 |
|
21 |
|
|
sfx='tuv' |
22 |
jmc |
1.1 |
module add open64 |
23 |
jmc |
1.2 |
OPTFILE="../tools/build_options/linux_ia32_open64.trapuv" |
24 |
|
|
options='-j 2 -gsl -match 10' |
25 |
jmc |
1.1 |
export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized |
26 |
|
|
|
27 |
jmc |
1.3 |
checkOut=1 |
28 |
|
|
#options="$options -nc" ; checkOut=0 |
29 |
|
|
#options="$options -q" ; checkOut=0 |
30 |
|
|
|
31 |
jmc |
1.1 |
# cat << EOF > $HERE"/.cvspass" |
32 |
|
|
# /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0= |
33 |
|
|
# EOF |
34 |
jmc |
1.2 |
gcmDIR="MITgcm_$sfx" |
35 |
|
|
cd $TST_DIR |
36 |
jmc |
1.4 |
#- check for disk space: |
37 |
|
|
dsp=`df . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
38 |
|
|
if [ $dsp -gt 99 ] ; then |
39 |
|
|
echo 'Not enough space on this disk => do not run testreport.' |
40 |
|
|
df . |
41 |
|
|
exit |
42 |
|
|
fi |
43 |
|
|
if [ $checkOut -eq 1 ] ; then |
44 |
|
|
if test -d $gcmDIR/CVS ; then |
45 |
|
|
echo "cvs update of dir $gcmDIR :" |
46 |
|
|
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) |
47 |
|
|
/bin/rm -rf $gcmDIR/verification/tr_aces-${sfx}_????????_? |
48 |
|
|
else |
49 |
|
|
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
50 |
|
|
checkOut=2 |
51 |
|
|
fi |
52 |
|
|
fi |
53 |
|
|
if [ $checkOut -eq 2 ] ; then |
54 |
jmc |
1.3 |
if test -e $gcmDIR ; then |
55 |
|
|
rm -rf $gcmDIR |
56 |
|
|
fi |
57 |
|
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
58 |
|
|
# cvs co MITgcm |
59 |
|
|
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
60 |
|
|
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
61 |
|
|
else |
62 |
|
|
if test -e $gcmDIR/verification ; then |
63 |
|
|
echo "dir $gcmDIR exist" |
64 |
|
|
else |
65 |
|
|
echo "no dir $gcmDIR/verification => exit" |
66 |
|
|
exit |
67 |
|
|
fi |
68 |
jmc |
1.1 |
fi |
69 |
|
|
|
70 |
jmc |
1.2 |
cd $gcmDIR/verification |
71 |
|
|
echo ./testreport $options -of $OPTFILE -odir aces-$sfx |
72 |
|
|
./testreport $options -of $OPTFILE -odir aces-$sfx |
73 |
jmc |
1.1 |
|