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 |
jmc |
1.8 |
|
9 |
jmc |
1.12 |
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_op64_tuv,v 1.11 2010/05/20 19:22:30 jmc Exp $ |
10 |
jmc |
1.1 |
# $Name: $ |
11 |
|
|
|
12 |
jmc |
1.8 |
# ACES-grid PBS-batch script: test using open64 + "Trap Un-initialised Var." option |
13 |
|
|
|
14 |
jmc |
1.1 |
if test -f /etc/profile.d/modules.sh ; then |
15 |
|
|
. /etc/profile.d/modules.sh |
16 |
|
|
fi |
17 |
jmc |
1.6 |
# Note: added to pass big test (the 2 fizhi-cs-* test) |
18 |
|
|
ulimit -s unlimited |
19 |
jmc |
1.2 |
|
20 |
jmc |
1.7 |
umask 0022 |
21 |
|
|
#- to get case insensitive "ls" (and order of tested experiments) |
22 |
|
|
export LC_ALL="en_US.UTF-8" |
23 |
|
|
|
24 |
jmc |
1.10 |
TST_DIR="/home/jmc/test_ACES" |
25 |
|
|
HERE=$TST_DIR/output |
26 |
|
|
#cd $HERE |
27 |
jmc |
1.7 |
|
28 |
jmc |
1.2 |
sfx='tuv' |
29 |
jmc |
1.1 |
module add open64 |
30 |
jmc |
1.2 |
OPTFILE="../tools/build_options/linux_ia32_open64.trapuv" |
31 |
|
|
options='-j 2 -gsl -match 10' |
32 |
jmc |
1.1 |
export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized |
33 |
|
|
|
34 |
jmc |
1.3 |
checkOut=1 |
35 |
|
|
#options="$options -nc" ; checkOut=0 |
36 |
|
|
#options="$options -q" ; checkOut=0 |
37 |
|
|
|
38 |
jmc |
1.2 |
gcmDIR="MITgcm_$sfx" |
39 |
|
|
cd $TST_DIR |
40 |
jmc |
1.4 |
#- check for disk space: |
41 |
jmc |
1.12 |
dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
42 |
jmc |
1.4 |
if [ $dsp -gt 99 ] ; then |
43 |
|
|
echo 'Not enough space on this disk => do not run testreport.' |
44 |
|
|
df . |
45 |
|
|
exit |
46 |
|
|
fi |
47 |
|
|
if [ $checkOut -eq 1 ] ; then |
48 |
|
|
if test -d $gcmDIR/CVS ; then |
49 |
jmc |
1.9 |
/bin/rm -rf $gcmDIR/verification/tr_aces-${sfx}_????????_? |
50 |
|
|
# ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
51 |
jmc |
1.4 |
echo "cvs update of dir $gcmDIR :" |
52 |
jmc |
1.11 |
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1 |
53 |
jmc |
1.4 |
else |
54 |
|
|
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
55 |
|
|
checkOut=2 |
56 |
|
|
fi |
57 |
|
|
fi |
58 |
|
|
if [ $checkOut -eq 2 ] ; then |
59 |
jmc |
1.3 |
if test -e $gcmDIR ; then |
60 |
|
|
rm -rf $gcmDIR |
61 |
|
|
fi |
62 |
|
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
63 |
|
|
# cvs co MITgcm |
64 |
|
|
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
65 |
|
|
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
66 |
|
|
else |
67 |
|
|
if test -e $gcmDIR/verification ; then |
68 |
jmc |
1.5 |
echo "dir $gcmDIR/verification exist" |
69 |
jmc |
1.3 |
else |
70 |
|
|
echo "no dir $gcmDIR/verification => exit" |
71 |
|
|
exit |
72 |
|
|
fi |
73 |
jmc |
1.1 |
fi |
74 |
|
|
|
75 |
jmc |
1.2 |
cd $gcmDIR/verification |
76 |
|
|
echo ./testreport $options -of $OPTFILE -odir aces-$sfx |
77 |
|
|
./testreport $options -of $OPTFILE -odir aces-$sfx |
78 |
jmc |
1.1 |
|
79 |
jmc |
1.8 |
echo -n 'run ./testreport -clean ...' |
80 |
|
|
./testreport -clean > /dev/null 2>&1 |
81 |
|
|
echo -n ' done at: ' ; date |
82 |
|
|
|