/[MITgcm]/MITgcm/tools/example_scripts/csail/test_baudelaire
ViewVC logotype

Diff of /MITgcm/tools/example_scripts/csail/test_baudelaire

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

revision 1.8 by jmc, Thu Jan 27 01:30:28 2011 UTC revision 1.16 by jmc, Wed Feb 20 19:05:16 2013 UTC
# Line 25  ulimit -s unlimited Line 25  ulimit -s unlimited
25  cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack'  cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack'
26  cmdCVS='cvs -d /u/gcmpack'  cmdCVS='cvs -d /u/gcmpack'
27    
28    dInWeek=`date +%a`
29  TESTDIR="/scratch/jmc/test_"`hostname -s`  TESTDIR="/scratch/jmc/test_"`hostname -s`
30  MC=13  MC=13
31  checkOut=1  checkOut=1
32  sepDir=1  sepDir=1
33  option=  option=
34  tst_list='g7a adm mpa g77 gfo+rs mth mp2+rs mpi ifc'  tst_list='g7a adm mpa g77 gfo+rs mth mp2+rs mpi ifc'
35    if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm" ; fi
36  #tst_list='g77 adm gfo ifc mth pgi+rs'  #tst_list='g77 adm gfo ifc mth pgi+rs'
37  #tst_list='g77 gfo+rs mth'  #tst_list='adm gfo+rs mth'
38    
39  #option="-nc" ; checkOut=0  #option="-nc" ; checkOut=0
40  #option="-q"  ; checkOut=0  #option="-q"  ; checkOut=0
# Line 42  tdir=$TESTDIR Line 44  tdir=$TESTDIR
44  if test $checkOut = '0' ; then  if test $checkOut = '0' ; then
45    if test -e $tdir/MITgcm/CVS ; then    if test -e $tdir/MITgcm/CVS ; then
46      echo $tdir/MITgcm/CVS 'exist'      echo $tdir/MITgcm/CVS 'exist'
47      echo -n "Update the MITgcm code using: $cmdCVS ..."      if test $sepDir = 0 ; then
48      cd $tdir/MITgcm        echo -n "Update the MITgcm code using: $cmdCVS ..."
49      if test $sepDir = 1 ; then        cd $tdir/MITgcm
       $cmdCVS update -P -d > /dev/null  
     else  
50        $cmdCVS update -P -d        $cmdCVS update -P -d
51          echo "  done"
52      fi      fi
     echo "  done"  
53    else    else
54      echo -n $tdir/MITgcm 'missing ; '      echo -n $tdir/MITgcm 'missing ; '
55      checkOut=1      checkOut=1
# Line 93  do Line 93  do
93    fi    fi
94    #- clean-up old output files    #- clean-up old output files
95    rm -f $tdir/output_${typ}*    rm -f $tdir/output_${typ}*
96      touch $tdir/output_$tt
97    if test $sepDir = 1 ; then    if test $sepDir = 1 ; then
98      new_dir="MITgcm_$typ"      new_dir="MITgcm_$typ"
99      if test -d $new_dir/CVS -a $checkOut = '0' ; then      if test -d $new_dir/CVS -a $checkOut = '0' ; then
100        pushd $new_dir        pushd $new_dir
101          if test $tt != $typ ; then
102            ( cd verification ; ../tools/do_tst_2+2 -clean )
103          fi
104        echo -n "Update the MITgcm code using: $cmdCVS ..."        echo -n "Update the MITgcm code using: $cmdCVS ..."
105        $cmdCVS update -P -d        $cmdCVS update -P -d
106        echo "  done"        echo "  done"
# Line 112  do Line 116  do
116    cd verification    cd verification
117    
118  #-- set the testreport command:  #-- set the testreport command:
   nbl='-100'  
119    comm="./testreport"    comm="./testreport"
120    if test $typ = 'g7a' -o  $typ = 'adm' -o  $typ = 'mpa' ; then    if test $typ = 'g7a' -o  $typ = 'adm' -o  $typ = 'mpa' ; then
     nbl='-60'  
121      comm="$comm -adm"      comm="$comm -adm"
122      elif test $typ = 'tlm' ; then
123        comm="$comm -tlm"
124    elif test $typ = 'mth' -o  $typ = 'mp2' ; then    elif test $typ = 'mth' -o  $typ = 'mp2' ; then
125      export GOMP_STACKSIZE=400m      export GOMP_STACKSIZE=400m
126      export OMP_NUM_THREADS=2      export OMP_NUM_THREADS=2
# Line 127  do Line 131  do
131    MPI=0    MPI=0
132    case $typ in    case $typ in
133     'g77'|'g7a')         OPTFILE='../tools/build_options/linux_amd64_g77' ;;     'g77'|'g7a')         OPTFILE='../tools/build_options/linux_amd64_g77' ;;
134     'gfo'|'adm'|'mth')   OPTFILE='../tools/build_options/linux_amd64_gfortran'     'gfo'|'adm'|'tlm'|'mth') comm="$comm -match $MC -devel"
135                          comm="$comm -match $MC" ;;                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;
136     'ifc')               OPTFILE='../tools/build_options/linux_amd64_ifort11' ;;     'ifc')               OPTFILE='../tools/build_options/linux_amd64_ifort11' ;;
137     'pgi')               OPTFILE='../tools/build_options/linux_amd64_pgf77' ;;     'pgi')               OPTFILE='../tools/build_options/linux_amd64_pgf77' ;;
138     'mpa'|'mpi'|'mp2')   OPTFILE='../tools/build_options/linux_amd64_gfortran+mpi_generic'     'mpa'|'mpi'|'mp2')   comm="$comm -match $MC -devel" ; MPI=6
139                          comm="$comm -match $MC" ; MPI=6 ;;                          OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;
140         *)               OPTFILE= ;;         *)               OPTFILE= ;;
141    esac    esac
142  #-- set MPI command:  #-- set MPI command:
# Line 156  do Line 160  do
160      export LM_LICENSE_FILE=$PGI/license.dat      export LM_LICENSE_FILE=$PGI/license.dat
161    fi    fi
162    
163    if test $sepDir = 0 -a $checkOut = '1' -a  $tt = $firstTst ; then    if test $sepDir = 0 -a $checkOut = '0' -a  $tt = $firstTst ; then
164  #-- cleaning:  #-- cleaning:
165      echo "======================"      echo "======================"
166      echo "Cleaning test directories:"      echo "Cleaning test directories:"   | tee -a $tdir/output_$tt
167      cmdCLN="./testreport -clean"      cmdCLN="./testreport -clean"
168      echo " clean dir running: $cmdCLN"      echo " clean dir running: $cmdCLN"  | tee -a $tdir/output_$tt
169      $cmdCLN > /dev/null 2>&1      $cmdCLN >> $tdir/output_$tt 2>&1
170      echo "======================"      echo "======================"
171      echo      echo ""                             | tee -a $tdir/output_$tt
172    fi    fi
173    
174  #-- run the testreport command:  #-- run the testreport command:
175    echo -n "Running testreport using:"    echo -n "Running testreport using:"   | tee -a $tdir/output_$tt
176    if test "x$OPTFILE" != x ; then    if test "x$OPTFILE" != x ; then
177      comm="$comm -of=$OPTFILE"      comm="$comm -of=$OPTFILE"
178    fi    fi
179    if test $MPI = 0 ; then  echo ''    if test $MPI = 0 ; then  echo ''      | tee -a $tdir/output_$tt
180    else echo " (EXE='$EXE')"    else echo " (EXE='$EXE')"             | tee -a $tdir/output_$tt
181      comm="$comm -MPI $MPI -command \"\$EXE\""      comm="$comm -MPI $MPI -command \"\$EXE\""
182    fi    fi
183    if test "x$option" != x ; then comm="$comm $option" ; fi    if test "x$option" != x ; then comm="$comm $option" ; fi
184   #if test $typ = 'pgi' ; then comm="$comm -t \"\$listT\"" ; fi   #if test $typ = 'pgi' ; then comm="$comm -t \"\$listT\"" ; fi
185    echo "  \"eval $comm\""    echo "  \"eval $comm\""               | tee -a $tdir/output_$tt
186    echo "======================"    echo "======================"
187    eval $comm > $tdir/output_$typ 2>&1    eval $comm >> $tdir/output_$tt 2>&1
188    tail $nbl $tdir/output_$typ    sed -n "/^An email /,/^======== End of testreport / p" $tdir/output_$tt
189    echo    echo ""                               | tee -a $tdir/output_$tt
190    
191  #-- also test restart (test 2+2=4)  #-- also test restart (test 2+2=4)
192    if test $tt != $typ    if test $tt != $typ
193    then    then
194      echo "testing restart using:"      echo "testing restart using:"       | tee -a $tdir/output_$tt
195      comm="../tools/do_tst_2+2 -a jmc@mitgcm.org"      comm="../tools/do_tst_2+2 -a jmc@mitgcm.org"
196      if test $MPI = 0 ; then      if test $MPI = 0 ; then
197        echo "  \"$comm\""        echo "  \"$comm\""                | tee -a $tdir/output_$tt
198        echo "======================"        echo "======================"
199        $comm > $tdir/output_2+2 2>&1        $comm >> $tdir/output_$tt 2>&1
200      else      else
201        echo "  \"$comm -mpi -exe $EXE\""        echo "  \"$comm -mpi -exe $EXE\"" | tee -a $tdir/output_$tt
202        echo "======================"        echo "======================"
203        $comm -mpi -exe "$EXE" > $tdir/output_2+2 2>&1        $comm -mpi -exe "$EXE" >> $tdir/output_$tt 2>&1
204      fi      fi
    #tail $nbl $tdir/output_2+2  
205      echo ; cat tst_2+2_out.txt      echo ; cat tst_2+2_out.txt
206      echo      echo
207    fi    fi
# Line 207  do Line 210  do
210    if test $sepDir = 0 ; then    if test $sepDir = 0 ; then
211  #-- cleaning:  #-- cleaning:
212      echo "======================"      echo "======================"
213      echo "Cleaning test directories:"      echo "Cleaning test directories:"   | tee -a $tdir/output_$tt
214      if test $tt != $typ ; then      if test $tt != $typ ; then
215        cmdCLN="../tools/do_tst_2+2 -clean"        cmdCLN="../tools/do_tst_2+2 -clean"
216        echo " clean tst_2+2 running: $cmdCLN"        echo " clean tst_2+2 running: $cmdCLN"    | tee -a $tdir/output_$tt
217        $cmdCLN >> $tdir/output_2+2 2>&1        $cmdCLN >> $tdir/output_$tt 2>&1
218      fi      fi
219      if test $tt != $last_Tst ; then      if test $tt != $last_Tst ; then
220        cmdCLN="./testreport -clean"        cmdCLN="./testreport -clean"
221        echo " clean dir running: $cmdCLN"        echo " clean dir running: $cmdCLN"        | tee -a $tdir/output_$tt
222        $cmdCLN > /dev/null 2>&1        $cmdCLN >> $tdir/output_$tt 2>&1
223      fi      fi
224      echo "======================"      echo "======================"
225      echo      echo

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.22