34 |
#- keep a copy of MPI_MFILE: |
#- keep a copy of MPI_MFILE: |
35 |
cp -p $PBS_NODEFILE $HERE"/mf_"$sfx |
cp -p $PBS_NODEFILE $HERE"/mf_"$sfx |
36 |
|
|
37 |
checkOut=1 |
checkOut=1 ; options="$options -do" |
38 |
#options="$options -nc" ; checkOut=0 |
#options="$options -nc" ; checkOut=0 |
39 |
#options="$options -q" ; checkOut=0 |
#options="$options -q" ; checkOut=0 |
40 |
|
|
41 |
|
addExp=0 |
42 |
|
cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack" |
43 |
gcmDIR="MITgcm_$sfx" |
gcmDIR="MITgcm_$sfx" |
44 |
cd $TST_DIR |
cd $TST_DIR |
45 |
#- check for disk space: |
#- check for disk space: relative space (99%) or absolute (1.G): |
46 |
#dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
#dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
47 |
#if [ $dsp -gt 99 ] ; then |
#if [ $dsp -gt 99 ] ; then |
48 |
dsp=`df -P . | tail -1 | awk '{print $4}'` |
dsp=`df -P . | tail -1 | awk '{print $4}'` |
53 |
fi |
fi |
54 |
if [ $checkOut -eq 1 ] ; then |
if [ $checkOut -eq 1 ] ; then |
55 |
if test -d $gcmDIR/CVS ; then |
if test -d $gcmDIR/CVS ; then |
56 |
/bin/rm -rf $gcmDIR/verification/??_${dNam}-${sfx}_????????_? |
#- 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}_????????_? 2> /dev/null` |
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 ) |
# ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
72 |
echo "cvs update of dir $gcmDIR :" |
echo "cvs update of dir $gcmDIR :" |
73 |
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1 |
( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1 |
74 |
RETVAL=$? |
RETVAL=$? |
75 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
76 |
echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit" |
echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit" |
86 |
rm -rf $gcmDIR |
rm -rf $gcmDIR |
87 |
fi |
fi |
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 |
cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
90 |
|
if [ $addExp -ge 1 ]; then |
91 |
|
echo " add dir: offline_cheapaml (from Contrib:verification_other)" |
92 |
|
( cd $gcmDIR/verification ; cvs $cvsArg co -P -d offline_cheapaml \ |
93 |
|
MITgcm_contrib/verification_other/offline_cheapaml > /dev/null 2>&1 ) |
94 |
|
fi |
95 |
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
96 |
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
97 |
fi |
fi |