/[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.3 by edhill, Thu Oct 28 01:31:36 2004 UTC revision 1.8 by jmc, Thu Mar 30 02:13:59 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
# Line 59  then Line 72  then
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 72  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 85  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 101  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    cp -p -r input_cpl rank_0    cp -p -r input_cpl rank_0
119    cp -p -r input_ocn rank_1    cp -p -r input_ocn rank_1
120    cp -p -r input_atm rank_2    cp -p -r input_atm rank_2
# Line 111  then Line 125  then
125    
126    cd rank_2    cd rank_2
127    ./SHARE_OCN_GRID '../rank_1'    ./SHARE_OCN_GRID '../rank_1'
128      ./IMPORT_INPUT_FILES
129    cd $dir    cd $dir
130    
   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  
   
131  fi  fi
132    
133  if test $kpr = 3  if test $kpr = 3
# Line 142  then Line 149  then
149   done   done
150    
151   cd $ROOTDIR   cd $ROOTDIR
152   /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
153     /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
154   tail -20 std_outp   tail -20 std_outp
155   ls -l rank_?/pickup*.ckptA.001.001.data   ls -l rank_?/pickup*.ckptA.001.001.data
156    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22