Skip to content

Commit 6b5c589

Browse files
authored
Merge pull request #519 from fossell/update_v11_2D_docs
Update v11 2-d docs
2 parents 79f68d9 + bb8ed1a commit 6b5c589

File tree

2 files changed

+58
-9
lines changed

2 files changed

+58
-9
lines changed

docs/2D-decomp.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,51 @@ The structural changes needed for the 2D decomposition are implemented in MPI_FI
1717

1818
Both MPI_FIRST.f and EXCH.f contain significant additional test code to exchange arrays containing grid coordinates and ensure EXACT matches for all exchanges before the domain exchanges are performed. This is intended to trap errors in the larger variety of 2D decomposition layouts that are possible and most of it can eventually be removed or made conditional at build and run time.
1919

20-
Indices and variables to facilitate the 2D decomposition are found in CTLBLK.f and shared in the rest of UPP through use of CTLBLK.mod.
20+
The following is found in CTLBLK.f and shared in the rest of UPP through use of CTLBLK.mod:
21+
22+
| Variable | Type | Description |
23+
|---------|------|-------------|
24+
| im | integer | full longitude domain|
25+
| jm | integer | full latitude domain|
26+
| | | |
27+
| jsta | integer | start latitude on a task subdomain|
28+
| jend | integer | end latitude on a task subdomain|
29+
| ista | integer | start longitude on a task subdomain|
30+
| iend | integer | end longitude on a task subdomain|
31+
| | | |
32+
| ista_2l | integer |start longitude -2 of the subdomain|
33+
| iend_2u | integer |end longitude +2 of the subdomain|
34+
| jsta_2l | integer |start latitude -2 of the subdomain|
35+
| jend_2u | integer |end latitude +2 of the subdomain|
36+
37+
The shape of the subdomain is ista_2l:iend_2u,jsta_2l:jend_2u so it includes the halos although the halos are not populated until exchange is done in EXCH.f. Because of halos we need more bounds defined:
38+
39+
| Variable | Type | Description |
40+
|---------|------|-------------|
41+
| jsta_m | integer | Beginning latitude loop index in subdomain for halo depth 1 |
42+
| jend_m | integer | ending latitude loop index in subdomain for halo depth 1 |
43+
| jsta_m2 | integer | second latitude below begin latitude of subdomain for halo depth 2 (in NGMFLD.f) |
44+
| jend_m2 | integer | second latitude above end latitude of subdomain for halo depth 2 ( in NGMFLD.f) |
45+
46+
Note:<ul><li>In interior subdomains these are the same as jsta and jend.</li><li>In boundary subdomains these loop indices define a smaller subset of the subdomain since halos are not defined on the full domain boundaries and stencils must be restricted to valid full domain points. </li></ul>
47+
48+
| Variable | Type | Description |
49+
|---------|------|-------------|
50+
| ista_m | integer | begining longitude loop index in subdomain for halo depth 1|
51+
| iend_m | integer | end longitude loop index in subdomain for halo depth 1 |
52+
| ista_m2 | integer | second longitude before begin longitude for halo depth 2 (not used as of 6/22)|
53+
| iend_m2 | integer | second longitude after end longitude for halo depth 2 (not used as of 6/22) |
54+
55+
Note:<ul><li>In interior subdomains these are the same as ista and iend.</li><li>In boundary subdomains these loop indices define a smaller subset of the subdomain since halos are not defined on the full domain boundaries and stencils must be restricted to valid full domain points.</li></ul>
56+
57+
58+
| Variable | Type | Description |
59+
|---------|------|-------------|
60+
| ileft | integer | MPI rank containing the last longitude before ista
61+
| iright | integer | MPI rank containing the first longitude after iend
62+
| iup | integer | MPI rank containing the first latitude after jend
63+
| idn | integer | MPI rank containing the last latitude before jsta
64+
| | | |
65+
| ileftb | integer |MPI rank containing the last longitude before ista but for cyclic boundary conditions where "last" at the beginning is the other end of the domain (apparently unused and replaced with local calculation) |
66+
| irightb | integer | MPI rank containing the first longitude after iend but for cyclic boundary conditions where "first" at the beginning is the other end of the domain (apparently unused and replaced with local calculation) |
2167

sorc/ncep_post.fd/MPI_FIRST.f

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,17 @@ SUBROUTINE MPI_FIRST()
130130

131131
! global loop ranges
132132
!
133-
! para_range2 supports a 2D decomposition. The rest of the post
134-
! supports 1D still and the call here is the special case where each
135-
! processor gets all of the longitudes in the latitude 1D subdomain
136-
! jsta:jend. The X decomposition will be specified by the third
137-
! argument (currently 1) and the Y decoposition will be specified by
138-
! the fourth argument (currently all of the ranks) When X is
139-
! subdivided the third and fourth arguments will have to be integral
140-
! factors of num_procs
133+
! para_range2 supports a 2D decomposition.
134+
! The X decomposition is specified by the third
135+
! argument and the Y decoposition is specified by
136+
! the fourth argument. The product of the third and fourth arguments
137+
! must be num_procs and the third and fourth arguments must be integral
138+
! factors of num_procs.
139+
!
140+
! for the special case of 1D decomposition, numx is set to 1 and the
141+
! fourth argument becomes the number of MPI ranks for the job. numx=1
142+
! makes the code fully compatible with the old 1D decomposition.
143+
141144

142145
call para_range2(im,jm,numx,num_procs/numx,me,ista,iend,jsta,jend)
143146

0 commit comments

Comments
 (0)