2 |
|
|
3 |
# $Header$ |
# $Header$ |
4 |
|
|
5 |
# Test script for MITgcm that should work on most of the csail.mit.edu |
# Test script for MITgcm that should work on most of the csail.mit.edu Linux machines. |
6 |
# Linux machines. |
|
7 |
|
tst_grp=0 ; if test $# = 1 ; then tst_grp=$1 ; fi |
8 |
|
if test $tst_grp != 'a' -a $tst_grp != 'b' ; then |
9 |
|
echo "missing or invalid argument (expect: 'a' or 'b') ==> exit" |
10 |
|
exit 1 |
11 |
|
fi |
12 |
|
|
13 |
# defaults |
# defaults |
14 |
#export PATH="$PATH:/usr/local/bin" |
#export PATH="$PATH:/usr/local/bin" |
37 |
dInWeek=`date +%a` |
dInWeek=`date +%a` |
38 |
outDir=`hostname -s` |
outDir=`hostname -s` |
39 |
TESTDIR="/scratch/jmc/test_${outDir}" |
TESTDIR="/scratch/jmc/test_${outDir}" |
40 |
|
outDir="${outDir}-${tst_grp}" |
41 |
MC=13 |
MC=13 |
|
checkOut=2 |
|
42 |
sepDir=1 |
sepDir=1 |
43 |
option= |
option= |
44 |
#tst_list='g7a adm mpa g77 gfo+rs mth mp2+rs mpi ifc' |
#tst_list='g7a adm mpa g77 gfo+rs mth mp2+rs mpi ifc' |
45 |
#if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm oad" ; fi |
#if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm oad" ; fi |
46 |
outDir="${outDir}-a" |
if test $tst_grp = 'a' ; then |
47 |
tst_list='g7a mpa mth mp2+rs mpi oad' |
checkOut=2 |
48 |
#outDir="${outDir}-b" |
tst_list='g7a mpa mth mp2+rs mpi oad' |
49 |
#tst_list='adm g77 gfo+rs ifc' |
else |
50 |
#if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm" ; fi |
checkOut=3 |
51 |
|
tst_list='adm g77 gfo+rs ifc' |
52 |
|
if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm" ; fi |
53 |
|
fi |
54 |
|
echo " test: $outDir ; list='$tst_list'" |
55 |
|
|
56 |
#option="-nc" ; checkOut=1 |
#option="-nc" ; checkOut=1 |
57 |
#option="-q" ; checkOut=1 |
#option="-q" ; checkOut=1 |
85 |
cd $tdir |
cd $tdir |
86 |
$cmdCVS co -P MITgcm > /dev/null |
$cmdCVS co -P MITgcm > /dev/null |
87 |
echo " done" |
echo " done" |
88 |
|
if test -d other_input ; then |
89 |
|
list_dirs=`(cd other_input ; ls 2> /dev/null )` |
90 |
|
echo "Updating ( $cmdCVS update -P -d ) 'other_input' extra dirs:" |
91 |
|
for exd in $list_dirs ; do |
92 |
|
if test -d other_input/$exd/CVS ; then echo " $exd" |
93 |
|
( cd other_input/$exd ; $cmdCVS update -P -d ) |
94 |
|
fi |
95 |
|
done |
96 |
|
echo " <-- update of 'other_input' dirs done" |
97 |
|
fi |
98 |
else |
else |
99 |
cd $tdir |
cd $tdir |
100 |
fi |
fi |
108 |
|
|
109 |
echo "================================================================" |
echo "================================================================" |
110 |
typ=`echo $tt | sed 's/+rs//'` |
typ=`echo $tt | sed 's/+rs//'` |
111 |
|
#- define list of additional experiences to test: |
112 |
|
addExp='' |
113 |
|
if test $typ = 'mp2' -o $typ = 'ifc' ; then |
114 |
|
addExp="offline_cheapaml atm_gray" |
115 |
|
fi |
116 |
|
if test $typ = 'gfo' -o $typ = 'ifc' ; then |
117 |
|
addExp="$addExp global_oce_biogeo_bling" |
118 |
|
addExp="$addExp shelfice_remeshing" |
119 |
|
fi |
120 |
|
if test $typ = 'mpi' ; then |
121 |
|
addExp="$addExp global_oce_cs32" |
122 |
|
fi |
123 |
#- check day and time: |
#- check day and time: |
124 |
curDay=`date +%d` ; curHour=`date +%H` |
curDay=`date +%d` ; curHour=`date +%H` |
125 |
if [ $curDay -ne $TODAY ] ; then |
if [ $curDay -ne $TODAY ] ; then |
164 |
mkdir $new_dir |
mkdir $new_dir |
165 |
pushd $new_dir |
pushd $new_dir |
166 |
cp -ra ../MITgcm/* . |
cp -ra ../MITgcm/* . |
167 |
|
#-- download additional experience from Contrib: |
168 |
|
for exp2add in $addExp ; do |
169 |
|
echo " add dir: $exp2add (from Contrib:verification_other)" |
170 |
|
( cd verification ; $cmdCVS co -P -d $exp2add \ |
171 |
|
MITgcm_contrib/verification_other/$exp2add > /dev/null ) |
172 |
|
if test $exp2add = 'global_oce_cs32' ; then |
173 |
|
echo " link dir 'other_input/core2_cnyf' in here" |
174 |
|
( cd verification/${exp2add} |
175 |
|
ln -s ../../../other_input/core2_cnyf . ) |
176 |
|
fi |
177 |
|
if test $exp2add = 'shelfice_remeshing' ; then |
178 |
|
echo " link dir 'other_input/remeshing_code' to 'extra_code'" |
179 |
|
( cd verification/${exp2add} |
180 |
|
ln -s ../../../other_input/remeshing_code extra_code ) |
181 |
|
fi |
182 |
|
done |
183 |
fi |
fi |
184 |
else |
else |
185 |
pushd MITgcm |
pushd MITgcm |