| 36 |
#- Turn off stack limit for FIZHI & AD-tests |
#- Turn off stack limit for FIZHI & AD-tests |
| 37 |
ulimit -s unlimited |
ulimit -s unlimited |
| 38 |
#- method to acces CVS: |
#- method to acces CVS: |
| 39 |
cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q' |
cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q' |
| 40 |
|
#- and which GitHub repository to use: |
| 41 |
|
git_repo='MITgcm'; git_code='MITgcm' |
| 42 |
|
#git_repo='altMITgcm'; #git_code='MITgcm66h' |
| 43 |
|
#- other settings: |
| 44 |
|
tmpFil="/tmp/"`basename $0`".$$" |
| 45 |
|
mAddr='jm_c@mitgcm.org' |
| 46 |
|
|
| 47 |
#-- for now, cannot mix ifort/gfortran tests: |
#-- for now, cannot mix ifort/gfortran tests: |
| 48 |
gfort=1 |
gfort=1 |
| 69 |
for tt in $tst_list |
for tt in $tst_list |
| 70 |
do |
do |
| 71 |
|
|
| 72 |
|
gcmDIR="MITgcm_$tt" |
| 73 |
echo "==========================================================================" |
echo "==========================================================================" |
| 74 |
# set -x |
# set -x |
| 75 |
rm -f tr_clean_$tt.log |
rm -f tr_clean_$tt.log |
| 76 |
echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$? |
echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$? |
| 77 |
echo " testing tt= $tt , fwd= $fwd" |
echo " testing tt= $tt , fwd= $fwd" |
| 78 |
if test -d MITgcm_$tt/verification ; then |
if test -e $gcmDIR/.git/config -a -d $gcmDIR/verification ; then |
| 79 |
#- cleaning previous testreport run and updating the code: |
#- cleaning previous testreport run and updating the code: |
| 80 |
if [ $fwd -eq 0 ] ; then |
if [ $fwd -eq 0 ] ; then |
| 81 |
set -x |
set -x |
| 82 |
#- cleanup previous test: |
#- cleanup previous test: |
| 83 |
( cd MITgcm_$tt/verification ; ./testreport -adm -clean > ../../tr_clean_$tt.log 2>&1 ) |
( cd $gcmDIR/verification ; ./testreport -adm -clean > ../../tr_clean_$tt.log 2>&1 ) |
| 84 |
set +x |
set +x |
| 85 |
else |
else |
| 86 |
set -x |
set -x |
| 87 |
#- cleanup previous restart: |
#- cleanup previous restart: |
| 88 |
( cd MITgcm_$tt/verification ; ../tools/do_tst_2+2 -clean > ../../tr_clean_$tt.log 2>&1 ) |
( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean > ../../tr_clean_$tt.log 2>&1 ) |
| 89 |
#- cleanup previous test: |
#- cleanup previous test: |
| 90 |
( cd MITgcm_$tt/verification ; ./testreport -clean >> ../../tr_clean_$tt.log 2>&1 ) |
( cd $gcmDIR/verification ; ./testreport -clean >> ../../tr_clean_$tt.log 2>&1 ) |
| 91 |
set +x |
set +x |
| 92 |
fi |
fi |
| 93 |
if [ $gfort -eq 0 ] ; then |
if [ $gfort -eq 0 ] ; then |
| 94 |
echo ' remove all Makefile_syntax and do "cvs update -P -d"' >> tr_clean_$tt.log |
echo ' remove all Makefile_syntax' >> tr_clean_$tt.log |
| 95 |
( cd MITgcm_$tt/verification ; rm -f */build/Makefile_syntax ) |
( cd $gcmDIR/verification ; rm -f */build/Makefile_syntax ) |
|
else |
|
|
echo " run '$cmdCVS update -P -d'" >> tr_clean_$tt.log |
|
| 96 |
fi |
fi |
| 97 |
echo "" |
echo "" >> tr_clean_$tt.log |
| 98 |
|
|
| 99 |
echo "==========================================================================" |
echo "==========================================================================" \ |
| 100 |
|
>> tr_clean_$tt.log |
| 101 |
|
echo " Update MITgcm code in dir: $gcmDIR using 'git pull':" | tee -a tr_clean_$tt.log |
| 102 |
set -x |
set -x |
| 103 |
#- update the code: |
#- update the code: |
| 104 |
( cd MITgcm_$tt ; $cmdCVS update -P -d >> ../tr_clean_$tt.log 2>&1 ; retv=$? ) |
( cd $gcmDIR ; git checkout master ; git pull ) >> tr_clean_$tt.log 2>&1 ; retv=$? |
| 105 |
set +x |
set +x |
| 106 |
if test $retv != 0 ; then |
if test $retv != 0 ; then |
| 107 |
echo "cvs update in MITgcm_$tt fail (return val=$retv) => skip" | tee -a tr_clean_$tt.log |
echo "'git pull' in $gcmDIR fail (return val=$retv) => skip" | tee -a tr_clean_$tt.log |
| 108 |
continue |
continue |
| 109 |
fi |
fi |
| 110 |
else |
else |
| 111 |
|
echo "Missing '$gcmDIR/.git/config' or dir '$gcmDIR/verification'" >> tr_clean_$tt.log |
| 112 |
|
if test -e $gcmDIR ; then |
| 113 |
|
echo -n " removing working copy: $gcmDIR ..." >> tr_clean_$tt.log |
| 114 |
|
rm -rf $gcmDIR |
| 115 |
|
echo " done" >> tr_clean_$tt.log |
| 116 |
|
fi |
| 117 |
#- download new code: |
#- download new code: |
| 118 |
echo " run '$cmdCVS co -P -d MITgcm_$tt MITgcm'" >> tr_clean_$tt.log |
echo "==========================================================================" \ |
| 119 |
echo "==========================================================================" |
>> tr_clean_$tt.log |
| 120 |
|
echo "Make a clone of $git_code from repo: $git_repo into: $gcmDIR ..." | tee -a tr_clean_$tt.log |
| 121 |
set -x |
set -x |
| 122 |
$cmdCVS co -P -d MITgcm_$tt MITgcm >> tr_clean_$tt.log 2>&1 ; retv=$? |
git clone https://github.com/$git_repo/${git_code}.git $gcmDIR 2> $tmpFil |
| 123 |
|
retv=$? |
| 124 |
set +x |
set +x |
| 125 |
if test $retv != 0 ; then |
if test $retv = 0 ; then |
| 126 |
echo "cvs co of MITgcm_$tt fail (return val=$retv) => skip" | tee -a tr_clean_$tt.log |
echo ' done' >> tr_clean_$tt.log ; rm -f $tmpFil |
| 127 |
|
else |
| 128 |
|
echo "'git clone' into $gcmDIR failed (return: $retv) => skip" | tee -a tr_clean_$tt.log |
| 129 |
|
cat $tmpFil >> tr_clean_$tt.log ; rm -f $tmpFil |
| 130 |
continue |
continue |
| 131 |
fi |
fi |
| 132 |
fi |
fi |
| 133 |
echo "" |
echo "" |
| 134 |
echo "==========================================================================" |
echo "==========================================================================" |
| 135 |
|
|
| 136 |
if test -d MITgcm_$tt/verification ; then |
if test -d $gcmDIR/verification ; then |
| 137 |
if test -e tr_run_$tt.log ; then mv -f tr_run_$tt.log tr_run_$tt.log_bak ; fi |
if test -e tr_run_$tt.log ; then mv -f tr_run_$tt.log tr_run_$tt.log_bak ; fi |
| 138 |
cd MITgcm_$tt/verification |
cd $gcmDIR/verification |
| 139 |
|
|
| 140 |
date |
date |
| 141 |
# verbose mode: |
# verbose mode: |
| 151 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 152 |
|
|
| 153 |
./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
| 154 |
-devel -q -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -q -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 155 |
|
|
| 156 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 157 |
;; |
;; |
| 163 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 164 |
|
|
| 165 |
./testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
./testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
| 166 |
-devel -q -match 5 -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -q -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 167 |
|
|
| 168 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 169 |
;; |
;; |
| 178 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 179 |
|
|
| 180 |
./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \ |
./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \ |
| 181 |
-devel -q -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -q -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 182 |
|
|
| 183 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 184 |
|
|
| 185 |
#- test restart: |
#- test restart: |
| 186 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 187 |
../tools/do_tst_2+2 -mpi -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 188 |
;; |
;; |
| 189 |
|
|
| 190 |
'iur4') |
'iur4') |
| 194 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 195 |
|
|
| 196 |
./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \ |
./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \ |
| 197 |
-devel -q -match 5 -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -q -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 198 |
|
|
| 199 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 200 |
|
|
| 201 |
#- test restart: |
#- test restart: |
| 202 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 203 |
../tools/do_tst_2+2 -mpi -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 204 |
;; |
;; |
| 205 |
|
|
| 206 |
'gadm') |
'gadm') |
| 207 |
|
|
| 208 |
./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \ |
./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \ |
| 209 |
-devel -ncad -nc -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -ncad -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 210 |
|
|
| 211 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 212 |
;; |
;; |
| 214 |
'gads') |
'gads') |
| 215 |
|
|
| 216 |
./testreport -adm -of ../tools/build_options/linux_amd64_gfortran \ |
./testreport -adm -of ../tools/build_options/linux_amd64_gfortran \ |
| 217 |
-devel -ncad -nc -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -ncad -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 218 |
|
|
| 219 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 220 |
;; |
;; |
| 222 |
'gad4') |
'gad4') |
| 223 |
|
|
| 224 |
./testreport -adm -ur4 -of ../tools/build_options/linux_amd64_gfortran \ |
./testreport -adm -ur4 -of ../tools/build_options/linux_amd64_gfortran \ |
| 225 |
-devel -ncad -nc -match 5 -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -ncad -nc -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 226 |
|
|
| 227 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 228 |
;; |
;; |
| 233 |
export GOMP_STACKSIZE=400m |
export GOMP_STACKSIZE=400m |
| 234 |
|
|
| 235 |
./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \ |
./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \ |
| 236 |
-devel -nc -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 237 |
|
|
| 238 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 239 |
|
|
| 240 |
#- test restart: |
#- test restart: |
| 241 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 242 |
../tools/do_tst_2+2 -mpi -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 243 |
;; |
;; |
| 244 |
|
|
| 245 |
'gmpi') |
'gmpi') |
| 246 |
|
|
| 247 |
./testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \ |
./testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \ |
| 248 |
-devel -nc -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 249 |
|
|
| 250 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 251 |
|
|
| 252 |
#- test restart: |
#- test restart: |
| 253 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 254 |
../tools/do_tst_2+2 -mpi -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 255 |
;; |
;; |
| 256 |
|
|
| 257 |
'gmp4') |
'gmp4') |
| 258 |
|
|
| 259 |
./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_gfortran \ |
./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_gfortran \ |
| 260 |
-devel -nc -match 5 -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -nc -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 261 |
|
|
| 262 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 263 |
|
|
| 264 |
#- test restart: |
#- test restart: |
| 265 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 266 |
../tools/do_tst_2+2 -mpi -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 267 |
;; |
;; |
| 268 |
|
|
| 269 |
'gfo') |
'gfo') |
| 270 |
|
|
| 271 |
./testreport -of ../tools/build_options/linux_amd64_gfortran \ |
./testreport -of ../tools/build_options/linux_amd64_gfortran \ |
| 272 |
-devel -nc -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 273 |
|
|
| 274 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 275 |
|
|
| 276 |
#- test restart: |
#- test restart: |
| 277 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 278 |
../tools/do_tst_2+2 -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
../tools/do_tst_2+2 -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 279 |
;; |
;; |
| 280 |
|
|
| 281 |
'gfo4') |
'gfo4') |
| 282 |
|
|
| 283 |
./testreport -ur4 -of ../tools/build_options/linux_amd64_gfortran \ |
./testreport -ur4 -of ../tools/build_options/linux_amd64_gfortran \ |
| 284 |
-devel -nc -match 5 -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-devel -nc -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 285 |
|
|
| 286 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 287 |
|
|
| 288 |
#- test restart: |
#- test restart: |
| 289 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 290 |
../tools/do_tst_2+2 -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
../tools/do_tst_2+2 -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 291 |
;; |
;; |
| 292 |
|
|
| 293 |
'g77') |
'g77') |
| 294 |
|
|
| 295 |
./testreport -of ../tools/build_options/linux_amd64_g77 \ |
./testreport -of ../tools/build_options/linux_amd64_g77 \ |
| 296 |
-skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \ |
-skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \ |
| 297 |
-nc -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
-nc -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 298 |
|
|
| 299 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
| 300 |
|
|
| 301 |
#- test restart: |
#- test restart: |
| 302 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
| 303 |
../tools/do_tst_2+2 -a jm_c@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
../tools/do_tst_2+2 -a $mAddr >> ../../tr_run_$tt.log 2>&1 |
| 304 |
;; |
;; |
| 305 |
|
|
| 306 |
*) echo "unrecognized test suffix '$tt' <== skipped" ;; |
*) echo "unrecognized test suffix '$tt' <== skipped" ;; |
| 310 |
cd ../.. |
cd ../.. |
| 311 |
|
|
| 312 |
else |
else |
| 313 |
echo "error: missing dir MITgcm_$tt/verification" |
echo "error: missing dir $gcmDIR/verification" |
| 314 |
fi |
fi |
| 315 |
|
|
| 316 |
done |
done |