/[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.3 by jmc, Wed Nov 3 19:44:49 2010 UTC revision 1.4 by jmc, Sun Dec 26 17:02:44 2010 UTC
# Line 14  if [ -d ~/bin ]; then export PATH=$PATH: Line 14  if [ -d ~/bin ]; then export PATH=$PATH:
14  export LC_ALL="en_US.UTF-8"  export LC_ALL="en_US.UTF-8"
15  #  Turn off stack limit for FIZHI & AD-tests  #  Turn off stack limit for FIZHI & AD-tests
16  ulimit -s unlimited  ulimit -s unlimited
17    #  MPI test (for now, only with gfortran)
18    #if test $MPI = 1 ; then
19       export MPI_GCC_DIR=/srv/software/gcc/gcc-packages/gcc-4.4.5/mpich2/mpich2-1.3
20       export MPI_INC_DIR=$MPI_GCC_DIR/include
21       export PATH="$PATH:$MPI_GCC_DIR/bin"
22    #fi
23    
24  #- method to acces CVS:  #- method to acces CVS:
25   # export CVSROOT='/u/gcmpack'   # export CVSROOT='/u/gcmpack'
# Line 28  MC=13 Line 34  MC=13
34  checkOut=1  checkOut=1
35  sepDir=1  sepDir=1
36  option=  option=
37  tst_list='g7a adm g77 gfo+rs mth ifc'  tst_list='g7a adm mpa g77 gfo+rs mth mp2+rs mpi ifc'
38  #tst_list='g77 adm gfo ifc mth pgi+rs'  #tst_list='g77 adm gfo ifc mth pgi+rs'
39  #tst_list='g77 gfo+rs mth'  #tst_list='g77 gfo+rs mth'
40    
# Line 109  do Line 115  do
115   fi   fi
116   cd verification   cd verification
117    
118     MPI=0
119   case $typ in   case $typ in
120    'g77'|'g7a') OPTFILE='../tools/build_options/linux_amd64_g77' ;;    'g77'|'g7a')          OPTFILE='../tools/build_options/linux_amd64_g77' ;;
121    'gfo'|'adm') OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;    'gfo'|'adm'|'mth')    OPTFILE='../tools/build_options/linux_amd64_gfortran' ;;
122    'ifc')       OPTFILE='../tools/build_options/linux_amd64_ifort11' ;;    'ifc')                OPTFILE='../tools/build_options/linux_amd64_ifort11' ;;
123    'pgi')       OPTFILE='../tools/build_options/linux_amd64_pgf77' ;;    'pgi')                OPTFILE='../tools/build_options/linux_amd64_pgf77' ;;
124    'mth')       OPTFILE='../tools/build_options/linux_amd64_gfortran'    'mpa'|'mpi'|'mp2')    OPTFILE='../tools/build_options/linux_amd64_gfortran+mpi_generic'
125                 export GOMP_STACKSIZE=400m ;;                          MPI=1 ;;
126     *)          OPTFILE= ;;        *)                OPTFILE= ;;
127   esac   esac
128     if test $typ = 'mth' -o  $typ = 'mp2' ; then
129        export GOMP_STACKSIZE=400m
130     fi
131     if test $MPI = 1 ; then
132        export MPI_INC_DIR=$MPI_GCC_DIR/include
133        EXE="mpirun -np 2 ./mitgcmuv"
134     fi
135    
136   if test $sepDir = 0 -a $checkOut = '1' -a  $tt = $firstTst ; then   if test $sepDir = 0 -a $checkOut = '1' -a  $tt = $firstTst ; then
137  #-- cleaning:  #-- cleaning:
# Line 133  do Line 147  do
147   if test $typ = 'g77'   if test $typ = 'g77'
148   then   then
149    
150    echo "Running testreport using:"    echo -n "Running testreport using:"
151    comm="./testreport -a jmc@mitgcm.org"    comm="./testreport -a jmc@mitgcm.org"
152  # comm="$comm -match $MC"  # comm="$comm -match $MC"
153    if test "x$OPTFILE" != x ; then    if test "x$OPTFILE" != x ; then
154      comm="$comm -of=$OPTFILE"      comm="$comm -of=$OPTFILE"
155    fi    fi
156      if test $MPI = 1 ; then echo " (EXE='$EXE')"
157        comm="$comm -mpi -command \"\$EXE\""
158      else echo '' ; fi
159    if test "x$option" != x ; then comm="$comm $option" ; fi    if test "x$option" != x ; then comm="$comm $option" ; fi
160    echo "  \"$comm\""    echo "  \"eval $comm\""
161    echo "======================"    echo "======================"
162    $comm > $tdir/output_$typ 2>&1    eval $comm > $tdir/output_$typ 2>&1
163    tail -100 $tdir/output_$typ    tail -100 $tdir/output_$typ
164    echo    echo
165    
# Line 151  do Line 168  do
168   if test $typ = 'gfo'   if test $typ = 'gfo'
169   then   then
170    
171    echo "Running testreport using:"    echo -n "Running testreport using:"
172    comm="./testreport -a jmc@mitgcm.org"    comm="./testreport -a jmc@mitgcm.org"
173    comm="$comm -match $MC"    comm="$comm -match $MC"
174    if test "x$OPTFILE" != x ; then    if test "x$OPTFILE" != x ; then
175      comm="$comm -of=$OPTFILE"      comm="$comm -of=$OPTFILE"
176    fi    fi
177      if test $MPI = 1 ; then echo " (EXE='$EXE')"
178        comm="$comm -mpi -command \"\$EXE\""
179      else echo '' ; fi
180    if test "x$option" != x ; then comm="$comm $option" ; fi    if test "x$option" != x ; then comm="$comm $option" ; fi
181    echo "  \"$comm\""    echo "  \"eval $comm\""
182    echo "======================"    echo "======================"
183    $comm > $tdir/output_$typ 2>&1    eval $comm > $tdir/output_$typ 2>&1
184    tail -100 $tdir/output_$typ    tail -100 $tdir/output_$typ
185    echo    echo
186    
# Line 169  do Line 189  do
189   if test $typ = 'g7a'   if test $typ = 'g7a'
190   then   then
191    
192    echo "Running testreport using:"    echo -n "Running testreport using:"
193    comm="./testreport -adm -a jmc@mitgcm.org"    comm="./testreport -adm -a jmc@mitgcm.org"
194  # comm="$comm -match $MC"  # comm="$comm -match $MC"
195    if test "x$OPTFILE" != x ; then    if test "x$OPTFILE" != x ; then
196      comm="$comm -of=$OPTFILE"      comm="$comm -of=$OPTFILE"
197    fi    fi
198      if test $MPI = 1 ; then echo " (EXE='$EXE')"
199        comm="$comm -mpi -command \"\$EXE\""
200      else echo '' ; fi
201    if test "x$option" != x ; then comm="$comm $option" ; fi    if test "x$option" != x ; then comm="$comm $option" ; fi
202    echo "  \"$comm\""    echo "  \"eval $comm\""
203    echo "======================"    echo "======================"
204    $comm > $tdir/output_$typ 2>&1    eval $comm > $tdir/output_$typ 2>&1
205    tail -60 $tdir/output_$typ    tail -60 $tdir/output_$typ
206    echo    echo
207    
# Line 187  do Line 210  do
210   if test $typ = 'adm'   if test $typ = 'adm'
211   then   then
212    
213    echo "Running testreport using:"    echo -n "Running testreport using:"
214    comm="./testreport -adm -a jmc@mitgcm.org"    comm="./testreport -adm -a jmc@mitgcm.org"
215    comm="$comm -match $MC"    comm="$comm -match $MC"
216    if test "x$OPTFILE" != x ; then    if test "x$OPTFILE" != x ; then
217      comm="$comm -of=$OPTFILE"      comm="$comm -of=$OPTFILE"
218    fi    fi
219      if test $MPI = 1 ; then echo " (EXE='$EXE')"
220        comm="$comm -mpi -command \"\$EXE\""
221      else echo '' ; fi
222    if test "x$option" != x ; then comm="$comm $option" ; fi    if test "x$option" != x ; then comm="$comm $option" ; fi
223    echo "  \"$comm\""    echo "  \"eval $comm\""
224    echo "======================"    echo "======================"
225    $comm > $tdir/output_$typ 2>&1    eval $comm > $tdir/output_$typ 2>&1
226    tail -60 $tdir/output_$typ    tail -60 $tdir/output_$typ
227    echo    echo
228    
# Line 206  do Line 232  do
232   then   then
233    
234    source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64    source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64
235    echo "Running testreport using:"    echo -n "Running testreport using:"
236    comm="./testreport -a jmc@mitgcm.org"    comm="./testreport -a jmc@mitgcm.org"
237  # comm="$comm -match $MC"  # comm="$comm -match $MC"
238    if test "x$OPTFILE" != x ; then    if test "x$OPTFILE" != x ; then
239      comm="$comm -of=$OPTFILE"      comm="$comm -of=$OPTFILE"
240    fi    fi
241      if test $MPI = 1 ; then echo " (EXE='$EXE')"
242        comm="$comm -mpi -command \"\$EXE\""
243      else echo '' ; fi
244    if test "x$option" != x ; then comm="$comm $option" ; fi    if test "x$option" != x ; then comm="$comm $option" ; fi
245    echo "  \"$comm\""    echo "  \"eval $comm\""
246    echo "======================"    echo "======================"
247    $comm > $tdir/output_$typ 2>&1    eval $comm > $tdir/output_$typ 2>&1
248    tail -100 $tdir/output_$typ    tail -100 $tdir/output_$typ
249    echo    echo
250    
# Line 225  do Line 254  do
254   then   then
255    
256    export OMP_NUM_THREADS=2    export OMP_NUM_THREADS=2
257    echo "Running testreport using:"    echo -n "Running testreport using:"
258    comm="./testreport -mth -a jmc@mitgcm.org"    comm="./testreport -mth -a jmc@mitgcm.org"
259    comm="$comm -match $MC"    comm="$comm -match $MC"
260    if test "x$OPTFILE" != x ; then    if test "x$OPTFILE" != x ; then
261      comm="$comm -of=$OPTFILE"      comm="$comm -of=$OPTFILE"
262    fi    fi
263      if test $MPI = 1 ; then echo " (EXE='$EXE')"
264        comm="$comm -mpi -command \"\$EXE\""
265      else echo '' ; fi
266    if test "x$option" != x ; then comm="$comm $option" ; fi    if test "x$option" != x ; then comm="$comm $option" ; fi
267    echo "  \"$comm\""    echo "  \"eval $comm\""
268    echo "======================"    echo "======================"
269    $comm > $tdir/output_$typ 2>&1    eval $comm > $tdir/output_$typ 2>&1
270    tail -100 $tdir/output_$typ    tail -100 $tdir/output_$typ
271    echo    echo
272    
# Line 244  do Line 276  do
276   then   then
277    
278    export PGI=/srv/software/pgi/pgi-10.9    export PGI=/srv/software/pgi/pgi-10.9
279    export PATH=$PGI/linux86-64/10.9/bin:$PATH    export PATH="$PATH:$PGI/linux86-64/10.9/bin"
280    export LM_LICENSE_FILE=$PGI/license.dat    export LM_LICENSE_FILE=$PGI/license.dat
281    echo "Running testreport using:"    echo -n "Running testreport using:"
282    comm="./testreport -a jmc@mitgcm.org"    comm="./testreport -a jmc@mitgcm.org"
283  # comm="$comm -match $MC"  # comm="$comm -match $MC"
284    #comm="$comm -skd tutorial_advection_in_gyre"    #comm="$comm -skd tutorial_advection_in_gyre"
285    if test "x$OPTFILE" != x ; then    if test "x$OPTFILE" != x ; then
286      comm="$comm -of=$OPTFILE"      comm="$comm -of=$OPTFILE"
287    fi    fi
288      if test $MPI = 1 ; then echo " (EXE='$EXE')"
289        comm="$comm -mpi -command \"\$EXE\""
290      else echo '' ; fi
291    if test "x$option" != x ; then comm="$comm $option" ; fi    if test "x$option" != x ; then comm="$comm $option" ; fi
292    echo "  \"$comm\""    echo "  \"eval $comm\""
293    echo "======================"    echo "======================"
294    $comm > $tdir/output_${typ} 2>&1    eval $comm > $tdir/output_$typ 2>&1
295    tail -100 $tdir/output_${typ}    tail -100 $tdir/output_${typ}
296    echo    echo
297    
298   fi   fi
299    
300    #-- MPI tests ---
301     if test $typ = 'mpa'
302     then
303    
304      EXE="mpirun -np 2 ./mitgcmuv_ad"
305      echo -n "Running testreport using:"
306      comm="./testreport -adm -a jmc@mitgcm.org"
307      comm="$comm -match $MC"
308      if test "x$OPTFILE" != x ; then
309        comm="$comm -of=$OPTFILE"
310      fi
311      if test $MPI = 1 ; then echo " (EXE='$EXE')"
312        comm="$comm -mpi -command \"\$EXE\""
313      else echo '' ; fi
314      if test "x$option" != x ; then comm="$comm $option" ; fi
315      echo "  \"eval $comm\""
316      echo "======================"
317      eval $comm > $tdir/output_$typ 2>&1
318      tail  -60 $tdir/output_$typ
319      echo
320    
321     fi
322    
323     if test $typ = 'mpi'
324     then
325    
326      echo -n "Running testreport using:"
327      comm="./testreport -a jmc@mitgcm.org"
328      comm="$comm -match $MC"
329      if test "x$OPTFILE" != x ; then
330        comm="$comm -of=$OPTFILE"
331      fi
332      if test $MPI = 1 ; then echo " (EXE='$EXE')"
333        comm="$comm -mpi -command \"\$EXE\""
334      else echo '' ; fi
335      if test "x$option" != x ; then comm="$comm $option" ; fi
336      echo "  \"eval $comm\""
337      echo "======================"
338      eval $comm > $tdir/output_$typ 2>&1
339      tail -100 $tdir/output_$typ
340      echo
341    
342     fi
343    
344     if test $typ = 'mp2'
345     then
346    
347      export OMP_NUM_THREADS=2
348      echo -n "Running testreport using:"
349      comm="./testreport -mth -a jmc@mitgcm.org"
350      comm="$comm -match $MC"
351      if test "x$OPTFILE" != x ; then
352        comm="$comm -of=$OPTFILE"
353      fi
354      if test $MPI = 1 ; then echo " (EXE='$EXE')"
355        comm="$comm -mpi -command \"\$EXE\""
356      else echo '' ; fi
357      if test "x$option" != x ; then comm="$comm $option" ; fi
358      echo "  \"eval $comm\""
359      echo "======================"
360      eval $comm > $tdir/output_$typ 2>&1
361      tail -100 $tdir/output_$typ
362      echo
363    
364     fi
365    
366  #-- also test restart (test 2+2=4)  #-- also test restart (test 2+2=4)
367   if test $tt != $typ   if test $tt != $typ
368   then   then
369     echo "testing restart using:"     echo "testing restart using:"
370     comm="../tools/do_tst_2+2 -a jmc@mitgcm.org"     comm="../tools/do_tst_2+2 -a jmc@mitgcm.org"
371     echo "  \"$comm\""     if test $MPI = 1 ; then
372     echo "======================"       echo "  \"$comm -mpi -exe $EXE\""
373     $comm > $tdir/output_2+2 2>&1       echo "======================"
374         $comm -mpi -exe "$EXE" > $tdir/output_2+2 2>&1
375       else
376         echo "  \"$comm\""
377         echo "======================"
378         $comm > $tdir/output_2+2 2>&1
379       fi
380    #tail -100 $tdir/output_2+2    #tail -100 $tdir/output_2+2
381     echo ; cat tst_2+2_out.txt     echo ; cat tst_2+2_out.txt
382     echo     echo

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22