/[MITgcm]/MITgcm/verification/cpl_aim+ocn/run_cpl_test_itrda
ViewVC logotype

Contents of /MITgcm/verification/cpl_aim+ocn/run_cpl_test_itrda

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Oct 27 23:19:43 2004 UTC (16 years, 9 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint55j_post, checkpoint55i_post
 o cpl_aim+ocn with mnc output from the ocn_compon_interf package
   - works on itrda w/g77 (see: verification/cpl_aim+ocn/itrda_notes.txt)
   - needs testing on cg01 (must remove the mpirun "-wd" option from
     the run_cpl_test script)

1 #! /bin/sh
2
3 # $Header: /u/gcmpack/MITgcm/verification/cpl_aim+ocn/run_cpl_test,v 1.1 2004/10/09 20:08:46 jmc Exp $
4 # $Name: $
5
6 Np=3
7 if [ $# -lt 1 ]
8 then
9 echo 'Usage:'`basename $0`' step '
10 echo ' => test coupled set-up on myrinet cluster'
11 echo 'step = 0 : clean all directories'
12 echo 'step = 1 : compile the 3 executables (cpl,ocn,atm)'
13 echo 'step = 2 : copy input files and dir(s)'
14 echo "step = 3 : run on $Np processor"
15 echo 'step = 4 : check the results'
16 exit
17 fi
18 kpr=$1
19 dir=`pwd`
20
21 #- only works from a 3 nodes PBS bach session ( qsub -I -l nodes=3:p4 )
22 # on myrinet cluster:
23 #xx=`hostname | sed 's/[0-9]/X/g'`
24 #if test $xx != 'myrinet-X-XX'
25 #then
26 # echo ' hostname='`hostname`
27 # echo 'for now, works only on myrinet cluster'
28 # exit 9
29 #fi
30 if test 'dummy'$PBS_NODEFILE = 'dummy'
31 then
32 echo ' $PBS_NODEFILE not defined'
33 echo "for now, works only from a $Np nodes PBS bach session"
34 exit 8
35 else ncpus=`wc -l $PBS_NODEFILE | awk '{print $1}'`
36 if test $ncpus != $Np ; then
37 echo ' Nb of nodes from $PBS_NODEFILE =' $ncpus
38 echo "for now, works only from a $Np nodes PBS bach session"
39 exit 8
40 fi
41 fi
42
43 #============================================================================
44
45 if test $kpr = 0
46 then
47 rm -f genmake_optfile pr_group std_outp
48 rm -f build_???/TTT.*make.* build_???/TTT.mkdepend.*
49 /bin/rm -r -f rank_0 rank_1 rank_2
50 if test -f build_cpl/Makefile ; then cd build_cpl ; make CLEAN ; cd .. ; fi
51 if test -f build_ocn/Makefile ; then cd build_ocn ; make CLEAN ; cd .. ; fi
52 if test -f build_atm/Makefile ; then cd build_atm ; make CLEAN ; cd .. ; fi
53 fi
54
55 if test $kpr = 1
56 then
57
58 #cp -p ~/linux_ia32_ifc+mpi_itrda genmake_optfile
59 ln -s optfile_g77_itrda genmake_optfile
60 echo '==== compile coupler:'
61 cd build_cpl
62 echo ' --- genmake2 (cpl):'
63 ../../../tools/genmake2 -of ../genmake_optfile -mpi -ieee > TTT.genmake.$$
64 tail -5 TTT.genmake.$$
65 echo ' --- make depend (cpl):'
66 make depend > TTT.mkdepend.$$
67 tail -5 TTT.mkdepend.$$
68 echo ' --- make (cpl):'
69 make -j 2 > TTT.make.$$ 2>&1
70 tail -10 TTT.make.$$
71 echo ' ' ; cd $dir
72
73 echo '==== compile OGCM:'
74 cd build_ocn
75 echo ' --- genmake2 (ocn):'
76 ../../../tools/genmake2 -of ../genmake_optfile -mpi -ieee > TTT.genmake.$$
77 tail -5 TTT.genmake.$$
78 echo ' --- make depend (ocn):'
79 make depend > TTT.mkdepend.$$
80 tail -10 TTT.mkdepend.$$
81 echo ' --- make (ocn):'
82 make -j 2 > TTT.make.$$ 2>&1
83 tail -10 TTT.make.$$
84 echo ' ' ; cd $dir
85
86 echo '==== compile AGCM:'
87 cd build_atm
88 echo ' --- genmake2 (atm):'
89 ../../../tools/genmake2 -of ../genmake_optfile -mpi -ieee > TTT.genmake.$$
90 tail -5 TTT.genmake.$$
91 echo ' --- make depend (atm):'
92 make depend > TTT.mkdepend.$$
93 tail -10 TTT.mkdepend.$$
94 echo ' --- make (atm):'
95 make -j 2 > TTT.make.$$ 2>&1
96 tail -10 TTT.make.$$
97 echo ' ' ; cd $dir
98
99 ls -l build_???/mitgcmuv
100
101 fi
102
103 if test $kpr = 2
104 then
105 cp -p -r input_cpl rank_0
106 cp -p -r input_ocn rank_1
107 cp -p -r input_atm rank_2
108
109 cd rank_1
110 ./IMPORT_INPUT_FILES
111 cd $dir
112
113 cd rank_2
114 ./SHARE_OCN_GRID '../rank_1'
115 cd $dir
116
117 rm -rf cpl ocn atm
118 mkdir cpl ocn atm
119 if test -f build_cpl/mitgcmuv ; then cp -p build_cpl/mitgcmuv cpl
120 else echo 'file: build_cpl/mitgcmuv not found => stop'; exit; fi
121 if test -f build_ocn/mitgcmuv ; then cp -p build_ocn/mitgcmuv ocn
122 else echo 'file: build_ocn/mitgcmuv not found => stop'; exit; fi
123 if test -f build_atm/mitgcmuv ; then cp -p build_atm/mitgcmuv atm
124 else echo 'file: build_atm/mitgcmuv not found => stop'; exit; fi
125
126 fi
127
128 if test $kpr = 3
129 then
130 ROOTDIR=$dir
131 rm -f rank_?/pickup*.ckptA.00?.00?.??ta
132 echo $ROOTDIR
133 tmpfil=TTT.$$
134
135 echo $PBS_NODEFILE
136 list=`cat $PBS_NODEFILE`
137 rm -f pr_group ; touch pr_group
138 nc=0 ; dd1=cpl ;
139 for xx in $list
140 do
141 echo $xx $nc $dir/build_$dd1/mitgcmuv >> pr_group
142 if test $nc = 0 ; then dd1=ocn ; else dd1=atm ; fi
143 nc=1
144 done
145
146 cd $ROOTDIR
147 # /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
148 mpirun -p4pg pr_group -v ./build_cpl/mitgcmuv > std_outp 2>&1
149 tail -20 std_outp
150 ls -l rank_?/pickup*.ckptA.001.001.data
151
152 fi
153
154 if test $kpr = 4
155 then
156
157 if test -f rank_1/STDOUT.0000
158 then echo '==> check Ocean output:'
159 /home/jmc/bin/comp_res rank_1/STDOUT.0000 results/ocnSTDOUT.0000
160 echo ' '
161 else echo 'No Ocean output file in rank_1' ; fi
162
163 if test -f rank_2/STDOUT.0000
164 then
165 echo '==> check Atmos output:'
166 /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000
167 echo '==> check Land output:'
168 /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000 L
169 echo '==> check thSIce output:'
170 /home/jmc/bin/comp_res rank_2/STDOUT.0000 results/atmSTDOUT.0000 I
171 echo ' '
172 else echo 'No Atmos output file in rank_1' ; fi
173
174 fi
175
176 exit 0

  ViewVC Help
Powered by ViewVC 1.1.22