Local search to improve task mapping Balzuweit*, Bunde*, - - PowerPoint PPT Presentation

local search to improve task mapping
SMART_READER_LITE
LIVE PREVIEW

Local search to improve task mapping Balzuweit*, Bunde*, - - PowerPoint PPT Presentation

9 12 6 Operating system (x , y ) 1 1 3 6 9 12 (x , y ) 2 2 3 5 8 11 Photos placed in horizontal position (x , y ) 3 3 Parallel . 2 5 11 Scheduler Allocator Task mapping 8 . Job with even amount of white space 4


slide-1
SLIDE 1

Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation, for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE- AC04-94AL85000.

Photos placed in horizontal position with even amount of white space between photos and header

Local ¡search ¡to ¡improve ¡task ¡mapping ¡

Balzuweit*, ¡Bunde*, ¡Vitus ¡ ¡Leung, ¡Finley*, ¡Lee* ¡

P2S2, ¡12 ¡September ¡2014 ¡ ¡

*Knox ¡College, ¡Galesburg, ¡IL ¡

job runs Allocator which Decides nodes job uses Task mapping Assignment of tasks to cores Scheduler when Decides Parallel Job Operating system

(x , y ) (x , y ) (x , y ) (x , y )

General graph view of allocation with mesh coordinates Allocated Processors Application Task Graph

. . .

2 3 n 2 3 1 1 n

9 5 6 7 8 12 1 3 5 6 9 12 4 2 8 11 10 7

Job

10

Mapped job

11 1 2 3 4

slide-2
SLIDE 2

Parallel ¡(Distributed ¡Memory) ¡ Resource ¡Management ¡Pipeline ¡

job runs Allocator which Decides nodes job uses Task mapping Assignment of tasks to cores Scheduler when Decides Parallel Job Operating system

slide-3
SLIDE 3

Task ¡mapping ¡

§ Long ¡history ¡[Bokhari, ¡1981] ¡(general ¡graph ¡model) ¡ § Less ¡important ¡in ¡mid-­‑1980s ¡with ¡wormhole ¡rouTng ¡

§ Message ¡latency ¡independent ¡of ¡size ¡

§ Recent ¡resurgence ¡

§ Almasi ¡et ¡al. ¡2004 ¡ § Gygi ¡et ¡al. ¡2006 ¡(applicaTon ¡exhibited ¡1.64 ¡Tmes ¡speedup) ¡ § Hoefler ¡and ¡Snir ¡2011 ¡(heurisTcs ¡for ¡NP-­‑Complete ¡general ¡model) ¡ § Barre\ ¡et ¡al. ¡2012 ¡(heurisTc ¡for ¡coordinate ¡model, ¡mulTcore) ¡ § Leung ¡et ¡al. ¡2014 ¡(heurisTcs ¡for ¡coordinate ¡model, ¡hybrid ¡parallelism) ¡ § Deveci ¡et ¡al. ¡2014 ¡(coordinate ¡model ¡vs. ¡general ¡model ¡for ¡stencil ¡app) ¡

§ ContenTon ¡for ¡limited ¡bandwidth ¡

§ Processors ¡conTnue ¡improving ¡faster ¡than ¡networks ¡ § Processor ¡counts ¡in ¡state ¡of ¡the ¡art ¡HPC ¡systems ¡conTnue ¡to ¡grow ¡

slide-4
SLIDE 4

General ¡view ¡of ¡task ¡mapping ¡

(x , y ) (x , y ) (x , y ) (x , y )

General graph view of allocation with mesh coordinates Allocated Processors Application Task Graph

. . .

2 3 n 2 3 1 1 n

slide-5
SLIDE 5

Using ¡recursive ¡coordinate ¡bisecTon ¡ for ¡task ¡mapping ¡(Geom) ¡

12 1 2 3 4 5 6 7 8 9 10 11

Machine Job

slide-6
SLIDE 6

Using ¡recursive ¡coordinate ¡bisecTon ¡ for ¡task ¡mapping ¡(Geom) ¡

12 1 2 3 4 5 6 7 8 9 10 11

Machine Job

slide-7
SLIDE 7

Using ¡recursive ¡coordinate ¡bisecTon ¡ for ¡task ¡mapping ¡(Geom) ¡

12 1 2 3 4 5 6 7 8 9 10 11

Machine Job

slide-8
SLIDE 8

Using ¡recursive ¡coordinate ¡bisecTon ¡ for ¡task ¡mapping ¡(Geom) ¡

12 1 2 3 4 5 6 7 8 9 10 11

Machine Job

slide-9
SLIDE 9

Using ¡recursive ¡coordinate ¡bisecTon ¡ for ¡task ¡mapping ¡(Geom) ¡

7 9 10 1 5 2 6 11 12 8 4 3

Machine Job

1 2 3 4 5 6 7 8 9 10 11 12

slide-10
SLIDE 10

Using ¡recursive ¡coordinate ¡bisecTon ¡ for ¡task ¡mapping ¡(Geom) ¡

7 2 3 4 5 6 7 8 9 10 11 12 9 10 1 5 2 6 11 12 8 4 3 1

slide-11
SLIDE 11

Two ¡levels ¡of ¡cuts ¡in ¡decomposiTon ¡ created ¡by ¡Geom ¡

B

first cut next cuts

D C A

slide-12
SLIDE 12

This ¡presentaTon ¡

§ Local ¡search ¡algorithm, ¡GSearch, ¡improves ¡on ¡Geom ¡by ¡ swapping ¡pairs ¡of ¡tasks ¡when ¡doing ¡so ¡improves ¡average ¡ distance ¡between ¡communicaTng ¡tasks ¡ § Demonstrate ¡GSearch ¡in ¡proxy ¡applicaTon ¡improves ¡ applicaTon’s ¡total ¡running ¡Tme ¡

§ While ¡reducing ¡variability ¡in ¡total ¡running ¡Tme ¡

§ Show ¡number ¡of ¡swaps ¡made ¡by ¡GSearch ¡is ¡reasonable ¡in ¡ pracTce ¡

§ Some ¡processor ¡allocaTons ¡require ¡more ¡ § Use ¡distribuTon ¡of ¡swaps ¡made ¡to ¡provide ¡guidance ¡on ¡when ¡to ¡cut ¡

  • ff ¡search ¡and ¡avoid ¡pathological ¡cases ¡

§ Demonstrate ¡again ¡that ¡Geom ¡is ¡good ¡task ¡mapping ¡ algorithm, ¡but ¡local ¡search ¡can ¡improve ¡upon ¡it ¡

slide-13
SLIDE 13

Pseudocode ¡for ¡local ¡search ¡component ¡

  • f ¡GSearch ¡(version ¡without ¡a ¡swap ¡limit) ¡

do ¡{ ¡ ¡madeSwap ¡= ¡false; ¡ ¡for ¡1 ¡≤ ¡i ¡< ¡num_tasks ¡ ¡ ¡for ¡i ¡< ¡j ¡≤ ¡num_tasks ¡ ¡ ¡ ¡ ¡ ¡if(swapping ¡tasks ¡i ¡and ¡j ¡reduces ¡average ¡hops) ¡{ ¡ ¡ ¡ ¡make ¡the ¡swap ¡ ¡ ¡ ¡madeSwap ¡= ¡true; ¡ ¡ ¡ ¡ ¡ ¡} ¡ } ¡while(madeSwap); ¡

slide-14
SLIDE 14

Cielo ¡miniGhost ¡Experiments ¡

§ Los ¡Alamos ¡NaTonal ¡Laboratory ¡Cielo ¡machine, ¡Cray ¡XE6 ¡

§ 143,104 ¡compute ¡cores ¡in ¡8,944 ¡compute ¡nodes, ¡dual ¡AMD ¡Opteron ¡ 6136 ¡eight-­‑core ¡“Magny-­‑Cours” ¡socket ¡G34 ¡running ¡at ¡2.4 ¡GHz ¡ § 272 ¡service ¡nodes, ¡AMD ¡Opteron ¡2427 ¡six-­‑core ¡“Istanbul” ¡socket ¡F ¡ running ¡at ¡2.2 ¡GHz ¡ § Gemini ¡3D ¡torus ¡in ¡16x12x24 ¡(XYZ) ¡topology, ¡2 ¡compute ¡nodes ¡ (sockets) ¡per ¡Gemini, ¡6.57x4.38x4.38 ¡(XYZ) ¡TB/s ¡bi-­‑secTon ¡bandwidth ¡ § As ¡of ¡November ¡2013, ¡number ¡26 ¡on ¡top ¡500 ¡list ¡

§ ApplicaTon ¡used ¡was ¡miniGhost ¡

§ Boundary ¡exchange ¡using ¡stencil ¡computaTons ¡in ¡scienTfic ¡parallel ¡ compuTng, ¡bulk-­‑synchronous ¡message ¡passing ¡code ¡modeled ¡on ¡CTH ¡

§ Set ¡of ¡experiments ¡consists ¡of ¡miniGhost ¡runs ¡for ¡various ¡ numbers ¡of ¡total ¡cores ¡(16 ¡cores ¡per ¡MPI ¡rank) ¡

slide-15
SLIDE 15

Job ¡Dimensions ¡used ¡in ¡miniGhost ¡ experiments ¡

Nodes Job Dimensions 4 1 x 4 x 1 8 2 x 4 x 1 16 2 x 4 x 2 32 2 x 8 x 2 64 4 x 8 x 2 128 4 x 8 x 4 256 4 x 16 x 4 512 8 x 16 x 4 1k 8 x 16 x 8 2k 8 x 32 x 8 4k 16 x 32 x 8

slide-16
SLIDE 16

Running ¡Tme ¡by ¡job ¡size ¡for ¡miniGhost ¡on ¡ Cielo ¡(Average ¡over ¡6 ¡sets ¡of ¡experiments) ¡

GSearch 21.5 22 22.5 23 23.5 24 24.5 25 25.5 4 16 64 256 1K 4K Job size (nodes) Execution time (sec) Geom 21

slide-17
SLIDE 17

Difference ¡between ¡max ¡and ¡min ¡running ¡ Tme ¡by ¡job ¡size ¡for ¡miniGhost ¡on ¡Cielo ¡

0.5 Geom 1 1.5 2 2.5 4 16 64 256 4K Job size (nodes) 1K

  • Diff. between longest and shortest times (sec)

GSearch

slide-18
SLIDE 18

Simulated ¡miniGhost ¡Experiments ¡

§ Since ¡Tme ¡on ¡large ¡systems ¡is ¡scarce ¡ § Trace-­‑based ¡simulaTons ¡of ¡more ¡varied ¡scenarios ¡(PWA) ¡

§ Job ¡arrival ¡Tme, ¡size, ¡running ¡Tme, ¡and ¡(in ¡many ¡cases) ¡Tme ¡esTmate ¡ § On ¡machine ¡

§ schedule ¡(EASY), ¡ ¡ § allocate ¡(snake ¡best ¡fit ¡[Lo ¡et ¡al. ¡1997 ¡and ¡Leung ¡et ¡al. ¡2002]), ¡and ¡ § map ¡

§ Summary ¡of ¡trace ¡used ¡in ¡simulaTons ¡

§ Log ¡name: ¡LLNL-­‑Atlas-­‑2006-­‑2.1-­‑cln, ¡ ¡Machine: ¡24x24x16, ¡ ¡ ¡ § # ¡jobs ¡used: ¡12,474 ¡

§ Random ¡simulaTons ¡ § ExhausTve ¡simulaTons ¡

slide-19
SLIDE 19

Average ¡edge ¡length ¡by ¡job ¡size ¡for ¡ LLNL-­‑Atlas ¡trace ¡

Average edge length (hops) 1.5 2 2.5 3 3.5 4 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Job size (nodes); displayed in buckets of 200 nodes Geom GSearch 1

slide-20
SLIDE 20

Number ¡of ¡swaps ¡made ¡by ¡GSearch ¡as ¡a ¡ funcTon ¡of ¡job ¡size ¡(average ¡and ¡max) ¡

4K 0.25 1 4 16 64 256 1024 4096 4 16 64 256 Job size (nodes) Number of swaps Maximum Average 1K 0.0625

slide-21
SLIDE 21

Number ¡of ¡swaps ¡made ¡by ¡GSearch ¡as ¡a ¡ funcTon ¡of ¡job ¡size ¡on ¡LLNL-­‑Atlas ¡trace ¡

line depicts 0.35n + 20 top of error bars show max points show average 8000 10000 12000 2000 4000 6000 8000 10000 Job size (nodes); displayed in buckets of 200 nodes Number of swaps 4000 2000 6000

slide-22
SLIDE 22

Swap ¡count ¡frequencies ¡from ¡100,000 ¡ random ¡allocaTons ¡on ¡16 ¡x ¡24 ¡x ¡24 ¡system ¡

Frequency 500 1000 1500 2000 2500 3000 50 100 150 200 250 300 350 400 450 500 550 Number of swaps 8x8x8 9x9x9 10x10x10 11x11x11 12x12x12

slide-23
SLIDE 23

Swap ¡count ¡frequencies ¡from ¡all ¡possible ¡ allocaTons ¡of ¡4 ¡x ¡2 ¡x ¡1 ¡job ¡on ¡4 ¡x ¡4 ¡x ¡2 ¡system ¡

5 1 2 6 7 3 4

10 10 10 10 10 12 Number of swaps 10 10 Number of allocations 2 4 10 6 8 10

slide-24
SLIDE 24

Average ¡edge ¡length ¡as ¡funcTon ¡of ¡ number ¡of ¡swaps ¡made ¡on ¡trace ¡jobs ¡ ¡

Number of swaps 1.5 2 2.5 3 3.5 4 4.5 500 1000 1500 2000 2500 Worst initial/final mapping, least improved mapping Most improved mapping Most swaps Best initial/final mapping Average edge length (hops) 1

slide-25
SLIDE 25

Future ¡work ¡

§ Understanding ¡performance ¡anomaly ¡at ¡4k ¡nodes ¡ ¡ § Fully ¡parallel ¡implementaTon ¡of ¡GSearch ¡ ¡ § QuesTons? ¡