/[MITgcm]/MITgcm_contrib/test_scripts/ref_machine/test_batsi
ViewVC logotype

Diff of /MITgcm_contrib/test_scripts/ref_machine/test_batsi

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by jmc, Thu Dec 20 23:31:07 2018 UTC revision 1.17 by jmc, Sun Jan 28 16:23:48 2024 UTC
# Line 34  ulimit -s unlimited Line 34  ulimit -s unlimited
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'
# Line 198  do Line 196  do
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
210      date ; echo "day is over => skip test $typ"      date ; echo "day is over => skip test $typ"
211      continue      continue
212    fi    fi
213    if [ $curHour -ge 18 ] ; then    if [ $curHour -ge 22 ] ; then
214      date ; echo "too late to run test $typ"      date ; echo "too late to run test $typ"
215      continue      continue
216    fi    fi
# Line 235  do Line 231  do
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 )
# Line 305  do Line 301  do
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
# Line 323  do Line 319  do
319  #-- set the testreport command:  #-- set the testreport command:
320    comm="./testreport"    comm="./testreport"
321    if test $typ = 'g7a' -o  $typ = 'adm' -o  $typ = 'mpa' ; then    if test $typ = 'g7a' -o  $typ = 'adm' -o  $typ = 'mpa' ; then
322      comm="$comm -adm"     #comm="$comm -adm"
323        comm="$comm -adm -ncad"
324    elif test $typ = 'oad' ; then    elif test $typ = 'oad' ; then
325      comm="$comm -oad"      comm="$comm -oad"
326    elif test $typ = 'tlm' ; then    elif test $typ = 'tlm' ; then
# Line 340  do Line 337  do
337    MPI=0    MPI=0
338    case $typ in    case $typ in
339     'g77'|'g7a')         OPTFILE='../tools/build_options/linux_amd64_g77' ;;     'g77'|'g7a')         OPTFILE='../tools/build_options/linux_amd64_g77' ;;
340     'gfo'|'adm'|'oad'|'tlm'|'mth') comm="$comm -match $MC -devel"     'gfo'|'adm'|'oad'|'tlm'|'mth') comm="$comm -devel"
341                            #comm="$comm -match $MC"
342                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;
343     'ifc')               comm="$comm -devel"     'ifc')               comm="$comm -devel"
344                          OPTFILE='../tools/build_options/linux_amd64_ifort11' ;;                          OPTFILE='../tools/build_options/linux_amd64_ifort11' ;;
345     'pgi')               OPTFILE='../tools/build_options/linux_amd64_pgf77' ;;     'pgi')               OPTFILE='../tools/build_options/linux_amd64_pgf77' ;;
346     'mpa'|'mpi'|'mp2')   comm="$comm -match $MC -devel" ; MPI=8     'mpa'|'mpi'|'mp2')   comm="$comm -devel"
347                            if test $typ = 'mp2' ; then MPI=3 ; else MPI=8 ; fi
348                            #comm="$comm -match $MC"
349                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;
350         *)               OPTFILE= ;;         *)               OPTFILE= ;;
351    esac    esac
352  #-- set MPI command:    if test $typ = 'g7a' ; then
353    if test $MPI != 0 ; then      #- pkg/ecco does not compile with g77 + no NetCDF here => no pkg/profiles
354      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  
355    fi    fi
356    #-- set MPI command: Use default (Dec 2020) which is the same since testreport update on Sep 2013
357  #-- set specific Env Vars:  #-- set specific Env Vars:
358    if test $typ = 'oad' ; then    if test $typ = 'oad' ; then
359      #- for some reasons, "source ScriptFile | tee -a LogFile"      #- for some reasons, "source ScriptFile | tee -a LogFile"
# Line 391  do Line 386  do
386    if test "x$OPTFILE" != x ; then    if test "x$OPTFILE" != x ; then
387      comm="$comm -of=$OPTFILE"      comm="$comm -of=$OPTFILE"
388    fi    fi
389    if test $MPI = 0 ; then  echo ''      | tee -a $tdir/output_$tt    echo ''                               | tee -a $tdir/output_$tt
390    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  
391    if test "x$option" != x ; then comm="$comm $option" ; fi    if test "x$option" != x ; then comm="$comm $option" ; fi
392   #if test $typ = 'pgi' ; then comm="$comm -t \"\$listT\"" ; fi   #if test $typ = 'pgi' ; then comm="$comm -t \"\$listT\"" ; fi
393    echo "  \"eval $comm\""               | tee -a $tdir/output_$tt    echo "  \"eval $comm\""               | tee -a $tdir/output_$tt
# Line 413  do Line 406  do
406        echo "======================"        echo "======================"
407        $comm >> $tdir/output_$tt 2>&1        $comm >> $tdir/output_$tt 2>&1
408      else      else
409        echo "  \"$comm -mpi -exe $EXE\"" | tee -a $tdir/output_$tt        echo "  \"$comm -mpi\""           | tee -a $tdir/output_$tt
410        echo "======================"        echo "======================"
411        $comm -mpi -exe "$EXE" >> $tdir/output_$tt 2>&1        $comm -mpi >> $tdir/output_$tt 2>&1
412      fi      fi
413      echo ; cat tst_2+2_out.txt      echo ; cat tst_2+2_out.txt
414      echo      echo

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.22