/[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.9 by jmc, Mon Jul 17 01:34:23 2006 UTC revision 1.12 by jmc, Wed Apr 29 19:25:29 2009 UTC
# Line 4  Line 4 
4  # $Name$  # $Name$
5    
6  Np=3  Np=3
 Opt=' '  
 Opt='-ieee'  
7  if [ $# -lt 1 ]  if [ $# -lt 1 ]
8  then  then
9    echo 'Usage:'`basename $0`' step '    echo 'Usage:'`basename $0`' step '
10    echo ' => test coupled set-up on myrinet cluster'    echo ' => test coupled set-up on linux box (1.cpu)'
11    echo 'step = 0 : clean all directories'    echo 'step = 0 : clean all directories'
12    echo 'step = 1 : compile the 3 executables (cpl,ocn,atm)'    echo 'step = 1 : compile the 3 executables (cpl,ocn,atm)'
13    echo 'step = 2 : copy input files and dir(s)'    echo 'step = 2 : copy input files and dir(s)'
14    echo "step = 3 : run on $Np processor"    echo "step = 3 : run with $Np mpi processes"
15    echo 'step = 4 : check the results'    echo 'step = 4 : check the results'
16    echo 'step = 5 : remove output files in rank_0,1,2 dir.'    echo 'step = 5 : remove output files in rank_0,1,2 dir.'
17    exit    exit
# Line 21  fi Line 19  fi
19  kpr=$1  kpr=$1
20  dir=`pwd`  dir=`pwd`
21    
 #- only works from a 3 nodes PBS bach session ( qsub -I -l nodes=3:p4 )  
 #  on myrinet cluster:  
 xx=`hostname | sed 's/[0-9]/X/g'`  
 if test $xx != 'myrinet-X-XX'  
 then  
   echo ' hostname='`hostname`  
   echo 'for now, works only on myrinet cluster'  
   exit 9  
 fi  
 if test 'dummy'$PBS_NODEFILE = 'dummy'  
 then  
   echo ' $PBS_NODEFILE not defined'  
   echo "for now, works only from a $Np nodes PBS bach session"  
   exit 8  
 else ncpus=`wc -l $PBS_NODEFILE | awk '{print $1}'`  
  if test $ncpus != $Np ; then  
   echo ' Nb of nodes from $PBS_NODEFILE =' $ncpus  
   echo "for now, works only from a $Np nodes PBS bach session"  
   exit 8  
  fi  
 fi  
   
22  #============================================================================  #============================================================================
23    
24  if test $kpr = 0  if test $kpr = 0
25  then  then
26   rm -f genmake_optfile pr_group std_outp   rm -f pr_group std_outp comp_res.{ocn,atm,land,sice}
27   rm -f build_???/TTT.*make.* build_???/TTT.mkdepend.*   rm -f build_???/TTT.*make.* build_???/TTT.mkdepend.*
28   /bin/rm -r -f rank_0 rank_1 rank_2   /bin/rm -r -f rank_0 rank_1 rank_2
29   if test -f build_cpl/Makefile ; then cd build_cpl ; make CLEAN ; cd .. ; fi   if test -f build_cpl/Makefile ; then cd build_cpl ; make CLEAN ; cd .. ; fi
# Line 57  fi Line 33  fi
33  if test $kpr = 5  if test $kpr = 5
34  then  then
35   echo 'remove output files in rank_0,1,2 dir.'   echo 'remove output files in rank_0,1,2 dir.'
36   rm -f pr_group std_outp   rm -f pr_group std_outp comp_res.{ocn,atm,land,sice}
37   if test -d rank_0 ; then cd rank_0 ; rm -f Coupler.0000.clog ; cd .. ; fi   if test -d rank_0 ; then cd rank_0 ; rm -f Coupler.0000.clog ; cd .. ; fi
38   if test -d rank_1   if test -d rank_1
39   then cd rank_1 ; rm -f *.data *.meta STD???.0000 UV-*.0001.clog ; cd .. ; fi   then cd rank_1 ; rm -f *.data *.meta STD???.0000 UV-*.0001.clog ; cd .. ; fi
# Line 68  fi Line 44  fi
44  if test $kpr = 1  if test $kpr = 1
45  then  then
46    
47   cp -p ../../tools/build_options/linux_ia32_ifc+mpi_cg01 genmake_optfile  #- choice of the optfile: take a local one in dir verification with sufix '+mpi'
48     nbOpF=`ls ../linux_*+mpi 2> /dev/null | wc -l`
49     if test $nbOpF = 1
50     then
51       OPTFILE=`ls ../linux_*+mpi`
52       zz=`grep '^FC=' $OPTFILE`
53       echo " Using optfile: $OPTFILE  (compiler=$zz)"
54     else echo 'Pb in finding optfile' ; exit;
55     fi
56     zz=`echo $OPTFILE | grep -c '^\/'`
57     if test $zz = 0 ; then OPTFILE="../$OPTFILE" ; fi
58    #---
59   echo '==== compile coupler:'   echo '==== compile coupler:'
60   cd build_cpl   cd build_cpl
61   echo ' --- genmake2 (cpl):'   echo ' --- genmake2 (cpl):'
62   ../../../tools/genmake2 -of ../genmake_optfile $Opt >  TTT.genmake.$$   ../../../tools/genmake2 -of $OPTFILE -mpi -ieee >  TTT.genmake.$$
63   tail -5 TTT.genmake.$$   tail -5 TTT.genmake.$$
64   echo ' --- make depend (cpl):'   echo ' --- make depend (cpl):'
65   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
# Line 85  then Line 72  then
72   echo '==== compile OGCM:'   echo '==== compile OGCM:'
73   cd build_ocn   cd build_ocn
74   echo ' --- genmake2 (ocn):'   echo ' --- genmake2 (ocn):'
75   ../../../tools/genmake2 -of ../genmake_optfile $Opt >  TTT.genmake.$$   ../../../tools/genmake2 -of $OPTFILE -mpi -ieee >  TTT.genmake.$$
76   tail -5 TTT.genmake.$$   tail -5 TTT.genmake.$$
77   echo ' --- make depend (ocn):'   echo ' --- make depend (ocn):'
78   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
# Line 98  then Line 85  then
85   echo '==== compile AGCM:'   echo '==== compile AGCM:'
86   cd build_atm   cd build_atm
87   echo ' --- genmake2 (atm):'   echo ' --- genmake2 (atm):'
88   ../../../tools/genmake2 -of ../genmake_optfile $Opt >  TTT.genmake.$$   ../../../tools/genmake2 -of $OPTFILE -mpi -ieee >  TTT.genmake.$$
89   tail -5 TTT.genmake.$$   tail -5 TTT.genmake.$$
90   echo ' --- make depend (atm):'   echo ' --- make depend (atm):'
91   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
# Line 139  then Line 126  then
126   echo $ROOTDIR   echo $ROOTDIR
127   tmpfil=TTT.$$   tmpfil=TTT.$$
128    
  echo $PBS_NODEFILE  
  list=`cat $PBS_NODEFILE`  
129   rm -f pr_group ; touch pr_group   rm -f pr_group ; touch pr_group
130   nc=0 ; dd1=cpl ;   nc=0; xx=`hostname`
131   for xx in $list   for dd1 in cpl ocn atm
132   do   do
133    echo $xx $nc $dir/build_$dd1/mitgcmuv >> pr_group    echo $xx $nc $dir/build_$dd1/mitgcmuv >> pr_group
   if test $nc = 0 ; then dd1=ocn ; else dd1=atm ; fi  
134    nc=1    nc=1
135   done   done
136    
137   cd $ROOTDIR   cd $ROOTDIR
138   #  -wd $ROOTDIR  # /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
139   /usr/local/pkg/mpi/mpi-1.2.4..8a-gm-1.5/pgi/bin/mpirun.ch_gm -pg pr_group --gm-kill 5 -v  ./build_cpl/mitgcmuv > std_outp 2>&1   mpirun -p4pg pr_group -v ./build_cpl/mitgcmuv > std_outp 2>&1
140   tail -20 std_outp   tail -20 std_outp
141   ls -l rank_?/pickup*.ckptA.001.001.data   ls -l rank_?/pickup*.ckptA.001.001.data
142    
# Line 164  then Line 148  then
148   if test -f rank_1/STDOUT.0000   if test -f rank_1/STDOUT.0000
149   then echo '==> check Ocean output:'   then echo '==> check Ocean output:'
150      /home/jmc/bin/comp_res rank_1/STDOUT.0000 results/ocnSTDOUT.0000      /home/jmc/bin/comp_res rank_1/STDOUT.0000 results/ocnSTDOUT.0000
151     echo ' '      mv -f comp_res.log comp_res.ocn
152        echo ' '
153   else echo 'No Ocean output file in rank_1' ; fi   else echo 'No Ocean output file in rank_1' ; fi
154    
155   if test -f rank_2/STDOUT.0000   if test -f rank_2/STDOUT.0000
156   then   then
157      echo '==> check Atmos output:'      echo '==> check Atmos output:'
158      /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000      /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000
159        mv -f comp_res.log comp_res.atm
160      echo '==> check Land output:'      echo '==> check Land output:'
161      /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000 L      /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000 L
162        mv -f comp_res.log comp_res.land
163      echo '==> check thSIce output:'      echo '==> check thSIce output:'
164      /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000 I      /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000 I
165     echo ' '      mv -f comp_res.log comp_res.sice
166        echo ' '
167   else echo 'No Atmos output file in rank_1' ; fi   else echo 'No Atmos output file in rank_1' ; fi
168    
169  fi  fi

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22