+ All Categories
Home > Documents > CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load...

CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load...

Date post: 27-Mar-2021
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
19
CICE Performance In CESM Tony Craig June 20, 2012 CESM SEWG Mee<ng
Transcript
Page 1: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

CICE Performance In CESM 

Tony Craig 

June 20, 2012 

CESM SEWG Mee<ng 

Page 2: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

Mo<va<on 

•  Understand beCer where <me is spent in CICE 

•  Understand beCer how CICE cost varies as we change the decomposi<on or increase the number of processes 

•  Explore alterna<ve decomposi<ons depending on the outcome of the above assessments 

•  Look for some low hanging fruit wrt code op<miza<on •  Reduce the cost of CICE in CESM and provide more opportuni<es to run on 

a wider range of processes 

Goals 

•  CICE performance is typically on the cri<cal path with respect to overall CESM performance and in some cases is playing an important role in limi<ng CESM throughput 

•  With the current decomposi<ons, CICE runs effec<vely on only limited pe counts 

Page 3: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

Results: Net CICE performance improvement on hopper 

at gx1v6 (<me to run 20 days)    16 pes, 272s  ‐‐>  212s (22%)   64 pes, 91s  ‐‐>  69s (24%)   320 pes, 27s  ‐‐>  21s (22%)   1280 pes, 19s  ‐‐>  10s (43%)  

at tx0.1v2 (<me to run 10 days) 1200 pes, 582s  ‐‐>  361s (38%) 4800 pes, 148s  ‐‐>  112s (24%)  18000 pes, 68s  ‐‐>  68s (0%)  

•  Using updated decomposi<ons and masked halos seems to –  improve performance by > 20% for most cases –  allow us to run on rela<vely arbitrary processor counts 

Page 4: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

0.00 

50.00 

100.00 

150.00 

200.00 

250.00 

300.00 

350.00 

other 

radia<on 

ridge 

horz_trans other 

horz_trans tracer halo 

subcycling halo 

subcycling stress 

therm2 

therm1 

0.00 

5.00 

10.00 

15.00 

20.00 

25.00 

30.00 

CICE Performance in CESM1.1 

•  Computa<on –  Physics – computa<ons only where there 

is sea ice (therm1, therm2) –  Radia<on – new dEdd implementa<on is 

expensive.  computa<ons only where there is sea ice and the sun is up. 

–  EVP subcycling – stress/stepu, cycled about 100 <mes per cice <mestep 

–  Horizontal Transport 

•  Communica<on (halo updates) –  EVP subcycling, cycled about 100 <mes 

per cice <mestep –  Horizontal Transport (tracer updates) –  bound_state (therm2, etc) 

CICE, gx1v6, 16, 64, 320, 1280 pes, NERSC hopper 20 day runs, <me in seconds 

*Performance is ul0mately limited by slowest processor 

8x 

Page 5: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

Performance of CICE •  Computa<onal performance driven by load imbalance to zeroth order, dominant term at low 

process counts and important at high process counts –  CICE computa<ons generally done only where there is sea ice –  Large areas of the CICE grid never have any sea ice –  The radia<on computa<on done where there is sea ice and the sun is up –  CICE varies seasonally and sun angle varies on diurnal cycle and seasonal <mescales 

•  Communica<on is nearest neighbor halo update, it is a cri<cal term at high process counts –  Want to minimize number of messages and size of messages and maximize rela<ve 

nearness of neighbors in communica<on network 

Mask and sample Jan 1 sea ice coverage  Solar Angle on Jan 1 at 0Z 

Page 6: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

Decomposi<on is a Cri<cal Performance Tuning Knob 

•  CICE decomposes the horizontal grid across processes (tasks and/or threads) •  For a given global grid size, “nx” by “ny” 

•  Define a blocksize, “bx” x “by” 

•  Label the blocks 

•  Distribute blocks to processes using some decomposi<on strategy 

1.  Cartesian Square‐POP 

2.  Cartesian SlenderX1 

3.  Cartesian SlenderX2 

4.  Spacecurve (Dennis) 

5.  Roundrobin (New‐ish) 

6.  Blkrobin (New) 

7.  Blkcart (New) nx_global = 16 bx = 4 

ny_global = 16 by = 4 

blocks 9‐12 > 

blocks 1‐4 > 

blocks 5‐8 > 

blocks 13‐16 > 

blue=pe 0 red = pe 1 green = pe 2 yellow = pe 3 

Page 7: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

1. cartesian square‐pop 

Blocks aligned into con<guous “squares” 

blocksize = 8 x 6, 8 blocks per processor 

Good •  size of halo (low aspect ra<o) •  number of neighbors (8)  

OK •  limited pe counts 

Poor •  cice load balance (N/S and radia<on) 

•  land block elimina<on 

block alloca<on to processors 

pes 80‐90 

Page 8: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

2. cartesian slenderX1 

Blocks aligned “ver<cally”, span en<re J index space 

blocksize = 1 x 48, 8 blocks/processor 

Good •  cice load balance (N/S and radia<on) •  number of neighbors (2)  

OK •  size of halo (high aspect ra<o) 

Poor •  limited pe counts (320, 160, 80, 64, 

etc) 

•  land block elimina<on 

block alloca<on to processors 

pes 80‐90 

Page 9: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

3. cartesian slenderX2 

Blocks aligned “ver<cally”, span half J index space 

blocksize = 2 x 24, 8 blocks per processor 

Good •  cice load balance (N/S) •  number of neighbors (5)  

OK •  cice load balance (radia<on) •  size of halo (high aspect ra<o) 

Poor •  limited pe counts (640, 320, 160, 80, 

64, etc) •  land block elimina<on 

block alloca<on to processors 

pes 80‐90 

Page 10: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

4. spacecurve* 

Blocks allocated linearly along spacecurve aper land block elimina<on 

blocksize = 8 x 6, 8 blocks/processor 

Good •  size of halo •  number of neighbors (~8)  •  flexible pe counts 

•  land block elimina<on 

Poor •  cice load balance (N/S and radia<on) 

block alloca<on to processors 

*credit to John Dennis 

Page 11: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

5. roundrobin 

Blocks allocated round robin (lep to right) aper land block elimina<on 

blocksize = 8 x 6, 8 blocks/processor 

Good •  cice load balance (N/S and radia<on) •  arbitrary pe counts •  land block elimina<on 

Poor •  size of halo (local blocks not con<guous) •  number of neighbors (2+6*number of 

blocks/processor)  

block alloca<on to processors 

pes 80‐90 

Page 12: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

6. blkrobin 

Blocks allocated round robin “grouped” (back and forth) aper land block elimina<on 

blocksize = 8 x 6, 8 blocks/processor 

Good •  cice load balance (N/S and radia<on) •  arbitrary pe counts •  land block elimina<on 

OK •  size of halo (local blocks partly 

con<guous) 

•  number of neighbors (26)  

block alloca<on to processors 

pes 80‐90 

Page 13: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

7. blkcart 

Blocks allocated into quadrants preserving neighbors. 

blocksize = 8 x 6, 8 blocks/processor 

Good •  cice load balance (N/S and radia<on) •  number of neighbors (8)  

OK •  size of halo (local blocks partly 

con<guous) 

•  somewhat flexible pe counts (mul<ples of 4 blocks per processor) 

Poor •  land block elimina<on 

block alloca<on to processors 

pes 80‐90 

Page 14: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

Grading CICE Decomposi<ons 

decomposi)on  cice load balance north/south 

cice load balance radia)on 

number of neighbors 

amount of data to communicate 

land block elimina)on in decomp 

flexibility wrt pe counts 

1. cartesian square‐pop  F  F  B  A  F  C 

2. cartesian slenderX1  A  B  A  C  F  F 

3. cartesian slenderX2  B  C  B  B  F  F 4. spacecurve  D  D  B  B  A  A 5. roundrobin  A  A  D  D  A  A 6. blkrobin  B  A  C  C  A  A 7. blkcart  B  A  B  C  F  C 

Page 15: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

CICE Timing Tes<ng  for gx1v6, 320 pes, hopper 

(<me for 20 days) 

0.00 

10.00 

20.00 

30.00 

40.00 

50.00 

60.00 

70.00 

80.00 

slen

derX2+masked halos (2x96 2) 

slen

derX2+masked halos (2x24 8) 

blkrob

in+m

asked halos (8x6 8) 

slen

derX1+masked halos (1x48 8) 

blkrob

in+m

asked halos (2x24 8) 

blkcart+masked halos (8x12 4) 

slen

derX1+masked halos (1x192

 2) 

slen

derX2 (2x192

 1) 

slen

derX2 (2x96 2) 

blkcart (8x12

 4) 

blkcart (4x24

 4) 

slen

derX2 (2x24 8) 

blkcart (8x6 8) 

slen

derX2 (2x24 8) 

blkcart (8x6 8) 

blkcart (2x48

 4) 

slen

derX1 (1x48 8) 

spacecurve (8

x6 8) 

spacecurve (8

x6 8) 

blkrob

in (8

x6 8) 

blkrob

in (8

x8 6) 

blkrob

in (2

x24 8) 

blkrob

in (2

x24 8) 

roun

drob

in (8

x12 4) 

square‐pop

 (8x6 8) 

square‐pop

 (8x6 8) 

roun

drob

in (8

x6 8) 

square‐pop

 (2x24 8) 

roun

drob

in (2

x24 8) 

other 

radia<on 

ridge 

horz_trans other 

horz_trans tracer halo 

subcycling halo 

subcycling stress 

therm2 

therm1 

current default 

Page 16: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

CICE Code Changes 

•  New Decomposi<ons •  Masked Halos 

–  Most of the data “haloed” in CICE is unnecessary –  Can update the halo data structure on the fly quickly to remove both 

messages and gridcells that don’t need to be communicated –  There may be some overhead in seung up the masked halo –  Set via namelist, default is “on” 

•  Overlapping Work and Communica<on –  ACempted in subcycling with limited success –  Works well if communica<on and work are about the same –  Load imbalance across processes impacts effec<veness –  Has some overhead –  Set via namelist, default is “off” 

Page 17: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

Results: Net CICE performance improvement on hopper 

at gx1v6 (<me to run 20 days)    16 pes, 272s ‐> 212s (roundrobin+masked halos, 20x48, 8)   64 pes, 91s ‐> 69s (blkrobin+masked halos, 10x24, 8)   320 pes, 27s ‐> 21s (slenderX2+masked halos, 2x96, 2)   1280 pes, 19s ‐> 10s (spacecurve+masked halos, 8x6, 2)  

at tx0.1v2 (<me to run 10 days) 1200 pes, 582s ‐> 361s (blkrobin+masked halos, 40x30, 6) 4800 pes, 148s ‐> 112s (blkrobin+masked halos, 15x15, 8)  18000 pes, 68s ‐> 68s (spacecurve, 6x6, 14)  

•  Using updated decomposi<ons and masked halos seems to –  improve performance by > 20% for most cases –  allow us to run on rela<vely arbitrary processor counts 

Page 18: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

Status 

•  bit‐for‐bit valida<on con<nues (displaced pole/tripole, threading, decomps, masked halos, various hardware) 

•  Running performance tests on other plavorms  

•  Upda<ng automa<c cice decomp genera<on tool to provide “reasonable” default decomps for all resolu<ons and pe counts 

•  Improved weigh<ng for spacecurve decomp being explored (John Dennis) •  Hope to have an updated CICE version in CESM1.1 in July 

•  High resolu<on explora<on on Yellowstone high priority 

Page 19: CICE Performance In CESM...• cice load balance (N/S) • number of neighbors (5) OK • cice load balance (radiaon) • size of halo (high aspect rao) Poor • limited pe counts

Conclusions 

•  Using updated decomps and masked halos seems to –  improve performance by > 20% for most cases –  allow us to run on rela<vely arbitrary processor counts 

•  Now have a beCer sense of how the CICE performance varies with resolu<on and decomposi<on – how do we share this informa<on with the community? 

•  Determining the op<mal block size, decomposi<on, and thread count for a given resolu<on, target processor count, and hardware s<ll requires tes<ng 

•  S<ll want to understand performance beCer at highest resolu<on and highest processor counts 

•  Future Work ? –  “CICE performance simulator” –  Other decomposi<on strategies –  Allow dis<nct dynamics and physics decomposi<ons (like CAM) –  Persistent Communica<on (Monika Lücke, GRS) –  More detailed algorithm profiling to iden<fy poorly performing kernels 


Recommended