1 | ============ |
---|
2 | MPP_PREP |
---|
3 | ============ |
---|
4 | |
---|
5 | Description |
---|
6 | =========== |
---|
7 | MPP_PREP proposes possible domain decompositions for a given |
---|
8 | bathymetric file, which is particularly intersting when |
---|
9 | we want to eliminate land-only domain. |
---|
10 | All solution are proposed and written to output file. |
---|
11 | The ratio between the effective number of computed |
---|
12 | point and the total number of points in the domain is |
---|
13 | given and is probably a major criteria for choosing a |
---|
14 | domain decomposition. |
---|
15 | |
---|
16 | Tools mpp_optimiz_zoom_nc.exe as been tested on one eORCA12 and one eORCA025 configuration at trunk@10036 |
---|
17 | |
---|
18 | Tools mppopt_showproc_nc.exe has not been tested. |
---|
19 | |
---|
20 | Method |
---|
21 | ====== |
---|
22 | Use mpp_init like code for setting up the decomposition |
---|
23 | and evaluate the efficiency of the decomposition. |
---|
24 | |
---|
25 | How to compile it |
---|
26 | ================= |
---|
27 | MPP_PREP is compiled in the same manner as all the other tools. |
---|
28 | The compilation script is maketools and the option are very similar to makenemo. |
---|
29 | |
---|
30 | Here an example of how to compile MPP_PREP on the MetOffice XC40 HPC: |
---|
31 | |
---|
32 | .. code-block:: console |
---|
33 | |
---|
34 | $ ./maketools -n MPP_PREP -m XC40_METO |
---|
35 | |
---|
36 | Usage |
---|
37 | ===== |
---|
38 | |
---|
39 | the MPP_PREP executable is named mpp_optimiz_zoom_nc.exe. The input file needed are: |
---|
40 | |
---|
41 | * a netcdf file containing a variable with 0 on land and data > 0 on ocean (typically a bathymetry file) |
---|
42 | |
---|
43 | * a namelist to specify the number of vertical levels, netcdf input file, variable and dimension names (...). |
---|
44 | A namelist template is available in the file 'namelist'. Default namelist is set up for input file domain_cfg.nc (output of Domaincfg tool) |
---|
45 | and will find decomposition between 100 and 4000 processors. |
---|
46 | |
---|
47 | .. code-block:: console |
---|
48 | |
---|
49 | $ ./mpp_optimiz_zoom_nc.exe -h |
---|
50 | usage : mpp_optimize [ -h ] [-keep jpni jpnj] [ -o file out ] |
---|
51 | [ -modulo val ] [-r ratio] [-minocean procs] -n namelist |
---|
52 | |
---|
53 | PURPOSE : |
---|
54 | This program is build to optimize the domain beakdown into |
---|
55 | subdomain for mpp computing. |
---|
56 | Once the grid size, and the land/sea mask is known, it looks |
---|
57 | for all the possibilities within a range of setting parameters |
---|
58 | and determine the optimal. |
---|
59 | |
---|
60 | Optimization is done with respect to the maximum number of |
---|
61 | sea processors and to the maximum numbers of procs (nn_procmax) |
---|
62 | |
---|
63 | Optional optimization can be performed taking into account |
---|
64 | the maximum available processor memory rn_ppmcal. This is |
---|
65 | activated if ln_memchk is set true in the namelist |
---|
66 | |
---|
67 | Additional criteria can be given on the command line to reduce |
---|
68 | the amount of possible choices. |
---|
69 | |
---|
70 | ARGUMENTS : |
---|
71 | -n namelist : indicate the name of the namelist to use |
---|
72 | |
---|
73 | OPTIONS : |
---|
74 | -h : print this help message |
---|
75 | -keep jpni jpnj : print a file suitable for plotting, |
---|
76 | corresponding to the given decomposition |
---|
77 | -o output file : give the name of the output file |
---|
78 | default is processor.layout |
---|
79 | -modulo val : only retain decomposition whose total number |
---|
80 | of util processors (sea) are a multiple of val |
---|
81 | -r ratio : only retain decomposition with a ratio computed/global |
---|
82 | less or equal to the given ratio |
---|
83 | -minocean procs : only retain decomposition with a number of |
---|
84 | ocean procs greater of equal to procs |
---|
85 | |
---|
86 | REQUIRED FILES : |
---|
87 | A bathymetric file and an ad-hoc namelist are required. |
---|
88 | The file name of the bathymetry is specified in the namelist |
---|
89 | |
---|
90 | OUTPUT : |
---|
91 | processor.layout : an ascii file with all found possibilities |
---|
92 | |
---|
93 | SEE ALSO : |
---|
94 | script screen.ksh helps a lot in the analysis of the output file. |
---|
95 | |
---|
96 | STOP |
---|
97 | |
---|
98 | Example |
---|
99 | ======= |
---|
100 | |
---|
101 | Here is an example of usage of ./mpp_optimiz_zoom_nc.exe on the the eORCA025 bathymetry. We keep in the output only domain decomposition with a ratio (computed/global) lower than 1, using namelist_eORCA025 and output the list of domain decomposition in processor.layout_eORCA025 |
---|
102 | |
---|
103 | .. code-block:: console |
---|
104 | |
---|
105 | $ ./mpp_optimiz_zoom_nc.exe -r 1 -n namelist_eORCA025 -o processor.layout_eORCA025 |
---|
106 | |
---|
107 | ocean/land file used is: domcfg_eORCA025.nc |
---|
108 | variable used to find ocean domain is: bottom_level |
---|
109 | Dimensions (jpi x jpj) are: 1442 x 1207 |
---|
110 | |
---|
111 | Loop over all the decompositions (can take a while) ... |
---|
112 | |
---|
113 | STOP |
---|
114 | |
---|
115 | The output for one specific decomposition contains this information: |
---|
116 | |
---|
117 | .. code-block:: console |
---|
118 | |
---|
119 | iresti= 14 irestj= 9 |
---|
120 | --> Total number of domains 1612 |
---|
121 | |
---|
122 | jpni= 31 jpnj= 52 |
---|
123 | jpi= 49 jpj= 26 |
---|
124 | Number of ocean processors 1074 |
---|
125 | Number of land processors 538 |
---|
126 | Mean ocean coverage per domain 0.7542637596508307 |
---|
127 | Minimum ocean coverage 7.849293761E-4 |
---|
128 | Maximum ocean coverage 1. |
---|
129 | nb of proc with coverage < 10 % 68 |
---|
130 | nb of proc with coverage 10 < nb < 30 % 99 |
---|
131 | nb of proc with coverage 30 < nb < 50 % 59 |
---|
132 | Number of computed points 1368276 |
---|
133 | Overhead of computed points -372218 |
---|
134 | % sup (computed / global) 0.786142349 |
---|
135 | |
---|
136 | Sorting phase |
---|
137 | ============= |
---|
138 | The processor.layout can be very long and hard to exploit. |
---|
139 | To sort out what is the best model decomposition for a specific application, there is a suggestion at the end of the processor.layout file. Otherwise you can use the python script find_layout.py to dig into it. |
---|
140 | |
---|
141 | .. code-block:: console |
---|
142 | |
---|
143 | $ python2.7 find_layout.py |
---|
144 | usage: find_layout.py [-h] -f layout_file --rmax max_ratio --noce min/max_noce |
---|
145 | |
---|
146 | Below an example to extract all decomposition with a ratio (computed/global) < 0.8 and a number of ocean domain between 300 and 350. All the decomposition fitting the criterions are listed. At the end, a summary of the one with the smallest ratio, the largest number of ocean domains and the smallest computed domain. |
---|
147 | |
---|
148 | .. code-block:: console |
---|
149 | |
---|
150 | $ python2.7 find_layout.py -f processor.layout_eORCA025 --rmax 0.8 --noce 300 350 |
---|
151 | Domain decomposition 0 |
---|
152 | domain decomposition (jpni, jpnj) = (13, 32) |
---|
153 | number of ocean domain = 300 |
---|
154 | ratio computed/global = 0.779089153 |
---|
155 | domain size (jpi, jpj) = (113, 40) |
---|
156 | ... |
---|
157 | Domain decomposition 76 |
---|
158 | domain decomposition (jpni, jpnj) = (37, 13) |
---|
159 | number of ocean domain = 350 |
---|
160 | ratio computed/global = 0.783254623 |
---|
161 | domain size (jpi, jpj) = (41, 95) |
---|
162 | |
---|
163 | ===================================================================== |
---|
164 | |
---|
165 | Among the layouts fitting the constraint on : ratio (computed/global) < 0.8 and 300 <= number of ocean domain <= 350 |
---|
166 | |
---|
167 | 3 layouts are highlighted : |
---|
168 | |
---|
169 | Domain decomposition SMALLEST RATIO |
---|
170 | domain decomposition (jpni, jpnj) = (24, 18) |
---|
171 | number of ocean domain = 310 |
---|
172 | ratio computed/global = 0.761956096 |
---|
173 | domain size (jpi, jpj) = (62, 69) |
---|
174 | |
---|
175 | Domain decomposition LARGEST NUMBER OF OCEAN DOMAINS |
---|
176 | domain decomposition (jpni, jpnj) = (21, 23) |
---|
177 | number of ocean domain = 350 |
---|
178 | ratio computed/global = 0.785265565 |
---|
179 | domain size (jpi, jpj) = (71, 55) |
---|
180 | |
---|
181 | Domain decomposition SMALLEST COMPUTED DOMAIN |
---|
182 | domain decomposition (jpni, jpnj) = (18, 27) |
---|
183 | number of ocean domain = 350 |
---|
184 | ratio computed/global = 0.775009871 |
---|
185 | domain size (jpi, jpj) = (82, 47) |
---|