/[MITgcm]/MITgcm/verification/cpl_aim+ocn/run_cpl_test
ViewVC logotype

Diff of /MITgcm/verification/cpl_aim+ocn/run_cpl_test

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

revision 1.18 by jmc, Tue Nov 8 22:56:52 2011 UTC revision 1.21 by jmc, Mon Dec 2 23:39:42 2013 UTC
# Line 9  Line 9 
9  MTH=  MTH=
10  MTHo=  MTHo=
11  MTHa=  MTHa=
12  #GMKopt='-devel'  GMKopt='-devel'
13  GMKopt='-ieee'  #GMKopt='-ieee'
14  #GMKopt=  #GMKopt=
15  rnkO=1 ; rnkA=`expr $rnkO + $NpOc`  rnkO=1 ; rnkA=`expr $rnkO + $NpOc`
16    
# Line 20  if [ $# -ge 1 ] ; then if test $1 = '-mt Line 20  if [ $# -ge 1 ] ; then if test $1 = '-mt
20    if test -f input_ocn/eedata.mth ; then MTHo=$MTH ; fi    if test -f input_ocn/eedata.mth ; then MTHo=$MTH ; fi
21    if test -f input_atm/eedata.mth ; then MTHa=$MTH ; fi    if test -f input_atm/eedata.mth ; then MTHa=$MTH ; fi
22  fi ; fi  fi ; fi
23  if [ $# -ne 1 ]  #- allows more argument for building step (step=1)
24  then  chkArg=$# ; if [ $# -gt 1 ]; then chkArg=$1 ; fi
25    echo 'Usage:'`basename $0`' [opt] step'  if [ $chkArg -ne 1 ]; then
26      echo 'Usage:'`basename $0`' [opt] step [bld-arg]'
27    echo ' => test coupled set-up on linux box (1.cpu)'    echo ' => test coupled set-up on linux box (1.cpu)'
28    echo 'opt = -mth : compile and run (if eedata.mth) 2-threads for ocn & atm'    echo 'opt = -mth : compile and run (if eedata.mth) 2-threads for ocn & atm'
29    echo ' step = 0 : clean all directories'    echo ' step = 0 : clean all directories'
30    echo ' step = 1 : compile the 3 executables (cpl,ocn,atm)'    echo ' step = 1 : compile the 3 executables (cpl,ocn,atm); optional arg:'
31      echo '       -of Optfile_Name : using option-file "Optfile_Name"'
32    echo ' step = 2 : copy input files and dir(s)'    echo ' step = 2 : copy input files and dir(s)'
33    echo " step = 3 : run with $Npr mpi processes"    echo " step = 3 : run with $Npr mpi processes"
34    echo ' step = 4 : check the results'    echo ' step = 4 : check the results'
# Line 61  fi Line 63  fi
63  if test $kpr = 1  if test $kpr = 1
64  then  then
65    
66  #- choice of the optfile: take a local one in dir verification with sufix '+mpi'  #- choice of the optfile:
67    #  default: take a local one in dir verification with sufix '+mpi'
68   nbOpF=`ls ../linux_* | grep '+mpi' 2> /dev/null | wc -l`   nbOpF=`ls ../linux_* | grep '+mpi' 2> /dev/null | wc -l`
69    #  or take the one given as argument:
70     if [ $# -ge 3 ]; then
71       if test $2 = '-of' -a -f $3 ; then nbOpF=-1 ; OPTFILE=$3 ; fi
72     fi
73   if test $nbOpF = 1 ; then   if test $nbOpF = 1 ; then
74     OPTFILE=`ls ../linux_* | grep '+mpi'`     OPTFILE=`ls ../linux_* | grep '+mpi'`
    zz=`grep '^FC=' $OPTFILE`  
    echo " Using optfile: $OPTFILE  (compiler=$zz) $MTH"  
75   elif [ $nbOpF -ge 2 ] ; then   elif [ $nbOpF -ge 2 ] ; then
76     echo "pick the 1rst of these ( $nbOpF ) optfiles:"     echo "pick the 1rst of these ( $nbOpF ) optfiles:"
77     ls ../linux_* | grep '+mpi'     ls ../linux_* | grep '+mpi'
78     OPTFILE=`ls ../linux_* | grep '+mpi' | head -1`     OPTFILE=`ls ../linux_* | grep '+mpi' | head -1`
79     zz=`grep '^FC=' $OPTFILE`   elif [ $nbOpF -ne -1 ] ; then
    echo " Using optfile: $OPTFILE  (compiler=$zz) $MTH"  
  else  
80     echo "Pb in finding optfile: found $nbOpF :"     echo "Pb in finding optfile: found $nbOpF :"
81     ls ../linux_* | grep '+mpi' ; exit     ls ../linux_* | grep '+mpi' ; exit
82   fi   fi
83     zz=`grep '^ *FC=' $OPTFILE | tail -1`
84     echo " Using optfile: $OPTFILE  (compiler: $zz) $MTH"
85   zz=`echo $OPTFILE | grep -c '^\/'`   zz=`echo $OPTFILE | grep -c '^\/'`
86   if test $zz = 0 ; then OPTFILE="../$OPTFILE" ; fi   if test $zz = 0 ; then OPTFILE="../$OPTFILE" ; fi
87  #---  #---
# Line 88  then Line 93  then
93   echo ' --- make depend (cpl):'   echo ' --- make depend (cpl):'
94   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
95   tail -5 TTT.mkdepend.$$   tail -5 TTT.mkdepend.$$
96   echo ' --- make (cpl):'   echo ' --- make (cpl):' ; touch TTT.make.$$
97   make > TTT.make.$$ 2>&1  #do_make_syntax.sh obj > TTT.make.$$ 2>&1
98     make >> TTT.make.$$ 2>&1
99   tail -10 TTT.make.$$   tail -10 TTT.make.$$
100   echo ' ' ; cd $dir   echo ' ' ; cd $dir
101    
# Line 101  then Line 107  then
107   echo ' --- make depend (ocn):'   echo ' --- make depend (ocn):'
108   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
109   tail -10 TTT.mkdepend.$$   tail -10 TTT.mkdepend.$$
110   echo ' --- make (ocn):'   echo ' --- make (ocn):' ; touch TTT.make.$$
111   make > TTT.make.$$ 2>&1  #do_make_syntax.sh obj > TTT.make.$$ 2>&1
112     make >> TTT.make.$$ 2>&1
113   tail -10 TTT.make.$$   tail -10 TTT.make.$$
114   echo ' ' ; cd $dir   echo ' ' ; cd $dir
115    
# Line 114  then Line 121  then
121   echo ' --- make depend (atm):'   echo ' --- make depend (atm):'
122   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
123   tail -10 TTT.mkdepend.$$   tail -10 TTT.mkdepend.$$
124   echo ' --- make (atm):'   echo ' --- make (atm):' ; touch TTT.make.$$
125   make > TTT.make.$$ 2>&1  #do_make_syntax.sh obj > TTT.make.$$ 2>&1
126     make >> TTT.make.$$ 2>&1
127   tail -10 TTT.make.$$   tail -10 TTT.make.$$
128   echo ' ' ; cd $dir   echo ' ' ; cd $dir
129    
# Line 222  then Line 230  then
230    mpich=`which mpirun`    mpich=`which mpirun`
231    echo $mpich | grep 'mpich-mx' > /dev/null 2>&1    echo $mpich | grep 'mpich-mx' > /dev/null 2>&1
232    mpichmx=$?    mpichmx=$?
233      echo $mpich | grep 'mpich-1' > /dev/null 2>&1
234      mpich1=$?
235    echo $mpich | grep 'mpich2' > /dev/null 2>&1    echo $mpich | grep 'mpich2' > /dev/null 2>&1
236    mpich2=$?    mpich2=$?
237    if test $mpich2 == 0 ; then    echo $mpich | grep 'openmpi' > /dev/null 2>&1
238    #- with Hydra mpich2 (on baudelaire):    opnmpi=$?
239      echo "execute 'mpirun $RunOpt' :"    if test $mpich1 == 0 ; then
240      mpirun $RunOpt  > std_outp 2>&1    # /usr/local/pkg/mpi/mpi-1.2.4..8a-gm-1.5/pgi/bin/mpirun.ch_gm -pg pr_group -wd $ROOTDIR --gm-kill 5 -v  ./build_cpl/mitgcmuv > std_outp 2>&1
241      #- with mpich-1 (on danton, old aces: ao, geo, itrda):
242        echo "execute 'mpirun -p4pg pr_group -v ./build_cpl/mitgcmuv' :"
243        mpirun -p4pg pr_group -v ./build_cpl/mitgcmuv > std_outp 2>&1
244    elif test $mpichmx == 0 ; then    elif test $mpichmx == 0 ; then
245    #- with mpich-mx (on beagle):    #- with mpich-mx (on beagle):
246      echo "execute 'mpirun -pg pr_group -v ./build_cpl/mitgcmuv' :"      echo "execute 'mpirun -pg pr_group -v ./build_cpl/mitgcmuv' :"
247      mpirun -pg pr_group -v ./build_cpl/mitgcmuv > std_outp 2>&1      mpirun -pg pr_group -v ./build_cpl/mitgcmuv > std_outp 2>&1
248      elif test $mpich2 == 0 -o $opnmpi == 0 ; then
249      #- with Hydra mpich2 (on baudelaire) or with openmpi:
250        echo "execute 'mpirun $RunOpt' :"
251        mpirun $RunOpt  > std_outp 2>&1
252    else    else
253    # /usr/local/pkg/mpi/mpi-1.2.4..8a-gm-1.5/pgi/bin/mpirun.ch_gm -pg pr_group -wd $ROOTDIR --gm-kill 5 -v  ./build_cpl/mitgcmuv > std_outp 2>&1    #- new mpich (mpich2) installation often just put in "mpich" dir
254    #- with mpich-1 (on danton, ACES):      echo "execute 'mpirun $RunOpt' :"
255      echo "execute 'mpirun -p4pg pr_group -v ./build_cpl/mitgcmuv' :"      mpirun $RunOpt  > std_outp 2>&1
     mpirun -p4pg pr_group -v ./build_cpl/mitgcmuv > std_outp 2>&1  
256    fi    fi
257    tail -20 std_outp    tail -20 std_outp
258    ls -l rank_$rnkO/pickup*.ckptA.001.001.data    ls -l rank_$rnkO/pickup*.ckptA.001.001.data

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.22