83 |
for tt in $tst_list |
for tt in $tst_list |
84 |
do |
do |
85 |
|
|
86 |
echo "================================================================" |
echo "================================================================" |
87 |
typ=`echo $tt | sed 's/+rs//'` |
typ=`echo $tt | sed 's/+rs//'` |
88 |
#- check day and time: |
#- check day and time: |
89 |
curDay=`date +%d` ; curHour=`date +%H` |
curDay=`date +%d` ; curHour=`date +%H` |
90 |
if [ $curDay -ne $TODAY ] ; then |
if [ $curDay -ne $TODAY ] ; then |
91 |
date ; echo "day is over => skip test $typ" |
date ; echo "day is over => skip test $typ" |
92 |
continue |
continue |
93 |
fi |
fi |
94 |
if [ $curHour -ge 18 ] ; then |
if [ $curHour -ge 18 ] ; then |
95 |
date ; echo "too late to run test $typ" |
date ; echo "too late to run test $typ" |
96 |
continue |
continue |
97 |
fi |
fi |
98 |
#- clean-up old output files |
#- clean-up old output files |
99 |
rm -f $tdir/output_${typ}* |
rm -f $tdir/output_${typ}* |
100 |
if test $sepDir = 1 ; then |
if test $sepDir = 1 ; then |
101 |
new_dir="MITgcm_$typ" |
new_dir="MITgcm_$typ" |
102 |
if test -d $new_dir/CVS -a $checkOut = '0' ; then |
if test -d $new_dir/CVS -a $checkOut = '0' ; then |
103 |
pushd $new_dir |
pushd $new_dir |
104 |
echo -n "Update the MITgcm code using: $cmdCVS ..." |
echo -n "Update the MITgcm code using: $cmdCVS ..." |
105 |
$cmdCVS update -P -d |
$cmdCVS update -P -d |
106 |
echo " done" |
echo " done" |
107 |
|
else |
108 |
|
test -e $new_dir && rm -rf $new_dir |
109 |
|
mkdir $new_dir |
110 |
|
pushd $new_dir |
111 |
|
cp -ra ../MITgcm/* . |
112 |
|
fi |
113 |
else |
else |
114 |
test -e $new_dir && rm -rf $new_dir |
pushd MITgcm |
|
mkdir $new_dir |
|
|
pushd $new_dir |
|
|
cp -ra ../MITgcm/* . |
|
115 |
fi |
fi |
116 |
else |
cd verification |
|
pushd MITgcm |
|
|
fi |
|
|
cd verification |
|
117 |
|
|
118 |
MPI=0 |
#-- set the testreport command: |
119 |
case $typ in |
nbl='-100' |
120 |
'g77'|'g7a') OPTFILE='../tools/build_options/linux_amd64_g77' ;; |
comm="./testreport" |
121 |
'gfo'|'adm'|'mth') OPTFILE='../tools/build_options/linux_amd64_gfortran' ;; |
if test $typ = 'g7a' -o $typ = 'adm' -o $typ = 'mpa' ; then |
122 |
'ifc') OPTFILE='../tools/build_options/linux_amd64_ifort11' ;; |
nbl='-60' |
123 |
'pgi') OPTFILE='../tools/build_options/linux_amd64_pgf77' ;; |
comm="$comm -adm" |
124 |
'mpa'|'mpi'|'mp2') OPTFILE='../tools/build_options/linux_amd64_gfortran+mpi_generic' |
elif test $typ = 'mth' -o $typ = 'mp2' ; then |
|
MPI=1 ;; |
|
|
*) OPTFILE= ;; |
|
|
esac |
|
|
if test $typ = 'mth' -o $typ = 'mp2' ; then |
|
125 |
export GOMP_STACKSIZE=400m |
export GOMP_STACKSIZE=400m |
126 |
fi |
export OMP_NUM_THREADS=2 |
127 |
if test $MPI = 1 ; then |
comm="$comm -mth" |
128 |
export MPI_INC_DIR=$MPI_GCC_DIR/include |
fi |
129 |
EXE="mpirun -np 2 ./mitgcmuv" |
comm="$comm -a jmc@mitgcm.org" |
130 |
fi |
#-- set the optfile (+ mpi & match-precision) |
131 |
|
MPI=0 |
132 |
|
case $typ in |
133 |
|
'g77'|'g7a') OPTFILE='../tools/build_options/linux_amd64_g77' ;; |
134 |
|
'gfo'|'adm'|'mth') OPTFILE='../tools/build_options/linux_amd64_gfortran' |
135 |
|
comm="$comm -match $MC" ;; |
136 |
|
'ifc') OPTFILE='../tools/build_options/linux_amd64_ifort11' ;; |
137 |
|
'pgi') OPTFILE='../tools/build_options/linux_amd64_pgf77' ;; |
138 |
|
'mpa'|'mpi'|'mp2') OPTFILE='../tools/build_options/linux_amd64_gfortran+mpi_generic' |
139 |
|
comm="$comm -match $MC" ; MPI=1 ;; |
140 |
|
*) OPTFILE= ;; |
141 |
|
esac |
142 |
|
#-- set MPI command: |
143 |
|
if test $MPI = 1 ; then |
144 |
|
if test $typ = 'mpa' ; then |
145 |
|
#EXE="mpirun -np 2 ./mitgcmuv_ad" |
146 |
|
EXE="mpirun -np XX ./mitgcmuv_ad" |
147 |
|
else |
148 |
|
#EXE="mpirun -np 2 ./mitgcmuv" |
149 |
|
EXE="mpirun -np XX ./mitgcmuv" |
150 |
|
fi |
151 |
|
fi |
152 |
|
|
153 |
if test $sepDir = 0 -a $checkOut = '1' -a $tt = $firstTst ; then |
if test $sepDir = 0 -a $checkOut = '1' -a $tt = $firstTst ; then |
154 |
#-- cleaning: |
#-- cleaning: |
155 |
echo "======================" |
echo "======================" |
156 |
echo "Cleaning test directories:" |
echo "Cleaning test directories:" |
157 |
cmdCLN="./testreport -clean" |
cmdCLN="./testreport -clean" |
158 |
echo " clean dir running: $cmdCLN" |
echo " clean dir running: $cmdCLN" |
159 |
$cmdCLN > /dev/null 2>&1 |
$cmdCLN > /dev/null 2>&1 |
160 |
echo "======================" |
echo "======================" |
161 |
echo |
echo |
|
fi |
|
|
|
|
|
if test $typ = 'g77' |
|
|
then |
|
|
|
|
|
echo -n "Running testreport using:" |
|
|
comm="./testreport -a jmc@mitgcm.org" |
|
|
# comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
|
fi |
|
|
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
|
|
comm="$comm -mpi -command \"\$EXE\"" |
|
|
else echo '' ; fi |
|
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
|
echo " \"eval $comm\"" |
|
|
echo "======================" |
|
|
eval $comm > $tdir/output_$typ 2>&1 |
|
|
tail -100 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'gfo' |
|
|
then |
|
|
|
|
|
echo -n "Running testreport using:" |
|
|
comm="./testreport -a jmc@mitgcm.org" |
|
|
comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
|
fi |
|
|
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
|
|
comm="$comm -mpi -command \"\$EXE\"" |
|
|
else echo '' ; fi |
|
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
|
echo " \"eval $comm\"" |
|
|
echo "======================" |
|
|
eval $comm > $tdir/output_$typ 2>&1 |
|
|
tail -100 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'g7a' |
|
|
then |
|
|
|
|
|
echo -n "Running testreport using:" |
|
|
comm="./testreport -adm -a jmc@mitgcm.org" |
|
|
# comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
|
fi |
|
|
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
|
|
comm="$comm -mpi -command \"\$EXE\"" |
|
|
else echo '' ; fi |
|
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
|
echo " \"eval $comm\"" |
|
|
echo "======================" |
|
|
eval $comm > $tdir/output_$typ 2>&1 |
|
|
tail -60 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'adm' |
|
|
then |
|
|
|
|
|
echo -n "Running testreport using:" |
|
|
comm="./testreport -adm -a jmc@mitgcm.org" |
|
|
comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
|
fi |
|
|
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
|
|
comm="$comm -mpi -command \"\$EXE\"" |
|
|
else echo '' ; fi |
|
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
|
echo " \"eval $comm\"" |
|
|
echo "======================" |
|
|
eval $comm > $tdir/output_$typ 2>&1 |
|
|
tail -60 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'ifc' |
|
|
then |
|
|
|
|
|
source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64 |
|
|
echo -n "Running testreport using:" |
|
|
comm="./testreport -a jmc@mitgcm.org" |
|
|
# comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
|
fi |
|
|
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
|
|
comm="$comm -mpi -command \"\$EXE\"" |
|
|
else echo '' ; fi |
|
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
|
echo " \"eval $comm\"" |
|
|
echo "======================" |
|
|
eval $comm > $tdir/output_$typ 2>&1 |
|
|
tail -100 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'mth' |
|
|
then |
|
|
|
|
|
export OMP_NUM_THREADS=2 |
|
|
echo -n "Running testreport using:" |
|
|
comm="./testreport -mth -a jmc@mitgcm.org" |
|
|
comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
162 |
fi |
fi |
|
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
|
|
comm="$comm -mpi -command \"\$EXE\"" |
|
|
else echo '' ; fi |
|
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
|
echo " \"eval $comm\"" |
|
|
echo "======================" |
|
|
eval $comm > $tdir/output_$typ 2>&1 |
|
|
tail -100 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'pgi' |
|
|
then |
|
163 |
|
|
164 |
export PGI=/srv/software/pgi/pgi-10.9 |
#-- set specific Env Vars: |
165 |
export PATH="$PATH:$PGI/linux86-64/10.9/bin" |
if test $typ = 'ifc' ; then |
166 |
export LM_LICENSE_FILE=$PGI/license.dat |
source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64 |
|
echo -n "Running testreport using:" |
|
|
comm="./testreport -a jmc@mitgcm.org" |
|
|
# comm="$comm -match $MC" |
|
|
#comm="$comm -skd tutorial_advection_in_gyre" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
167 |
fi |
fi |
168 |
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
if test $typ = 'pgi' ; then |
169 |
comm="$comm -mpi -command \"\$EXE\"" |
export PGI=/srv/software/pgi/pgi-10.9 |
170 |
else echo '' ; fi |
export PATH="$PATH:$PGI/linux86-64/10.9/bin" |
171 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
export LM_LICENSE_FILE=$PGI/license.dat |
|
echo " \"eval $comm\"" |
|
|
echo "======================" |
|
|
eval $comm > $tdir/output_$typ 2>&1 |
|
|
tail -100 $tdir/output_${typ} |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
#-- MPI tests --- |
|
|
if test $typ = 'mpa' |
|
|
then |
|
|
|
|
|
EXE="mpirun -np 2 ./mitgcmuv_ad" |
|
|
echo -n "Running testreport using:" |
|
|
comm="./testreport -adm -a jmc@mitgcm.org" |
|
|
comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
172 |
fi |
fi |
|
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
|
|
comm="$comm -mpi -command \"\$EXE\"" |
|
|
else echo '' ; fi |
|
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
|
echo " \"eval $comm\"" |
|
|
echo "======================" |
|
|
eval $comm > $tdir/output_$typ 2>&1 |
|
|
tail -60 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'mpi' |
|
|
then |
|
173 |
|
|
174 |
|
#-- run the testreport command: |
175 |
echo -n "Running testreport using:" |
echo -n "Running testreport using:" |
|
comm="./testreport -a jmc@mitgcm.org" |
|
|
comm="$comm -match $MC" |
|
176 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
177 |
comm="$comm -of=$OPTFILE" |
comm="$comm -of=$OPTFILE" |
178 |
fi |
fi |
179 |
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
180 |
comm="$comm -mpi -command \"\$EXE\"" |
#comm="$comm -mpi -command \"\$EXE\"" |
181 |
|
comm="$comm -MPI 6 -command \"\$EXE\"" |
182 |
else echo '' ; fi |
else echo '' ; fi |
183 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
if test "x$option" != x ; then comm="$comm $option" ; fi |
184 |
|
#if test $typ = 'pgi' ; then comm="$comm -skd tutorial_advection_in_gyre" ; fi |
185 |
echo " \"eval $comm\"" |
echo " \"eval $comm\"" |
186 |
echo "======================" |
echo "======================" |
187 |
eval $comm > $tdir/output_$typ 2>&1 |
eval $comm > $tdir/output_$typ 2>&1 |
188 |
tail -100 $tdir/output_$typ |
tail $nbl $tdir/output_$typ |
189 |
echo |
echo |
190 |
|
|
191 |
fi |
#-- also test restart (test 2+2=4) |
192 |
|
if test $tt != $typ |
193 |
if test $typ = 'mp2' |
then |
194 |
then |
echo "testing restart using:" |
195 |
|
comm="../tools/do_tst_2+2 -a jmc@mitgcm.org" |
196 |
export OMP_NUM_THREADS=2 |
if test $MPI = 1 ; then |
197 |
echo -n "Running testreport using:" |
echo " \"$comm -mpi -exe $EXE\"" |
198 |
comm="./testreport -mth -a jmc@mitgcm.org" |
echo "======================" |
199 |
comm="$comm -match $MC" |
$comm -mpi -exe "$EXE" > $tdir/output_2+2 2>&1 |
200 |
if test "x$OPTFILE" != x ; then |
else |
201 |
comm="$comm -of=$OPTFILE" |
echo " \"$comm\"" |
202 |
|
echo "======================" |
203 |
|
$comm > $tdir/output_2+2 2>&1 |
204 |
|
fi |
205 |
|
#tail $nbl $tdir/output_2+2 |
206 |
|
echo ; cat tst_2+2_out.txt |
207 |
|
echo |
208 |
fi |
fi |
209 |
if test $MPI = 1 ; then echo " (EXE='$EXE')" |
export OMP_NUM_THREADS=1 |
|
comm="$comm -mpi -command \"\$EXE\"" |
|
|
else echo '' ; fi |
|
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
|
echo " \"eval $comm\"" |
|
|
echo "======================" |
|
|
eval $comm > $tdir/output_$typ 2>&1 |
|
|
tail -100 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
210 |
|
|
211 |
#-- also test restart (test 2+2=4) |
if test $sepDir = 0 ; then |
212 |
if test $tt != $typ |
#-- cleaning: |
213 |
then |
echo "======================" |
214 |
echo "testing restart using:" |
echo "Cleaning test directories:" |
215 |
comm="../tools/do_tst_2+2 -a jmc@mitgcm.org" |
if test $tt != $typ ; then |
216 |
if test $MPI = 1 ; then |
cmdCLN="../tools/do_tst_2+2 -clean" |
217 |
echo " \"$comm -mpi -exe $EXE\"" |
echo " clean tst_2+2 running: $cmdCLN" |
218 |
echo "======================" |
$cmdCLN >> $tdir/output_2+2 2>&1 |
219 |
$comm -mpi -exe "$EXE" > $tdir/output_2+2 2>&1 |
fi |
220 |
else |
if test $tt != $last_Tst ; then |
221 |
echo " \"$comm\"" |
cmdCLN="./testreport -clean" |
222 |
echo "======================" |
echo " clean dir running: $cmdCLN" |
223 |
$comm > $tdir/output_2+2 2>&1 |
$cmdCLN > /dev/null 2>&1 |
224 |
fi |
fi |
225 |
#tail -100 $tdir/output_2+2 |
echo "======================" |
|
echo ; cat tst_2+2_out.txt |
|
226 |
echo |
echo |
227 |
fi |
fi |
|
export OMP_NUM_THREADS=1 |
|
|
|
|
|
if test $sepDir = 0 ; then |
|
|
#-- cleaning: |
|
|
echo "======================" |
|
|
echo "Cleaning test directories:" |
|
|
if test $tt != $typ ; then |
|
|
cmdCLN="../tools/do_tst_2+2 -clean" |
|
|
echo " clean tst_2+2 running: $cmdCLN" |
|
|
$cmdCLN >> $tdir/output_2+2 2>&1 |
|
|
fi |
|
|
if test $tt != $last_Tst ; then |
|
|
cmdCLN="./testreport -clean" |
|
|
echo " clean dir running: $cmdCLN" |
|
|
$cmdCLN > /dev/null 2>&1 |
|
|
fi |
|
|
echo "======================" |
|
|
echo |
|
|
fi |
|
228 |
popd |
popd |
229 |
|
|
230 |
done |
done |