1 |
jmc |
1.1 |
#!/bin/bash |
2 |
|
|
# |
3 |
jmc |
1.4 |
#PBS -q four-twelve |
4 |
jmc |
1.1 |
#PBS -N tst_mth |
5 |
|
|
#PBS -l nodes=1:ppn=2 |
6 |
|
|
#PBS -e /home/jmc/test_ACES/output/tst_mth.stderr |
7 |
|
|
#PBS -o /home/jmc/test_ACES/output/tst_mth.stdout |
8 |
|
|
|
9 |
jmc |
1.9 |
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_ifc_mth,v 1.8 2008/08/28 18:35:42 jmc Exp $ |
10 |
jmc |
1.1 |
# $Name: $ |
11 |
|
|
|
12 |
jmc |
1.5 |
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.5 |
|
21 |
|
|
sfx='mth' |
22 |
jmc |
1.1 |
module add ifc/9.0.021 icc/9.0.021 intel/9.0 |
23 |
jmc |
1.9 |
OPTFILE="../tools/build_options/linux_ia32_ifort.aces" |
24 |
jmc |
1.5 |
options='-j 2 -mth -match 10' |
25 |
jmc |
1.1 |
export OMP_NUM_THREADS=2 |
26 |
|
|
export KMP_STACKSIZE=400m |
27 |
|
|
|
28 |
jmc |
1.6 |
checkOut=1 |
29 |
|
|
#options="$options -nc" ; checkOut=0 |
30 |
|
|
#options="$options -q" ; checkOut=0 |
31 |
|
|
|
32 |
jmc |
1.1 |
# cat << EOF > $HERE"/.cvspass" |
33 |
|
|
# /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0= |
34 |
|
|
# EOF |
35 |
jmc |
1.5 |
gcmDIR="MITgcm_$sfx" |
36 |
|
|
cd $TST_DIR |
37 |
jmc |
1.7 |
#- check for disk space: |
38 |
|
|
dsp=`df . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
39 |
|
|
if [ $dsp -gt 99 ] ; then |
40 |
|
|
echo 'Not enough space on this disk => do not run testreport.' |
41 |
|
|
df . |
42 |
|
|
exit |
43 |
|
|
fi |
44 |
|
|
if [ $checkOut -eq 1 ] ; then |
45 |
|
|
if test -d $gcmDIR/CVS ; then |
46 |
|
|
echo "cvs update of dir $gcmDIR :" |
47 |
|
|
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) |
48 |
|
|
/bin/rm -rf $gcmDIR/verification/tr_aces-${sfx}_????????_? |
49 |
|
|
else |
50 |
|
|
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
51 |
|
|
checkOut=2 |
52 |
|
|
fi |
53 |
|
|
fi |
54 |
|
|
if [ $checkOut -eq 2 ] ; then |
55 |
jmc |
1.6 |
if test -e $gcmDIR ; then |
56 |
|
|
rm -rf $gcmDIR |
57 |
|
|
fi |
58 |
|
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
59 |
|
|
# cvs co MITgcm |
60 |
|
|
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
61 |
|
|
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
62 |
|
|
else |
63 |
|
|
if test -e $gcmDIR/verification ; then |
64 |
jmc |
1.8 |
echo "dir $gcmDIR/verification exist" |
65 |
jmc |
1.6 |
else |
66 |
|
|
echo "no dir $gcmDIR/verification => exit" |
67 |
|
|
exit |
68 |
|
|
fi |
69 |
jmc |
1.1 |
fi |
70 |
|
|
|
71 |
jmc |
1.5 |
cd $gcmDIR/verification |
72 |
|
|
echo ./testreport $options -of $OPTFILE -odir aces-$sfx |
73 |
|
|
./testreport $options -of $OPTFILE -odir aces-$sfx |
74 |
jmc |
1.1 |
|