3 |
#PBS -q four-twelve |
#PBS -q four-twelve |
4 |
#PBS -N tst_tuv |
#PBS -N tst_tuv |
5 |
#PBS -l nodes=1:ppn=2 |
#PBS -l nodes=1:ppn=2 |
6 |
#PBS -e /home/jmc/test_ACES/output/tst_tuv.stderr |
#PBS -e /home/jmc/test_aces/output/tst_tuv.stderr |
7 |
#PBS -o /home/jmc/test_ACES/output/tst_tuv.stdout |
#PBS -o /home/jmc/test_aces/output/tst_tuv.stdout |
8 |
|
|
9 |
# $Header$ |
# $Header$ |
10 |
# $Name$ |
# $Name$ |
11 |
|
|
12 |
umask 0022 |
# ACES-grid PBS-batch script: test using open64 + "Trap Un-initialised Var." option |
|
TST_DIR="/home/jmc/test_ACES/gcm_tests" |
|
|
HERE='/home/jmc/test_ACES/output' |
|
|
cd $HERE |
|
13 |
|
|
14 |
if test -f /etc/profile.d/modules.sh ; then |
if test -f /etc/profile.d/modules.sh ; then |
15 |
. /etc/profile.d/modules.sh |
. /etc/profile.d/modules.sh |
16 |
fi |
fi |
17 |
|
# Note: added "ulimit -s unlimited" in file "~/.bashrc" |
18 |
|
# to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI |
19 |
|
|
20 |
|
dNam='aces' |
21 |
|
TST_DIR="$HOME/test_$dNam" |
22 |
|
echo "start from TST_DIR='$TST_DIR' at: "`date` |
23 |
|
|
24 |
|
umask 0022 |
25 |
|
#- to get case insensitive "ls" (and order of tested experiments) |
26 |
|
export LC_ALL="en_US.UTF-8" |
27 |
|
|
28 |
|
HERE=$TST_DIR/output |
29 |
sfx='tuv' |
sfx='tuv' |
30 |
module add open64 |
module add open64 |
31 |
OPTFILE="../tools/build_options/linux_ia32_open64.trapuv" |
export NETCDF_ROOT='/usr/local/pkg/netcdf/netcdf-3.5.1/g77' |
32 |
options='-j 2 -gsl -match 10' |
OPTFILE="../tools/build_options/linux_ia32_open64" |
33 |
export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized |
options='-j 2 -devel -gsl' |
34 |
|
export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized |
35 |
|
|
36 |
checkOut=1 |
#- keep a copy of MPI_MFILE: |
37 |
|
cp -p $PBS_NODEFILE $HERE"/mf_"$sfx |
38 |
|
|
39 |
|
checkOut=1 ; options="$options -do" |
40 |
#options="$options -nc" ; checkOut=0 |
#options="$options -nc" ; checkOut=0 |
41 |
#options="$options -q" ; checkOut=0 |
#options="$options -q" ; checkOut=0 |
42 |
|
|
|
# cat << EOF > $HERE"/.cvspass" |
|
|
# /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0= |
|
|
# EOF |
|
43 |
gcmDIR="MITgcm_$sfx" |
gcmDIR="MITgcm_$sfx" |
44 |
cd $TST_DIR |
cd $TST_DIR |
45 |
if test $checkOut = '1' ; then |
#- check for disk space: |
46 |
|
#dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
47 |
|
#if [ $dsp -gt 99 ] ; then |
48 |
|
dsp=`df -P . | tail -1 | awk '{print $4}'` |
49 |
|
if [ $dsp -le 1000000 ] ; then |
50 |
|
echo 'Not enough space on this disk => do not run testreport.' |
51 |
|
df . |
52 |
|
exit |
53 |
|
fi |
54 |
|
if [ $checkOut -eq 1 ] ; then |
55 |
|
if test -d $gcmDIR/CVS ; then |
56 |
|
#- remove previous output tar files and tar & remove previous output-dir |
57 |
|
/bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz |
58 |
|
( cd $gcmDIR/verification |
59 |
|
listD=`ls -1 -d ??_${dNam}-${sfx}_????????_?` |
60 |
|
for dd in $listD |
61 |
|
do |
62 |
|
if test -d $dd ; then |
63 |
|
tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd |
64 |
|
RETVAL=$? |
65 |
|
if test "x$RETVAL" != x0 ; then |
66 |
|
echo "ERROR in tar+gzip prev outp-dir: $dd" |
67 |
|
echo " on '"`hostname`"' (return val=$RETVAL) but continue" |
68 |
|
fi |
69 |
|
fi |
70 |
|
done ) |
71 |
|
# ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
72 |
|
echo "cvs update of dir $gcmDIR :" |
73 |
|
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1 |
74 |
|
RETVAL=$? |
75 |
|
if test "x$RETVAL" != x0 ; then |
76 |
|
echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit" |
77 |
|
exit |
78 |
|
fi |
79 |
|
else |
80 |
|
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
81 |
|
checkOut=2 |
82 |
|
fi |
83 |
|
fi |
84 |
|
if [ $checkOut -eq 2 ] ; then |
85 |
if test -e $gcmDIR ; then |
if test -e $gcmDIR ; then |
86 |
rm -rf $gcmDIR |
rm -rf $gcmDIR |
87 |
fi |
fi |
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
|
88 |
# cvs co MITgcm |
# cvs co MITgcm |
89 |
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
90 |
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
91 |
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
92 |
|
fi |
93 |
|
|
94 |
|
#- change dir to $gcmDIR/verification dir: |
95 |
|
if test -e $gcmDIR/verification ; then |
96 |
|
if [ $checkOut -lt 2 ] ; then |
97 |
|
echo " dir $gcmDIR/verification exist" ; fi |
98 |
|
cd $gcmDIR/verification |
99 |
else |
else |
100 |
if test -e $gcmDIR/verification ; then |
echo "no dir: $gcmDIR/verification => exit" |
101 |
echo "dir $gcmDIR exist" |
exit |
|
else |
|
|
echo "no dir $gcmDIR/verification => exit" |
|
|
exit |
|
|
fi |
|
102 |
fi |
fi |
103 |
|
|
104 |
cd $gcmDIR/verification |
echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx |
105 |
echo ./testreport $options -of $OPTFILE -odir aces-$sfx |
./testreport $options -of $OPTFILE -odir ${dNam}-$sfx |
106 |
./testreport $options -of $OPTFILE -odir aces-$sfx |
|
107 |
|
#echo -n 'run ./testreport -clean ...' |
108 |
|
#./testreport -clean > /dev/null 2>&1 |
109 |
|
#echo -n ' done at: ' ; date |
110 |
|
|