| 34 |
#git_repo="git://github.com/$git_repo" |
#git_repo="git://github.com/$git_repo" |
| 35 |
#git_repo="git@github.com:$git_repo" |
#git_repo="git@github.com:$git_repo" |
| 36 |
|
|
| 37 |
|
#------------------------------------------------------------------- |
| 38 |
# checkOut=3 : clone from GitHub and make a new copy (if sepDir) |
# checkOut=3 : clone from GitHub and make a new copy (if sepDir) |
| 39 |
# =2 : update (git pull) repo and make a new copy code (switch to 2 if no repo) |
# =2 : update (git pull) repo and make a new copy code (switch to 3 if no repo) |
| 40 |
# =1 : skip update but use a new copy (if sepDir) |
# =1 : skip update but use a new copy (if sepDir) |
| 41 |
# =0 : use existing test code ( switch to 1 if missing test code ) |
# =0 : use existing test code ( switch to 1 if missing test code ) |
| 42 |
dInWeek=`date +%a` |
dInWeek=`date +%a` |
| 43 |
|
|
| 44 |
dNam=`hostname -s | tr '[:upper:]' '[:lower:]'` |
dNam=`hostname -s | tr '[:upper:]' '[:lower:]'` |
| 45 |
TESTDIR="$HOME/test_${dNam}" |
TESTDIR="$HOME/test_${dNam}" |
|
outDir=$dNam |
|
|
MC=11 |
|
| 46 |
#TESTDIR="/scratch/jmc/test_${dNam}" |
#TESTDIR="/scratch/jmc/test_${dNam}" |
| 47 |
#outDir="${dNam}-${tst_grp}" |
#MC=13 ; outDir="${dNam}-${tst_grp}" |
| 48 |
#MC=13 |
MC=11 ; outDir=$dNam |
| 49 |
sepDir=1 |
sepDir=1 |
| 50 |
option= |
option= |
| 51 |
|
|
| 52 |
if test $tst_grp = 'a' ; then |
if test $tst_grp = 'a' ; then |
| 53 |
checkOut=2 |
checkOut=2 |
| 54 |
#tst_list='g7a mpa mth mp2+rs mpi oad' |
tst_list='' |
| 55 |
tst_list='mpa adm mpi gfo+rs mth+rs' |
tst_list="$tst_list mpa adm mpi" |
| 56 |
#tst_list="$tst_list oad" |
tst_list="$tst_list mth+rs gfo+rs" |
| 57 |
else |
else |
| 58 |
checkOut=1 |
checkOut=1 |
| 59 |
tst_list='adm g77 gfo+rs ifc' |
tst_list='adm g77 gfo+rs ifc' |
| 196 |
#- define list of additional experiences to test: |
#- define list of additional experiences to test: |
| 197 |
addExp='' |
addExp='' |
| 198 |
if test $typ = 'mpi' ; then |
if test $typ = 'mpi' ; then |
| 199 |
addExp="offline_cheapaml atm_gray" |
addExp="offline_cheapaml atm_gray atm_strato" |
| 200 |
|
addExp="$addExp global_ocean.gm_k3d" |
| 201 |
|
addExp="$addExp global_ocean.gm_res" |
| 202 |
|
addExp="$addExp global_oce_cs32" |
| 203 |
fi |
fi |
| 204 |
if test $typ = 'gfo' -o $typ = 'ifc' ; then |
if test $typ = 'gfo' -o $typ = 'ifc' ; then |
|
addExp="$addExp global_oce_biogeo_bling" |
|
| 205 |
addExp="$addExp shelfice_remeshing" |
addExp="$addExp shelfice_remeshing" |
| 206 |
fi |
fi |
|
if test $typ = 'mpi' ; then |
|
|
addExp="$addExp global_ocean.gm_k3d" |
|
|
addExp="$addExp global_oce_cs32" |
|
|
fi |
|
| 207 |
#- check day and time: |
#- check day and time: |
| 208 |
curDay=`date +%d` ; curHour=`date +%H` |
curDay=`date +%d` ; curHour=`date +%H` |
| 209 |
if [ $curDay -ne $TODAY ] ; then |
if [ $curDay -ne $TODAY ] ; then |
| 231 |
if test $sepDir = 1 ; then |
if test $sepDir = 1 ; then |
| 232 |
new_dir="MITgcm_$typ" |
new_dir="MITgcm_$typ" |
| 233 |
reUse=0 ; if [ $checkOut -le 0 ] ; then reUse=1 ; fi |
reUse=0 ; if [ $checkOut -le 0 ] ; then reUse=1 ; fi |
| 234 |
if test -d $new_dir/CVS -a $reUse = 1 ; then |
if test -d $new_dir/doc -a $reUse = 1 ; then |
| 235 |
cd $tdir/$new_dir |
cd $tdir/$new_dir |
| 236 |
if test $tt != $typ ; then |
if test $tt != $typ ; then |
| 237 |
( cd verification ; ../tools/do_tst_2+2 -clean ) |
( cd verification ; ../tools/do_tst_2+2 -clean ) |
| 301 |
( cd verification ; ln -s ../$git_other/$exp2add . ) |
( cd verification ; ln -s ../$git_other/$exp2add . ) |
| 302 |
if test $exp2add = 'global_oce_cs32' ; then |
if test $exp2add = 'global_oce_cs32' ; then |
| 303 |
echo " link dir 'other_input/core2_cnyf' in here" | tee -a $tdir/output_$tt |
echo " link dir 'other_input/core2_cnyf' in here" | tee -a $tdir/output_$tt |
| 304 |
( cd verification/${exp2add} |
( cd ${git_other}/${exp2add} |
| 305 |
ln -s ../../../other_input/core2_cnyf . ) |
ln -s ../../../other_input/core2_cnyf . ) |
| 306 |
fi |
fi |
| 307 |
#if test $exp2add = 'shelfice_remeshing' ; then |
#if test $exp2add = 'shelfice_remeshing' ; then |
| 308 |
# echo " link dir 'other_input/remeshing_code' to 'extra_code'" | tee -a $tdir/output_$tt |
# echo " link dir 'other_input/remeshing_code' to 'extra_code'" | tee -a $tdir/output_$tt |
| 309 |
# ( cd verification/${exp2add} |
# ( cd ${git_other}/${exp2add} |
| 310 |
# ln -s ../../../other_input/remeshing_code extra_code ) |
# ln -s ../../../other_input/remeshing_code extra_code ) |
| 311 |
#fi |
#fi |
| 312 |
done |
done |
| 336 |
MPI=0 |
MPI=0 |
| 337 |
case $typ in |
case $typ in |
| 338 |
'g77'|'g7a') OPTFILE='../tools/build_options/linux_amd64_g77' ;; |
'g77'|'g7a') OPTFILE='../tools/build_options/linux_amd64_g77' ;; |
| 339 |
'gfo'|'adm'|'oad'|'tlm'|'mth') comm="$comm -match $MC -devel" |
'gfo'|'adm'|'oad'|'tlm'|'mth') comm="$comm -devel" |
| 340 |
|
#comm="$comm -match $MC" |
| 341 |
OPTFILE='../tools/build_options/linux_amd64_gfortran' ;; |
OPTFILE='../tools/build_options/linux_amd64_gfortran' ;; |
| 342 |
'ifc') comm="$comm -devel" |
'ifc') comm="$comm -devel" |
| 343 |
OPTFILE='../tools/build_options/linux_amd64_ifort11' ;; |
OPTFILE='../tools/build_options/linux_amd64_ifort11' ;; |
| 344 |
'pgi') OPTFILE='../tools/build_options/linux_amd64_pgf77' ;; |
'pgi') OPTFILE='../tools/build_options/linux_amd64_pgf77' ;; |
| 345 |
'mpa'|'mpi'|'mp2') comm="$comm -match $MC -devel" ; MPI=8 |
'mpa'|'mpi'|'mp2') comm="$comm -devel" |
| 346 |
|
if test $typ = 'mp2' ; then MPI=3 ; else MPI=8 ; fi |
| 347 |
|
#comm="$comm -match $MC" |
| 348 |
OPTFILE='../tools/build_options/linux_amd64_gfortran' ;; |
OPTFILE='../tools/build_options/linux_amd64_gfortran' ;; |
| 349 |
*) OPTFILE= ;; |
*) OPTFILE= ;; |
| 350 |
esac |
esac |
| 351 |
#-- set MPI command: |
if test $typ = 'g7a' ; then |
| 352 |
if test $MPI != 0 ; then |
#- pkg/ecco does not compile with g77 + no NetCDF here => no pkg/profiles |
| 353 |
if test $typ = 'mp2' ; then MPI=3 ; fi |
comm="$comm -skd global_oce_biogeo_bling" |
|
if test $typ = 'mpa' ; then |
|
|
EXE="mpirun -np TR_NPROC ./mitgcmuv_ad" |
|
|
else |
|
|
EXE="mpirun -np TR_NPROC ./mitgcmuv" |
|
|
fi |
|
| 354 |
fi |
fi |
| 355 |
|
#-- set MPI command: Use default (Dec 2020) which is the same since testreport update on Sep 2013 |
| 356 |
#-- set specific Env Vars: |
#-- set specific Env Vars: |
| 357 |
if test $typ = 'oad' ; then |
if test $typ = 'oad' ; then |
| 358 |
#- for some reasons, "source ScriptFile | tee -a LogFile" |
#- for some reasons, "source ScriptFile | tee -a LogFile" |
| 385 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
| 386 |
comm="$comm -of=$OPTFILE" |
comm="$comm -of=$OPTFILE" |
| 387 |
fi |
fi |
| 388 |
if test $MPI = 0 ; then echo '' | tee -a $tdir/output_$tt |
echo '' | tee -a $tdir/output_$tt |
| 389 |
else echo " (EXE='$EXE')" | tee -a $tdir/output_$tt |
if test $MPI != 0 ; then comm="$comm -MPI $MPI" ; fi |
|
comm="$comm -MPI $MPI -command \"\$EXE\"" |
|
|
fi |
|
| 390 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
if test "x$option" != x ; then comm="$comm $option" ; fi |
| 391 |
#if test $typ = 'pgi' ; then comm="$comm -t \"\$listT\"" ; fi |
#if test $typ = 'pgi' ; then comm="$comm -t \"\$listT\"" ; fi |
| 392 |
echo " \"eval $comm\"" | tee -a $tdir/output_$tt |
echo " \"eval $comm\"" | tee -a $tdir/output_$tt |
| 405 |
echo "======================" |
echo "======================" |
| 406 |
$comm >> $tdir/output_$tt 2>&1 |
$comm >> $tdir/output_$tt 2>&1 |
| 407 |
else |
else |
| 408 |
echo " \"$comm -mpi -exe $EXE\"" | tee -a $tdir/output_$tt |
echo " \"$comm -mpi\"" | tee -a $tdir/output_$tt |
| 409 |
echo "======================" |
echo "======================" |
| 410 |
$comm -mpi -exe "$EXE" >> $tdir/output_$tt 2>&1 |
$comm -mpi >> $tdir/output_$tt 2>&1 |
| 411 |
fi |
fi |
| 412 |
echo ; cat tst_2+2_out.txt |
echo ; cat tst_2+2_out.txt |
| 413 |
echo |
echo |