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