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.12 2010/12/14 21:34:45 jmc Exp $ |
10 |
# $Name: $ |
11 |
|
12 |
# ACES-grid PBS-batch script: test using open64 + "Trap Un-initialised Var." option |
13 |
|
14 |
if test -f /etc/profile.d/modules.sh ; then |
15 |
. /etc/profile.d/modules.sh |
16 |
fi |
17 |
# Note: added to pass big test (the 2 fizhi-cs-* test) |
18 |
ulimit -s unlimited |
19 |
|
20 |
umask 0022 |
21 |
#- to get case insensitive "ls" (and order of tested experiments) |
22 |
export LC_ALL="en_US.UTF-8" |
23 |
|
24 |
TST_DIR="/home/jmc/test_ACES" |
25 |
HERE=$TST_DIR/output |
26 |
#cd $HERE |
27 |
|
28 |
sfx='tuv' |
29 |
module add open64 |
30 |
OPTFILE="../tools/build_options/linux_ia32_open64.trapuv" |
31 |
options='-j 2 -gsl -do' |
32 |
export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized |
33 |
|
34 |
checkOut=1 |
35 |
#options="$options -nc" ; checkOut=0 |
36 |
#options="$options -q" ; checkOut=0 |
37 |
|
38 |
gcmDIR="MITgcm_$sfx" |
39 |
cd $TST_DIR |
40 |
#- check for disk space: |
41 |
dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
42 |
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 |
/bin/rm -rf $gcmDIR/verification/tr_aces-${sfx}_????????_? |
50 |
# ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
51 |
echo "cvs update of dir $gcmDIR :" |
52 |
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1 |
53 |
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 |
if test -e $gcmDIR ; then |
60 |
rm -rf $gcmDIR |
61 |
fi |
62 |
# cvs co MITgcm |
63 |
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
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 |
echo "dir $gcmDIR/verification exist" |
69 |
else |
70 |
echo "no dir $gcmDIR/verification => exit" |
71 |
exit |
72 |
fi |
73 |
fi |
74 |
|
75 |
cd $gcmDIR/verification |
76 |
echo ./testreport $options -of $OPTFILE -odir aces-$sfx |
77 |
./testreport $options -of $OPTFILE -odir aces-$sfx |
78 |
|
79 |
#echo -n 'run ./testreport -clean ...' |
80 |
#./testreport -clean > /dev/null 2>&1 |
81 |
#echo -n ' done at: ' ; date |