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

Diff of /MITgcm_contrib/test_scripts/ref_machine/test_baudelaire

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

revision 1.1 by jmc, Wed Jan 31 23:33:23 2018 UTC revision 1.19 by jmc, Mon Dec 23 18:57:47 2019 UTC
# Line 22  ulimit -s unlimited Line 22  ulimit -s unlimited
22    export MPI_INC_DIR=$MPI_GCC_DIR/include    export MPI_INC_DIR=$MPI_GCC_DIR/include
23    export PATH="$PATH:$MPI_GCC_DIR/bin"    export PATH="$PATH:$MPI_GCC_DIR/bin"
24    
25  #- method to acces CVS:  #- method to access CVS:
26    cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack'    cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack'
27    cmdCVS='cvs -d /u/gcmpack'    cmdCVS='cvs -d /u/gcmpack'
28  # export CVS_RSH=ssh  # export CVS_RSH=ssh
29  # cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack'  # cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack'
30    
31  #- and which GitHub repository to use:  #- which GitHub repository to use and how to access it:
32    git_repo='MITgcm' ; git_code='MITgcm'    git_repo='MITgcm';  git_code='MITgcm' ; git_other='verification_other'
33  # git_repo='altMITgcm' ; git_code='MITgcm66h'   #git_repo='altMITgcm'; #git_code='MITgcm66h'
34    #--
35     #git_repo="https://github.com/$git_repo"
36      git_repo="git://github.com/$git_repo"
37     #git_repo="git@github.com:$git_repo"
38    
39    #-------------------------------------------------------------------
40  # checkOut=3 : clone from GitHub and make a new copy (if sepDir)  # checkOut=3 : clone from GitHub and make a new copy (if sepDir)
41  #   =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)
42  #   =1 : skip update             but use a new copy  (if sepDir)  #   =1 : skip update             but use a new copy  (if sepDir)
43  #   =0 : use existing test code ( switch to 1 if missing test code )  #   =0 : use existing test code ( switch to 1 if missing test code )
44  dInWeek=`date +%a`  dInWeek=`date +%a`
45    
46  dNam=`hostname -s | tr '[:upper:]' '[:lower:]'`  dNam=`hostname -s | tr '[:upper:]' '[:lower:]'`
47  #TESTDIR="$HOME/test_${dNam}"  #TESTDIR="$HOME/test_${dNam}"
 #outDir=$dNam  
 #MC=11  
48   TESTDIR="/scratch/jmc/test_${dNam}"   TESTDIR="/scratch/jmc/test_${dNam}"
49   outDir="${dNam}-${tst_grp}"   MC=13 ; outDir="${dNam}-${tst_grp}"
50   MC=13   MC=11 ;#outDir=$dNam
51  sepDir=1  sepDir=1
52  option=  option=
53    
54  if test $tst_grp = 'a' ; then  if test $tst_grp = 'a' ; then
55   checkOut=2   checkOut=2
56   tst_list='g7a mpa mth mp2+rs mpi oad'   tst_list='mth mp2+rs mpi oad g77'
57  #tst_list='mpa adm mpi gfo+rs mth+rs'  #tst_list='mpa adm mpi gfo+rs mth+rs'
58  #tst_list="$tst_list oad"  #tst_list="$tst_list oad"
59  else  else
60   checkOut=1   checkOut=1
61   tst_list='adm g77 gfo+rs ifc'   tst_list='adm gfo+rs ifc'
62   if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm" ; fi  #if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm" ; fi
63  fi  fi
64  echo " test: $outDir ; list='$tst_list'"  echo " test: $outDir ; list='$tst_list'"
65    
# Line 93  if [ $checkOut -ge 2 ] ; then Line 96  if [ $checkOut -ge 2 ] ; then
96    cd $tdir    cd $tdir
97    
98    #---- Making a new clone or updating existing one:    #---- Making a new clone or updating existing one:
99    if test -e MITgcm/.git/config ; then    if [ $checkOut -eq 2 ] ; then
100      echo MITgcm/.git/config 'exist'      if test -e $git_code/.git/config ; then
101    else         echo $git_code/.git/config 'exist'
102      echo -n MITgcm/.git/config 'missing ; '      else
103      checkOut=3         echo -n $git_code/.git/config 'missing ; '
104      echo "will get new clone ( checkOut=$checkOut )"         checkOut=3
105           echo "will get new clone ( checkOut=$checkOut )"
106        fi
107        if test -e $git_other/.git/config ; then
108           echo $git_other/.git/config 'exist'
109        else
110           echo -n $git_other/.git/config 'missing ; '
111           checkOut=3
112           echo "will get new clone ( checkOut=$checkOut )"
113        fi
114    fi    fi
115    if [ $checkOut -eq 3 ] ; then    if [ $checkOut -eq 3 ] ; then
116      echo -n "Make a clone of $git_code from repo: $git_repo ..."      test -e $git_code && rm -rf $git_code
117      git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil      echo "Make a clone of $git_code from repo: $git_repo ..."
118        git clone $git_repo/${git_code}.git 2> $tmpFil
119        retVal=$?
120        if test $retVal = 0 ; then
121           echo ' --> done!'
122           rm -f $tmpFil
123        else
124           echo " Error: 'git clone' returned: $retVal"
125           cat $tmpFil
126           rm -f $tmpFil
127           exit 2
128        fi
129        test -e $git_other && rm -rf $git_other
130        echo "Make a clone of $git_other from repo: $git_repo ..."
131        git clone $git_repo/${git_other}.git 2> $tmpFil
132      retVal=$?      retVal=$?
133      if test $retVal = 0 ; then      if test $retVal = 0 ; then
134         echo ' --> done!'         echo ' --> done!'
# Line 116  if [ $checkOut -ge 2 ] ; then Line 142  if [ $checkOut -ge 2 ] ; then
142    else    else
143      echo "Updating current clone ( $git_code ) ..."      echo "Updating current clone ( $git_code ) ..."
144      ( cd $git_code ; git pull )      ( cd $git_code ; git pull )
145      echo ' --> done!'      retVal=$?
146        if test $retVal = 0 ; then
147           echo ' --> done!'
148        else
149           echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
150           exit 3
151        fi
152        ( cd $git_code ; git checkout master -- . )
153        echo "Updating current clone ( $git_other ) ..."
154        ( cd $git_other ; git pull )
155        retVal=$?
156        if test $retVal = 0 ; then
157           echo ' --> done!'
158        else
159           echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
160           exit 3
161        fi
162        ( cd $git_other ; git checkout master -- . )
163    fi    fi
   
164    #---- making a new working copy: MITgcm_today    #---- making a new working copy: MITgcm_today
   ( cd $git_code ; git checkout master )  
    # mkdir MITgcm_today  
    # cp -p -ra $git_code/* MITgcm_today  
165    rsync -a $git_code/ MITgcm_today --exclude '.git'    rsync -a $git_code/ MITgcm_today --exclude '.git'
166      if test $sepDir = 0 ; then
167        echo -n " make a local copy of $git_other in MITgcm_today ..."      | tee -a $tdir/output_$tt
168        ( cd MITgcm_today
169          rsync -a ../$git_other/ $git_other --exclude '.git' )
170        echo " done"                                | tee -a $tdir/output_$tt
171      fi
172    #---- updating "other_input" dir    #---- updating "other_input" dir
173    if test -d other_input ; then    if test -d other_input ; then
174      list_dirs=`(cd other_input ; ls 2> /dev/null )`      list_dirs=`(cd other_input ; ls 2> /dev/null )`
# Line 153  do Line 198  do
198    #- define list of additional experiences to test:    #- define list of additional experiences to test:
199    addExp=''    addExp=''
200    if test $typ = 'mp2' -o $typ = 'ifc' ; then    if test $typ = 'mp2' -o $typ = 'ifc' ; then
201      addExp="offline_cheapaml atm_gray"      addExp="offline_cheapaml atm_gray atm_strato"
202    fi    fi
203    if test $typ = 'gfo' -o $typ = 'ifc' ; then    if test $typ = 'gfo' -o $typ = 'ifc' ; then
     addExp="$addExp global_oce_biogeo_bling"  
204      addExp="$addExp shelfice_remeshing"      addExp="$addExp shelfice_remeshing"
205    fi    fi
206    if test $typ = 'mpi' ; then    if test $typ = 'mpi' ; then
# Line 190  do Line 234  do
234    if test $sepDir = 1 ; then    if test $sepDir = 1 ; then
235      new_dir="MITgcm_$typ"      new_dir="MITgcm_$typ"
236      reUse=0 ; if [ $checkOut -le 0 ] ; then reUse=1 ; fi      reUse=0 ; if [ $checkOut -le 0 ] ; then reUse=1 ; fi
237      if test -d $new_dir/CVS -a $reUse = 1 ; then      if test -d $new_dir/doc -a $reUse = 1 ; then
238        cd $tdir/$new_dir        cd $tdir/$new_dir
239        if test $tt != $typ ; then        if test $tt != $typ ; then
240          ( cd verification ; ../tools/do_tst_2+2 -clean )          ( cd verification ; ../tools/do_tst_2+2 -clean )
# Line 249  do Line 293  do
293          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt
294          continue          continue
295        fi        fi
296        #-- download additional experience from Contrib:        if test "x$addExp" != x ; then
297            echo -n " make a local copy of $git_other ..."  | tee -a $tdir/output_$tt
298            rsync -a $tdir/$git_other/ $git_other --exclude '.git'
299            echo " done"                            | tee -a $tdir/output_$tt
300          fi
301          #-- add additional experience from $git_other
302        for exp2add in $addExp ; do        for exp2add in $addExp ; do
303          echo " add dir: $exp2add (from Contrib:verification_other)"     | tee -a $tdir/output_$tt          echo "  add link: $exp2add (from $git_other )"  | tee -a $tdir/output_$tt
304          ( cd verification ;  $cmdCVS co -P -d $exp2add \          ( cd verification ;  ln -s ../$git_other/$exp2add . )
              MITgcm_contrib/verification_other/$exp2add > /dev/null )  
305          if test $exp2add = 'global_oce_cs32' ; then          if test $exp2add = 'global_oce_cs32' ; then
306            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
307            ( cd verification/${exp2add}            ( cd ${git_other}/${exp2add}
308              ln -s ../../../other_input/core2_cnyf . )              ln -s ../../../other_input/core2_cnyf . )
309          fi          fi
310          if test $exp2add = 'shelfice_remeshing' ; then         #if test $exp2add = 'shelfice_remeshing' ; then
311            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
312            ( cd verification/${exp2add}         #  ( cd verification/${exp2add}
313              ln -s ../../../other_input/remeshing_code extra_code )         #    ln -s ../../../other_input/remeshing_code extra_code )
314          fi         #fi
315        done        done
316      fi      fi
317    else    else
# Line 291  do Line 339  do
339    MPI=0    MPI=0
340    case $typ in    case $typ in
341     'g77'|'g7a')         OPTFILE='../tools/build_options/linux_amd64_g77' ;;     'g77'|'g7a')         OPTFILE='../tools/build_options/linux_amd64_g77' ;;
342     'gfo'|'adm'|'oad'|'tlm'|'mth') comm="$comm -match $MC -devel"     'gfo'|'adm'|'oad'|'tlm'|'mth') comm="$comm -devel"
343                            comm="$comm -match $MC"
344                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;
345     'ifc')               comm="$comm -devel"     'ifc')               comm="$comm -devel"
346                          OPTFILE='../tools/build_options/linux_amd64_ifort11' ;;                          OPTFILE='../tools/build_options/linux_amd64_ifort11' ;;
347     'pgi')               OPTFILE='../tools/build_options/linux_amd64_pgf77' ;;     'pgi')               OPTFILE='../tools/build_options/linux_amd64_pgf77' ;;
348     'mpa'|'mpi'|'mp2')   comm="$comm -match $MC -devel" ; MPI=6     'mpa'|'mpi'|'mp2')   comm="$comm -devel" ; MPI=6
349                            comm="$comm -match $MC"
350                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;
351         *)               OPTFILE= ;;         *)               OPTFILE= ;;
352    esac    esac
# Line 312  do Line 362  do
362    
363  #-- set specific Env Vars:  #-- set specific Env Vars:
364    if test $typ = 'oad' ; then    if test $typ = 'oad' ; then
365      source $HOME/mitgcm/bin/setenv_OpenAD.sh    | tee -a $tdir/output_$tt      #- for some reasons, "source ScriptFile | tee -a LogFile"
366        #  does run the script but does not keep the env-var settings
367        source $HOME/mitgcm/bin/setenv_OpenAD.sh    >> $tdir/output_$tt
368    fi    fi
369    if test $typ = 'ifc' ; then    if test $typ = 'ifc' ; then
370      source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64      source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64

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

  ViewVC Help
Powered by ViewVC 1.1.22