/[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.10 by jmc, Wed Nov 7 01:45:02 2007 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 genmake_optfile 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 genmake_optfile 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       yy=`ls ../linux_*.mpi` ; cp -p $yy genmake_optfile
52       zz=`grep '^FC=' genmake_optfile`
53       echo " Using optfile: $yy  (compiler=$zz)"
54     else echo 'Pb in finding optfile' ; exit;
55     fi
56    #---
57   echo '==== compile coupler:'   echo '==== compile coupler:'
58   cd build_cpl   cd build_cpl
59   echo ' --- genmake2 (cpl):'   echo ' --- genmake2 (cpl):'
60   ../../../tools/genmake2 -of ../genmake_optfile $Opt >  TTT.genmake.$$   ../../../tools/genmake2 -of ../genmake_optfile -mpi -ieee >  TTT.genmake.$$
61   tail -5 TTT.genmake.$$   tail -5 TTT.genmake.$$
62   echo ' --- make depend (cpl):'   echo ' --- make depend (cpl):'
63   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
# Line 85  then Line 70  then
70   echo '==== compile OGCM:'   echo '==== compile OGCM:'
71   cd build_ocn   cd build_ocn
72   echo ' --- genmake2 (ocn):'   echo ' --- genmake2 (ocn):'
73   ../../../tools/genmake2 -of ../genmake_optfile $Opt >  TTT.genmake.$$   ../../../tools/genmake2 -of ../genmake_optfile -mpi -ieee >  TTT.genmake.$$
74   tail -5 TTT.genmake.$$   tail -5 TTT.genmake.$$
75   echo ' --- make depend (ocn):'   echo ' --- make depend (ocn):'
76   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
# Line 98  then Line 83  then
83   echo '==== compile AGCM:'   echo '==== compile AGCM:'
84   cd build_atm   cd build_atm
85   echo ' --- genmake2 (atm):'   echo ' --- genmake2 (atm):'
86   ../../../tools/genmake2 -of ../genmake_optfile $Opt >  TTT.genmake.$$   ../../../tools/genmake2 -of ../genmake_optfile -mpi -ieee >  TTT.genmake.$$
87   tail -5 TTT.genmake.$$   tail -5 TTT.genmake.$$
88   echo ' --- make depend (atm):'   echo ' --- make depend (atm):'
89   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
# Line 139  then Line 124  then
124   echo $ROOTDIR   echo $ROOTDIR
125   tmpfil=TTT.$$   tmpfil=TTT.$$
126    
  echo $PBS_NODEFILE  
  list=`cat $PBS_NODEFILE`  
127   rm -f pr_group ; touch pr_group   rm -f pr_group ; touch pr_group
128   nc=0 ; dd1=cpl ;   nc=0; xx=`hostname`
129   for xx in $list   for dd1 in cpl ocn atm
130   do   do
131    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  
132    nc=1    nc=1
133   done   done
134    
135   cd $ROOTDIR   cd $ROOTDIR
136   #  -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
137   /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
138   tail -20 std_outp   tail -20 std_outp
139   ls -l rank_?/pickup*.ckptA.001.001.data   ls -l rank_?/pickup*.ckptA.001.001.data
140    
# Line 164  then Line 146  then
146   if test -f rank_1/STDOUT.0000   if test -f rank_1/STDOUT.0000
147   then echo '==> check Ocean output:'   then echo '==> check Ocean output:'
148      /home/jmc/bin/comp_res rank_1/STDOUT.0000 results/ocnSTDOUT.0000      /home/jmc/bin/comp_res rank_1/STDOUT.0000 results/ocnSTDOUT.0000
149     echo ' '      mv -f comp_res.log comp_res.ocn
150        echo ' '
151   else echo 'No Ocean output file in rank_1' ; fi   else echo 'No Ocean output file in rank_1' ; fi
152    
153   if test -f rank_2/STDOUT.0000   if test -f rank_2/STDOUT.0000
154   then   then
155      echo '==> check Atmos output:'      echo '==> check Atmos output:'
156      /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000      /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000
157        mv -f comp_res.log comp_res.atm
158      echo '==> check Land output:'      echo '==> check Land output:'
159      /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
160        mv -f comp_res.log comp_res.land
161      echo '==> check thSIce output:'      echo '==> check thSIce output:'
162      /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
163     echo ' '      mv -f comp_res.log comp_res.sice
164        echo ' '
165   else echo 'No Atmos output file in rank_1' ; fi   else echo 'No Atmos output file in rank_1' ; fi
166    
167  fi  fi

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

  ViewVC Help
Powered by ViewVC 1.1.22