1 |
jmc |
1.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_path_mth,v 1.2 2011/08/16 16:44:16 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 |
|
|
checkOut=1 |
38 |
|
|
#options="$options -nc" ; checkOut=0 |
39 |
|
|
#options="$options -q" ; checkOut=0 |
40 |
|
|
|
41 |
|
|
gcmDIR="MITgcm_$sfx" |
42 |
|
|
cd $TST_DIR |
43 |
|
|
#- check for disk space: |
44 |
|
|
dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
45 |
|
|
if [ $dsp -gt 99 ] ; then |
46 |
|
|
echo 'Not enough space on this disk => do not run testreport.' |
47 |
|
|
df . |
48 |
|
|
exit |
49 |
|
|
fi |
50 |
|
|
if [ $checkOut -eq 1 ] ; then |
51 |
|
|
if test -d $gcmDIR/CVS ; then |
52 |
|
|
/bin/rm -rf $gcmDIR/verification/??_acesgrid-${sfx}_????????_? |
53 |
|
|
# ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
54 |
|
|
echo "cvs update of dir $gcmDIR :" |
55 |
|
|
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1 |
56 |
|
|
RETVAL=$? |
57 |
|
|
if test "x$RETVAL" != x0 ; then |
58 |
|
|
echo " cvs update fail (return val=$RETVAL) => exit" |
59 |
|
|
exit |
60 |
|
|
fi |
61 |
|
|
else |
62 |
|
|
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
63 |
|
|
checkOut=2 |
64 |
|
|
fi |
65 |
|
|
fi |
66 |
|
|
if [ $checkOut -eq 2 ] ; then |
67 |
|
|
if test -e $gcmDIR ; then |
68 |
|
|
rm -rf $gcmDIR |
69 |
|
|
fi |
70 |
|
|
# cvs co MITgcm |
71 |
|
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
72 |
|
|
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
73 |
|
|
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
74 |
|
|
elif test -e $gcmDIR/verification ; then |
75 |
|
|
echo "dir $gcmDIR/verification exist" |
76 |
|
|
fi |
77 |
|
|
|
78 |
|
|
#- change dir to $gcmDIR/verification dir: |
79 |
|
|
if test -e $gcmDIR/verification ; then |
80 |
|
|
cd $gcmDIR/verification |
81 |
|
|
else |
82 |
|
|
echo "no dir $gcmDIR/verification => exit" |
83 |
|
|
exit |
84 |
|
|
fi |
85 |
|
|
|
86 |
|
|
echo ./testreport $options -of $OPTFILE -odir acesgrid-$sfx |
87 |
|
|
./testreport $options -of $OPTFILE -odir acesgrid-$sfx |
88 |
|
|
|
89 |
|
|
#echo '' |
90 |
|
|
#echo ../tools/do_tst_2+2 -o acesgrid-$sfx -a NONE |
91 |
|
|
#../tools/do_tst_2+2 -o acesgrid-$sfx -a NONE |
92 |
|
|
|