/[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.2 by edhill, Wed Oct 27 23:19:43 2004 UTC revision 1.9 by jmc, Mon Jul 17 01:34:23 2006 UTC
# Line 4  Line 4 
4  # $Name$  # $Name$
5    
6  Np=3  Np=3
7    Opt=' '
8    Opt='-ieee'
9  if [ $# -lt 1 ]  if [ $# -lt 1 ]
10  then  then
11    echo 'Usage:'`basename $0`' step '    echo 'Usage:'`basename $0`' step '
# Line 13  then Line 15  then
15    echo 'step = 2 : copy input files and dir(s)'    echo 'step = 2 : copy input files and dir(s)'
16    echo "step = 3 : run on $Np processor"    echo "step = 3 : run on $Np processor"
17    echo 'step = 4 : check the results'    echo 'step = 4 : check the results'
18      echo 'step = 5 : remove output files in rank_0,1,2 dir.'
19    exit    exit
20  fi  fi
21  kpr=$1  kpr=$1
# Line 44  fi Line 47  fi
47    
48  if test $kpr = 0  if test $kpr = 0
49  then  then
50   rm -f genmake_optfile pr_group std_outp   rm -f genmake_optfile pr_group std_outp
51   rm -f build_???/TTT.*make.* build_???/TTT.mkdepend.*   rm -f build_???/TTT.*make.* build_???/TTT.mkdepend.*
52   /bin/rm -r -f rank_0 rank_1 rank_2   /bin/rm -r -f rank_0 rank_1 rank_2
53   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
54   if test -f build_ocn/Makefile ; then cd build_ocn ; make CLEAN ; cd .. ; fi   if test -f build_ocn/Makefile ; then cd build_ocn ; make CLEAN ; cd .. ; fi
55   if test -f build_atm/Makefile ; then cd build_atm ; make CLEAN ; cd .. ; fi   if test -f build_atm/Makefile ; then cd build_atm ; make CLEAN ; cd .. ; fi
56  fi  fi
57    if test $kpr = 5
58    then
59     echo 'remove output files in rank_0,1,2 dir.'
60     rm -f pr_group std_outp
61     if test -d rank_0 ; then cd rank_0 ; rm -f Coupler.0000.clog ; cd .. ; fi
62     if test -d rank_1
63     then cd rank_1 ; rm -f *.data *.meta STD???.0000 UV-*.0001.clog ; cd .. ; fi
64     if test -d rank_2
65     then cd rank_2 ; rm -f *.data *.meta STD???.0000 UV-*.0001.clog ; cd .. ; fi
66    fi
67    
68  if test $kpr = 1  if test $kpr = 1
69  then  then
70    
71   # cp -p ../../tools/build_options/linux_ia32_ifc+mpi_cg01 genmake_optfile   cp -p ../../tools/build_options/linux_ia32_ifc+mpi_cg01 genmake_optfile
  cp optfile genmake_optfile  
72   echo '==== compile coupler:'   echo '==== compile coupler:'
73   cd build_cpl   cd build_cpl
74   echo ' --- genmake2 (cpl):'   echo ' --- genmake2 (cpl):'
75   ../../../tools/genmake2 -of ../genmake_optfile -ieee >  TTT.genmake.$$   ../../../tools/genmake2 -of ../genmake_optfile $Opt >  TTT.genmake.$$
76   tail -5 TTT.genmake.$$   tail -5 TTT.genmake.$$
77   echo ' --- make depend (cpl):'   echo ' --- make depend (cpl):'
78   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
# Line 73  then Line 85  then
85   echo '==== compile OGCM:'   echo '==== compile OGCM:'
86   cd build_ocn   cd build_ocn
87   echo ' --- genmake2 (ocn):'   echo ' --- genmake2 (ocn):'
88   ../../../tools/genmake2 -of ../genmake_optfile -ieee >  TTT.genmake.$$   ../../../tools/genmake2 -of ../genmake_optfile $Opt >  TTT.genmake.$$
89   tail -5 TTT.genmake.$$   tail -5 TTT.genmake.$$
90   echo ' --- make depend (ocn):'   echo ' --- make depend (ocn):'
91   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
# Line 86  then Line 98  then
98   echo '==== compile AGCM:'   echo '==== compile AGCM:'
99   cd build_atm   cd build_atm
100   echo ' --- genmake2 (atm):'   echo ' --- genmake2 (atm):'
101   ../../../tools/genmake2 -of ../genmake_optfile -ieee >  TTT.genmake.$$   ../../../tools/genmake2 -of ../genmake_optfile $Opt >  TTT.genmake.$$
102   tail -5 TTT.genmake.$$   tail -5 TTT.genmake.$$
103   echo ' --- make depend (atm):'   echo ' --- make depend (atm):'
104   make depend > TTT.mkdepend.$$   make depend > TTT.mkdepend.$$
# Line 102  fi Line 114  fi
114    
115  if test $kpr = 2  if test $kpr = 2
116  then  then
117      /bin/rm -r -f rank_0 rank_1 rank_2
118      echo 'CP dir:' input_cpl '->' rank_0
119    cp -p -r input_cpl rank_0    cp -p -r input_cpl rank_0
   cp -p -r input_ocn rank_1  
   cp -p -r input_atm rank_2  
120    
121      echo 'CP dir:' input_ocn '->' rank_1
122      cp -p -r input_ocn rank_1
123    cd rank_1    cd rank_1
124    ./IMPORT_INPUT_FILES    ./prepare_run
125    cd $dir    cd $dir
126    
127      echo 'CP dir:' input_atm '->' rank_2
128      cp -p -r input_atm rank_2
129    cd rank_2    cd rank_2
130    ./SHARE_OCN_GRID '../rank_1'    ./prepare_run
131    cd $dir    cd $dir
132    
   mkdir cpl ocn atm  
   if test -f build_cpl/mitgcmuv ; then cp -p build_cpl/mitgcmuv cpl  
   else echo 'file: build_cpl/mitgcmuv not found => stop'; exit; fi  
   if test -f build_ocn/mitgcmuv ; then cp -p build_ocn/mitgcmuv ocn  
   else echo 'file: build_ocn/mitgcmuv not found => stop'; exit; fi  
   if test -f build_atm/mitgcmuv ; then cp -p build_atm/mitgcmuv atm  
   else echo 'file: build_atm/mitgcmuv not found => stop'; exit; fi  
   
133  fi  fi
134    
135  if test $kpr = 3  if test $kpr = 3
# Line 143  then Line 151  then
151   done   done
152    
153   cd $ROOTDIR   cd $ROOTDIR
154   /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   #  -wd $ROOTDIR
155     /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
156   tail -20 std_outp   tail -20 std_outp
157   ls -l rank_?/pickup*.ckptA.001.001.data   ls -l rank_?/pickup*.ckptA.001.001.data
158    

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

  ViewVC Help
Powered by ViewVC 1.1.22