/[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.12 by jmc, Mon Sep 16 23:38: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`
# Line 50  option= Line 55  option=
55    
56  if test $tst_grp = 'a' ; then  if test $tst_grp = 'a' ; then
57   checkOut=2   checkOut=2
58   tst_list='g7a mpa mth mp2+rs mpi oad'   tst_list='mpa mth mp2+rs mpi oad'
59  #tst_list='mpa adm mpi gfo+rs mth+rs'  #tst_list='mpa adm mpi gfo+rs mth+rs'
60  #tst_list="$tst_list oad"  #tst_list="$tst_list oad"
61  else  else
# Line 93  if [ $checkOut -ge 2 ] ; then Line 98  if [ $checkOut -ge 2 ] ; then
98    cd $tdir    cd $tdir
99    
100    #---- Making a new clone or updating existing one:    #---- Making a new clone or updating existing one:
101    if test -e MITgcm/.git/config ; then    if [ $checkOut -eq 2 ] ; then
102      echo MITgcm/.git/config 'exist'      if test -e $git_code/.git/config ; then
103    else         echo $git_code/.git/config 'exist'
104      echo -n MITgcm/.git/config 'missing ; '      else
105      checkOut=3         echo -n $git_code/.git/config 'missing ; '
106      echo "will get new clone ( checkOut=$checkOut )"         checkOut=3
107           echo "will get new clone ( checkOut=$checkOut )"
108        fi
109        if test -e $git_other/.git/config ; then
110           echo $git_other/.git/config 'exist'
111        else
112           echo -n $git_other/.git/config 'missing ; '
113           checkOut=3
114           echo "will get new clone ( checkOut=$checkOut )"
115        fi
116    fi    fi
117    if [ $checkOut -eq 3 ] ; then    if [ $checkOut -eq 3 ] ; then
118      echo -n "Make a clone of $git_code from repo: $git_repo ..."      test -e $git_code && rm -rf $git_code
119      git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil      echo "Make a clone of $git_code from repo: $git_repo ..."
120        git clone $git_repo/${git_code}.git 2> $tmpFil
121        retVal=$?
122        if test $retVal = 0 ; then
123           echo ' --> done!'
124           rm -f $tmpFil
125        else
126           echo " Error: 'git clone' returned: $retVal"
127           cat $tmpFil
128           rm -f $tmpFil
129           exit 2
130        fi
131        test -e $git_other && rm -rf $git_other
132        echo "Make a clone of $git_other from repo: $git_repo ..."
133        git clone $git_repo/${git_other}.git 2> $tmpFil
134      retVal=$?      retVal=$?
135      if test $retVal = 0 ; then      if test $retVal = 0 ; then
136         echo ' --> done!'         echo ' --> done!'
# Line 116  if [ $checkOut -ge 2 ] ; then Line 144  if [ $checkOut -ge 2 ] ; then
144    else    else
145      echo "Updating current clone ( $git_code ) ..."      echo "Updating current clone ( $git_code ) ..."
146      ( cd $git_code ; git pull )      ( cd $git_code ; git pull )
147      echo ' --> done!'      retVal=$?
148        if test $retVal = 0 ; then
149           echo ' --> done!'
150        else
151           echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
152           exit 3
153        fi
154        ( cd $git_code ; git checkout master -- . )
155        echo "Updating current clone ( $git_other ) ..."
156        ( cd $git_other ; git pull )
157        retVal=$?
158        if test $retVal = 0 ; then
159           echo ' --> done!'
160        else
161           echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
162           exit 3
163        fi
164        ( cd $git_other ; git checkout master -- . )
165    fi    fi
   
166    #---- 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  
167    rsync -a $git_code/ MITgcm_today --exclude '.git'    rsync -a $git_code/ MITgcm_today --exclude '.git'
168      if test $sepDir = 0 ; then
169        echo -n " make a local copy of $git_other in MITgcm_today ..."      | tee -a $tdir/output_$tt
170        ( cd MITgcm_today
171          rsync -a ../$git_other/ $git_other --exclude '.git' )
172        echo " done"                                | tee -a $tdir/output_$tt
173      fi
174    #---- updating "other_input" dir    #---- updating "other_input" dir
175    if test -d other_input ; then    if test -d other_input ; then
176      list_dirs=`(cd other_input ; ls 2> /dev/null )`      list_dirs=`(cd other_input ; ls 2> /dev/null )`
# Line 153  do Line 200  do
200    #- define list of additional experiences to test:    #- define list of additional experiences to test:
201    addExp=''    addExp=''
202    if test $typ = 'mp2' -o $typ = 'ifc' ; then    if test $typ = 'mp2' -o $typ = 'ifc' ; then
203      addExp="offline_cheapaml atm_gray"      addExp="offline_cheapaml atm_gray atm_strato"
204    fi    fi
205    if test $typ = 'gfo' -o $typ = 'ifc' ; then    if test $typ = 'gfo' -o $typ = 'ifc' -o $typ = 'adm' ; then
206      addExp="$addExp global_oce_biogeo_bling"      addExp="$addExp global_oce_biogeo_bling"
207      fi
208      if test $typ = 'gfo' -o $typ = 'ifc' ; then
209      addExp="$addExp shelfice_remeshing"      addExp="$addExp shelfice_remeshing"
210    fi    fi
211    if test $typ = 'mpi' ; then    if test $typ = 'mpi' ; then
# Line 190  do Line 239  do
239    if test $sepDir = 1 ; then    if test $sepDir = 1 ; then
240      new_dir="MITgcm_$typ"      new_dir="MITgcm_$typ"
241      reUse=0 ; if [ $checkOut -le 0 ] ; then reUse=1 ; fi      reUse=0 ; if [ $checkOut -le 0 ] ; then reUse=1 ; fi
242      if test -d $new_dir/CVS -a $reUse = 1 ; then      if test -d $new_dir/doc -a $reUse = 1 ; then
243        cd $tdir/$new_dir        cd $tdir/$new_dir
244        if test $tt != $typ ; then        if test $tt != $typ ; then
245          ( cd verification ; ../tools/do_tst_2+2 -clean )          ( cd verification ; ../tools/do_tst_2+2 -clean )
# Line 249  do Line 298  do
298          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt
299          continue          continue
300        fi        fi
301        #-- download additional experience from Contrib:        if test "x$addExp" != x ; then
302            echo -n " make a local copy of $git_other ..."  | tee -a $tdir/output_$tt
303            rsync -a $tdir/$git_other/ $git_other --exclude '.git'
304            echo " done"                            | tee -a $tdir/output_$tt
305          fi
306          #-- add additional experience from $git_other
307        for exp2add in $addExp ; do        for exp2add in $addExp ; do
308          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
309          ( cd verification ;  $cmdCVS co -P -d $exp2add \          ( cd verification ;  ln -s ../$git_other/$exp2add . )
              MITgcm_contrib/verification_other/$exp2add > /dev/null )  
310          if test $exp2add = 'global_oce_cs32' ; then          if test $exp2add = 'global_oce_cs32' ; then
311            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
312            ( cd verification/${exp2add}            ( cd verification/${exp2add}
313              ln -s ../../../other_input/core2_cnyf . )              ln -s ../../../other_input/core2_cnyf . )
314          fi          fi
315          if test $exp2add = 'shelfice_remeshing' ; then         #if test $exp2add = 'shelfice_remeshing' ; then
316            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
317            ( cd verification/${exp2add}         #  ( cd verification/${exp2add}
318              ln -s ../../../other_input/remeshing_code extra_code )         #    ln -s ../../../other_input/remeshing_code extra_code )
319          fi         #fi
320        done        done
321      fi      fi
322    else    else
# Line 312  do Line 365  do
365    
366  #-- set specific Env Vars:  #-- set specific Env Vars:
367    if test $typ = 'oad' ; then    if test $typ = 'oad' ; then
368      source $HOME/mitgcm/bin/setenv_OpenAD.sh    | tee -a $tdir/output_$tt      #- for some reasons, "source ScriptFile | tee -a LogFile"
369        #  does run the script but does not keep the env-var settings
370        source $HOME/mitgcm/bin/setenv_OpenAD.sh    >> $tdir/output_$tt
371    fi    fi
372    if test $typ = 'ifc' ; then    if test $typ = 'ifc' ; then
373      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.12

  ViewVC Help
Powered by ViewVC 1.1.22