1 |
#!/bin/bash |
2 |
# |
3 |
#PBS -q four |
4 |
#PBS -N tst_tuv |
5 |
#PBS -l nodes=1:ppn=2 |
6 |
#PBS -e /mit/jm_c/test_acesgrid/output/tst_tuv.stderr |
7 |
#PBS -o /mit/jm_c/test_acesgrid/output/tst_tuv.stdout |
8 |
|
9 |
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/test_aces_op64_tuv,v 1.3 2011/08/24 12:58:00 jmc Exp $ |
10 |
# $Name: $ |
11 |
|
12 |
if test -f /etc/profile.d/modules.sh ; then |
13 |
. /etc/profile.d/modules.sh |
14 |
fi |
15 |
# Note: added "ulimit -s unlimited" in file "~/.tcshrc" |
16 |
# to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI |
17 |
|
18 |
umask 0022 |
19 |
#- to get case insensitive "ls" (and order of tested experiments) |
20 |
export LC_ALL="en_US.UTF-8" |
21 |
|
22 |
#TST_DIR="/home/jmc/test_ACES" |
23 |
TST_DIR="/mit/jm_c/test_acesgrid" |
24 |
HERE=$TST_DIR/output |
25 |
#cd $HERE |
26 |
|
27 |
sfx='tuv' |
28 |
module add open64 |
29 |
OPTFILE="../tools/build_options/linux_amd64_open64" |
30 |
options="-j 2 -devel" |
31 |
#options="-j 2 -mth -gsl" |
32 |
#export OMP_NUM_THREADS=2 |
33 |
#export OMP_SLAVE_STACK_SIZE=400m |
34 |
#export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized |
35 |
ulimit -s unlimited |
36 |
|
37 |
#dAlt=`date +%d` ; dAlt=`expr $dAlt % 3` |
38 |
#if [ $dAlt -eq 1 ] ; then options="$options -fast" ; fi |
39 |
|
40 |
#- keep a copy of MPI_MFILE: |
41 |
cp -p $PBS_NODEFILE $HERE"/mf_"$sfx |
42 |
|
43 |
checkOut=1 |
44 |
#options="$options -nc" ; checkOut=0 |
45 |
#options="$options -q" ; checkOut=0 |
46 |
|
47 |
gcmDIR="MITgcm_$sfx" |
48 |
cd $TST_DIR |
49 |
#- check for disk space: |
50 |
dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
51 |
if [ $dsp -gt 99 ] ; then |
52 |
echo 'Not enough space on this disk => do not run testreport.' |
53 |
df . |
54 |
exit |
55 |
fi |
56 |
if [ $checkOut -eq 1 ] ; then |
57 |
if test -d $gcmDIR/CVS ; then |
58 |
/bin/rm -rf $gcmDIR/verification/??_acesgrid-${sfx}_????????_? |
59 |
# ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
60 |
echo "cvs update of dir $gcmDIR :" |
61 |
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1 |
62 |
RETVAL=$? |
63 |
if test "x$RETVAL" != x0 ; then |
64 |
echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit" |
65 |
exit |
66 |
fi |
67 |
else |
68 |
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
69 |
checkOut=2 |
70 |
fi |
71 |
fi |
72 |
if [ $checkOut -eq 2 ] ; then |
73 |
if test -e $gcmDIR ; then |
74 |
rm -rf $gcmDIR |
75 |
fi |
76 |
# cvs co MITgcm |
77 |
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
78 |
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
79 |
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
80 |
fi |
81 |
|
82 |
#- change dir to $gcmDIR/verification dir: |
83 |
if test -e $gcmDIR/verification ; then |
84 |
if [ $checkOut -lt 2 ] ; then |
85 |
echo " dir $gcmDIR/verification exist" ; fi |
86 |
cd $gcmDIR/verification |
87 |
else |
88 |
echo "no dir: $gcmDIR/verification => exit" |
89 |
exit |
90 |
fi |
91 |
|
92 |
echo ./testreport $options -of $OPTFILE -odir acesgrid-$sfx |
93 |
./testreport $options -of $OPTFILE -odir acesgrid-$sfx |
94 |
|
95 |
#echo '' |
96 |
#echo ../tools/do_tst_2+2 -o acesgrid-$sfx -a NONE |
97 |
#../tools/do_tst_2+2 -o acesgrid-$sfx -a NONE |