/[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.19 by jmc, Fri Jun 22 20:46:06 2012 UTC revision 1.20 by jmc, Wed Jan 16 13:40:04 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  #---  #---

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

  ViewVC Help
Powered by ViewVC 1.1.22