42
Aroon Nataraj, Allen D. Malony, Alan Morris University of Oregon {anataraj,malony,amorris}@cs.uoregon.edu TAUoverMRNet (ToM): A Framework for Scalable Parallel Performance Monitoring Dorian C. Arnold, Barton P. Miller University of Wisconsin, Madison [email protected] [email protected]

TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

Aroon Nataraj, Allen D. Malony, Alan MorrisUniversity of Oregon

{anataraj,malony,amorris}@cs.uoregon.edu

TAUoverMRNet (ToM):A Framework for Scalable Parallel

Performance Monitoring

Dorian C. Arnold, Barton P. MillerUniversity of Wisconsin, Madison

[email protected]@cs.wisc.edu

Page 2: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Motivation Performance problem analysis increasingly complex

Multi-core, heterogeneous, and extreme scale computing Shift of performance measurement and analysis perspective

Static, offline dynamic, online Support for performance monitoring (measurement + query) Enabling of adaptive applications

Prerequisites for performance measurement Low overhead and low perturbation Runtime analysis antithetical to performance tool orthodoxy

Neo-performance perspective Co-allocation of additional (tool specific) system resources Make dynamic, performance-driven optimization viable

2

Page 3: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece 3

Performance Observation Needs Performance problem type determines observation approach

Translates to requirements for measurement and analysis Standard offline performance diagnosis/tuning process

Compile-execute-measure-analyze cycle Pre-determined performance experiment (events, measures) Static application execution and optimization

Standard approach difficult to apply to complex execution Dynamic applications where performance changes Extreme scale, heterogenous systems with high dimensionality

Requires extended online performance measurement support Dynamic monitoring and performance feedback Raises vital concerns of overhead and perturbation

bigger issue in online systems due to global effects

Page 4: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece 4

Performance Observation Modes Post-mortem

Performance data interpreted offline May lack temporal detail (e.g., using profiles only)

Post-mortem with temporal detail Still offline interpretation Can generate prodigious data volumes (e.g., using tracing)

Online Performance data queried, interpreted at runtime Suitable to long running applications (especially at scale) Similar in spirit to real-time visualization

Online with feedback into ...Measurement subsystem (optimize, distribute analysis)Application (steering)

Page 5: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece 5

Monitoring for Performance Dynamics Runtime access to parallel performance data

Scalable and lightweight Support for performance-adaptive, dynamic applications Focus on parallel profile data

Alternative 1: Extend existing performance measurement Create own monitoring infrastructure Integrate with measurement system Disadvantage: maintain own monitoring framework

Alternative 2: Couple other with monitoring infrastructure Leverage scalable middleware from other supported projects Challenge: measurement/monitor integration TAU over Supemon (ToS) (UO, LANL) TAU over MRNet (ToM) (UO, University of Wisconsin)

Page 6: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece 6

Talk Outline Motivation Performance observation needs Performance observation modes Monitoring for performance dynamics Separation of concerns and MRNet TAUoverMRNet (ToM)

System design Monitor instantiation problem ToM filters: distributed analysis, reduction

System characterization Future plans and conclusion

Page 7: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece 7

Separation of Concerns Online performance monitoring decomposes into

Measurement Access / Transport

Measurement sub-system Measures application performance

parallel profile per context (MPI ranks, processes, threads) Maintains performance state locally (global performance data)

Access / Transport Query of distributed performance state (frequency, selection) Bridges application (source) with monitors / front ends (sinks) Moves performance data from source to sink Distributed performance data processing (MRNet)

distributed performance analysis / reduction also feasible

Page 8: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece 8

What is MRNet? Multicast Reduction Network

Software infrastructure, API, utilities (written in C++) Create and manage network overlay trees (TBON model) Efficient control through root-to-leaf multicast path Reductions (transformations) on leaf-to-root data path Packed binary data representation

Uses thread-per-connection model Supports multiple concurrent “streams”

Filters on intermediate nodes Default filters (e.g., sum, average) Loads custom filters through shared-object interface

MRNet-base tools (Paradyn, STAT debugger, ToM)

Page 9: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

TAU Transport Abstraction Layer Application calls into TAU (TAU_DB_DUMP())

Application specific intervals example: per-iteration or phase

Regular periodic intervals Configuration specific

Compile or runtime One per thread

Develop abstract transportinterface Adaptors to alternative monitor infrastructure

Push-Pull model Source pushes and sink pulls

9

to MRNet monitor infrastructure

Page 10: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

MRNet Back-End Adapter Adapter responsibilities

Initialization Finalization Control Performance data output

TAU MRNet Back-End Two streams

data control

Packetization Non-blocking receive for control

10

to TAU

Page 11: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Components and Data/Control Flow Components

Back-End (BE) adapter Filters

reduction distributed Analysis up / down stream

Front-End (FE) unpacks, interprets, stores

Data path Reverse reduction path

Control path Forward multicast path

11

MRNET

Comm Node

+

Filter

MRNET

Comm Node

+

Filter

TAU

Front-End

Streams

Streams

Back

End

Back

End

Data

Contr

ol --

>

Data

Contro

l -->

Page 12: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece 12

Monitor Instantiation Problem How to co-allocate nodes (cores) for monitoring?

Monitor performs transport and analysis General problem when utilizing additional resources

tool specific Important especially in non-interactive (batch) environments

Set of allocated nodes not known a priori Multi-step setup procedures difficult / awkward Environments vary widely

command-line / script interfaces and capabilities Need an approach ...

To instantiate application, transport, and front-end ... that is independent of batch environment ... that requires no changes to application

Page 13: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Monitor Instantiation: Required Steps

13

Page 14: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Monitor Instantiation: Required Steps Calculate (monitor + application) and request total resources Apportion resources based on role (monitor, application) Construct transport topology (Front-End, Filters) Help Back-Ends discover and connect to parents Do so transparently to application Do so transparently to queue manager and scheduler

13

Page 15: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Monitor Instantiation: Required Steps Calculate (monitor + application) and request total resources Apportion resources based on role (monitor, application) Construct transport topology (Front-End, Filters) Help Back-Ends discover and connect to parents Do so transparently to application Do so transparently to queue manager and scheduler

13

Total resource calculation easy Do so manually or through script (based on FanOut)

MRNet already does transport topology construction and filter instantiation for us

Page 16: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Transparent Monitor Instantiation Solution for MPI Applications Based on interception of MPI Calls

PMPI interface Separate roles

Tree: Rank-0 and Ranks 1..k-1 Application: Ranks k..N+k

Three parts to method: Initialization Application execution Finalization

14

MRNET

Comm Node

+

Filter

MRNET

Comm Node

+

Filter

TAU

Front-End

Streams

Streams

Back

End

Back

End

Data

Contr

ol --

>

Data

Contro

l -->

Front-EndRank-0

IntermediateRanks 1..k-1

ApplicationRanks k..N+k

Page 17: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Transparent Monitor: Initialization COMM_WORLD split based on role of rank Intermediate nodes register with ToM on Rank-0 using MPI Rank-0 uses MRNet API to instantiate transport Rank-0 MPI bcasts tree info to application BEs to join

15

Rank 0

TAU MPI_Init() Wrapper

S1 : Call PMPI_Init()

S2 : Split Tree/App Comm

S3 : Recv Inter. Hostnames

S4 : Create Tree Topology file

S5 : Fork/Exec Front-End

S6 : Read Host/Port from FE

S7 : Send Host/Port to Appl.

S8 : waitpid() on Front-End

S9 : Send fini to Tree-ranks

S10 : Call PMPI_Finalize()

Tree Ranks 1 to (K-1)

TAU MPI_Init() Wrapper

S0 : Call PMPI_Init()

S1 : Split Tree/App Comm

S2 : Send Hostname to Rank0

S3 : Call MPI_Irecv(fini)

S4 : sleep 5

S5 : if(MPI_Test() == false)

goto S4

S6 : Call PMPI_Finalize()

Application Ranks

TAU MPI_Init() Wrapper

S0 : Call PMPI_Init()

S1 : Split Tree/App Comm

S2 : Recv Host/Port Parent

S3 : return

Other TAU MPI Wrapper

S0 : if(comm ==

MPI_COMM_WORLD)

comm = userComm;

S1 : Call PMPI routine

S3 : return

Page 18: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Transparent Monitor: Application Execution Application on Back-Ends proceeds normally MPI calls on COMM_WORLD are converted

Intercepted to use userComm MPI jobs on Ranks 0 to k-1 idle MRNet processes active

16

Rank 0

TAU MPI_Init() Wrapper

S1 : Call PMPI_Init()

S2 : Split Tree/App Comm

S3 : Recv Inter. Hostnames

S4 : Create Tree Topology file

S5 : Fork/Exec Front-End

S6 : Read Host/Port from FE

S7 : Send Host/Port to Appl.

S8 : waitpid() on Front-End

S9 : Send fini to Tree-ranks

S10 : Call PMPI_Finalize()

Tree Ranks 1 to (K-1)

TAU MPI_Init() Wrapper

S0 : Call PMPI_Init()

S1 : Split Tree/App Comm

S2 : Send Hostname to Rank0

S3 : Call MPI_Irecv(fini)

S4 : sleep 5

S5 : if(MPI_Test() == false)

goto S4

S6 : Call PMPI_Finalize()

Application Ranks

TAU MPI_Init() Wrapper

S0 : Call PMPI_Init()

S1 : Split Tree/App Comm

S2 : Recv Host/Port Parent

S3 : return

Other TAU MPI Wrapper

S0 : if(comm ==

MPI_COMM_WORLD)

comm = userComm;

S1 : Call PMPI routine

S3 : return

Page 19: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Transparent Monitor: Finalization Application ranks call MPI_Finalize ToM tree destruction initiated Eventually Ranks 0..k-1 also call MPI_Finalize to end job.

17

Rank 0

TAU MPI_Init() Wrapper

S1 : Call PMPI_Init()

S2 : Split Tree/App Comm

S3 : Recv Inter. Hostnames

S4 : Create Tree Topology file

S5 : Fork/Exec Front-End

S6 : Read Host/Port from FE

S7 : Send Host/Port to Appl.

S8 : waitpid() on Front-End

S9 : Send fini to Tree-ranks

S10 : Call PMPI_Finalize()

Tree Ranks 1 to (K-1)

TAU MPI_Init() Wrapper

S0 : Call PMPI_Init()

S1 : Split Tree/App Comm

S2 : Send Hostname to Rank0

S3 : Call MPI_Irecv(fini)

S4 : sleep 5

S5 : if(MPI_Test() == false)

goto S4

S6 : Call PMPI_Finalize()

Application Ranks

TAU MPI_Init() Wrapper

S0 : Call PMPI_Init()

S1 : Split Tree/App Comm

S2 : Recv Host/Port Parent

S3 : return

Other TAU MPI Wrapper

S0 : if(comm ==

MPI_COMM_WORLD)

comm = userComm;

S1 : Call PMPI routine

S3 : return

Calls MPI_Finalize(){

Send ToM FIN to FECall PMPI_Finalize()

}

Page 20: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

ToM Filters Ideally there would be no need for filtering

Retrieve and store all performance data provided Acceptability depends on performance monitor use

High application perturbation, transport and storage costs Need to trade-off queried performance data granularity Which events, time intervals, application ranks?

Reduce performance data as it flows through transport Distribute Front-End analysis out to intermediate filters

Three filtering schemes developed for ToM Each builds upon and extends previous Progressively provide increased temporal and spatial detail

Upstream and downstream filters18

Page 21: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Summary Statistics Filter Global summary statistics

Across ranks (N) For each profile event N parallel profiles reduced

to E event statistics Functions:

mean, min, max standard deviation

Single phase (A)Up-stream filter

Intermediate node Summarize children’s data Recursively arrive at FE

19

Node 2

A

A

B

B

C

C

AFE USF

Node 0

A

A

DSF

USF

B

Node 1

BE

BE

Node 3

Node 4

A

A

USF

DSF

B

BE

BE

Node 5

Node 6

: Back End: Front End

: UpStream Filter

: DownStream Filter

BEFE

USF

DSF

APhase A

BPhase B

CPhase C

KEY

C

Page 22: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Example: Summary Statistics Filter

20

0

5e+06

1e+07

1.5e+07

2e+07

2.5e+07

3e+07

3.5e+07

0 50 100 150 200 250 300 350

Tim

e (

usecs)

Step

FLASH3 SOD | Allreduce

minmax

meansd

FLASH Sod 2D | N=1024 | Allreduce

Full profilesare generated

(N*300 profiles)

Page 23: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Example: Summary Statistics Filter

20

0

5e+06

1e+07

1.5e+07

2e+07

2.5e+07

3e+07

3.5e+07

0 50 100 150 200 250 300 350

Tim

e (

usecs)

Step

FLASH3 SOD | Allreduce

minmax

meansd

FLASH Sod 2D | N=1024 | Allreduce

Sudden spikeat iteration 100

Full profilesare generated

(N*300 profiles)

Page 24: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Example: Summary Statistics Filter

20

0

5e+06

1e+07

1.5e+07

2e+07

2.5e+07

3e+07

3.5e+07

0 50 100 150 200 250 300 350

Tim

e (

usecs)

Step

FLASH3 SOD | Allreduce

minmax

meansd

FLASH Sod 2D | N=1024 | Allreduce

Sudden spikeat iteration 100

Temporal information only

Spatial information lacking

Full profilesare generated

(N*300 profiles)

Page 25: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Histogram Filter Maintain specified level of

spatial information (# bins) Accurate histogram needs

global min/max (range) Global unknown below root Three Phase (A, B, C)

A: Push up min/max; buffer B: Push min/max to DSF C: Histogram recursively

Model Non-blocking, pipelined Data parallel

21

Node 2

A

A

B

B

C

C

AFE USF

Node 0

A

A

DSF

USF

B

Node 1

BE

BE

Node 3

Node 4

A

A

USF

DSF

B

BE

BE

Node 5

Node 6

: Back End: Front End

: UpStream Filter

: DownStream Filter

BEFE

USF

DSF

APhase A

BPhase B

CPhase C

KEY

C

Page 26: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Example: Histogram Filter

22

0

50

100

150

200

250

300

350

FLASH Sod 2-D | Event: Allreduce | N=1024

50 75 100 125 150

Application Iteration #

0

3

6

9

12

15

18

Tota

l E

vent R

untim

e (

secs)

No. of RanksFLASH Sod 2D | N=1024 | Allreduce No. of Ranks

- 1024 MPI Ranks- FLASH 2D Sod- ToM Fanout=8- Offload performance every iteration

Hist Filter

Page 27: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Example: Histogram Filter

22

0

50

100

150

200

250

300

350

FLASH Sod 2-D | Event: Allreduce | N=1024

50 75 100 125 150

Application Iteration #

0

3

6

9

12

15

18

Tota

l E

vent R

untim

e (

secs)

No. of RanksFLASH Sod 2D | N=1024 | Allreduce No. of Ranks

Spike at Iteration 100Temporal information

- 1024 MPI Ranks- FLASH 2D Sod- ToM Fanout=8- Offload performance every iteration

Hist Filter

Page 28: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Example: Histogram Filter

22

0

50

100

150

200

250

300

350

FLASH Sod 2-D | Event: Allreduce | N=1024

50 75 100 125 150

Application Iteration #

0

3

6

9

12

15

18

Tota

l E

vent R

untim

e (

secs)

No. of RanksFLASH Sod 2D | N=1024 | Allreduce No. of Ranks

Spike at Iteration 100Temporal information

Unevenness of across ranksEvolution of unevenness over iterations

Spatial information

- 1024 MPI Ranks- FLASH 2D Sod- ToM Fanout=8- Offload performance every iteration

Hist Filter

Page 29: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Classified Histogram Filter What was the cause for the unevenness in last example? Are there “classes” of ranks performing specific roles? Can we identify them from the performance profile? Definition of class

Class-id: hash of concatenated event-names Ranks with same class-id belong to same class Application-specific or tailored to observer’s wishes Class-id generated based on call-depth or only for MPI events

Histograms generated within class Output: set of histograms per-event, one for each class

More detail than simple histograms Trade-off detail from classification scheme against the costs

23

Page 30: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Example: Uintah (Hot Blob) Uintah Computational Framework UCF (University of Utah) Computational Fluid Dynamics (CFD) code

3 dimensional validation problem Spatial domain decomposition

Patch - unit of partitioning 8 outer patches at AMR level 0 Inner cubes selected at level 1

TAU instrumentation strategy Map low-level performance to patches Mapping expressed through event-name

Patch index + AMR Level 0 “Patch 2 -> 0”

24

4 S. Shende

Figure 1. Adaptive Mesh Refinement in a parallel CFD simulation in the Uintah Computational

Framework

3.6. User-defined Events

Besides timers and phases that measure the time spent between a pair of start and stop calls in

the code, TAU also provides support for user-defined atomic events. After an event is registered

with a name, it may be triggered with a value at a given point in the source code. At the

application level, we can use user-defined events to track the progress of the simulation by

keeping track of application specific parameters that explain program dynamics, for example,

the number of iterations required for convergence of a solver at each time step, or the number

of cells in each iteration of an adaptive mesh refinement application.

4. Case Study: Uintah

We have applied TAU’s phase profiling capabilities to evaluate the performance of the Uintah

computational framework (UCF) [2]. The TAU profiling strategy for Uintah is to observe the

performance of the framework at the level of patches, the unit of spatial domain partitioning.

Thus, we instrument UCF with dynamic phases where the phase name contains the AMR level

Page 31: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Example: Uintah (Hot Blob) Classification scheme

Default : all event names used for class-id Patch Only : only high-level Patch events used AMR L0 Patch Only : only “* -> 0” type events MPI Only : only MPI events

Depending on scheme ... Different number of classes generated Different reduction ractor = unreduced bytes / reduced bytes

Classification scheme allows control of trade-off Savings from reduction Performance detail

25

Page 32: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Example: Classified Histogram Filter | Uintah

26

0

2

4

6

8

10

12

14

16

18

20

22

20 40 60 80 100

Reduction F

acto

r

Step

[BRF] Single Class[RF] Default

[RF] Patch Only[RF] AMR L1 Patch Only

[RF] MPI Only

0

10

20

30

40

50

60

70

No. of C

lasses

Reduction from Classified Histograms | Uintah

DefaultPatch Only

AMR L1 Patch OnlyMPI Only

No.

of C

lass

esR

educ

tion

Fact

or

Iteration

64 MPI Ranks | # Bins = 5

Page 33: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Characterization Performance monitoring parameters

Frequency of interaction Performance data granularity and size # of processors

In what circumstances is doing reduction beneficial? No free lunch - requires extra work and resources

Characterization methodology to optimize trade-off Monitoring overhead Additional resource assignment

Compare reduced (ToM Hist) vs. non-reduced (ToM) runs Amount of data is usually less (that’s the point) Need a better metric

27

Page 34: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Characterization: Metric, Benchmark Average time for global offload

Increasing offload rate (function of usecs above) Overtakes service rate of ToM (and underlying system) Eventually lead to queueing and blocked send() call Reflected in the average time for offload (dump.time)

Stress test of ToM28

time = get_time();for(i=0; i<iterations; i++) {

work(usecs);TAU_DB_DUMP();MPI_Barrier();

}tot.time = get_time()-time;tot.dump.time = time - work_time - barrier_time;dump.time = tot.dump.time/iterations;

Figure 8. Offload Benchmark

Any measurement scheme, in particular online mon-itoring, raises the issue of perturbation. The perturba-tion caused is due to overheads from both measurementand performance data offloads. Our real-world work-load to evaluate perturbation is the FLASH3 [7] applica-tion running a 2-D Sod problem. The problem is scaledweakly from 64 processors to 512 processors. The dif-ferent modes are: i) uninstrumented to acquire a baseline,ii) TAU-PM: with TAU instrumentation and data offloadat termination, iii) ToM: with online data offload per it-eration and iv) ToM Reduce: with online data offload periteration along with histogramming. ToM was configuredwith a Fanout of 8. All experiments were run on the Atlascluster at Lawrence Livermore National Laboratory. Themean (over 3 runs) of the % overhead over the baseline forthe three cases are reported in Table 1. With over 120 ap-plication events (including all MPI events) in a real, com-plex parallel application the overheads in all cases wereunder 1%. For completeness the cost of performing theTAU DB DUMP() operation is also reported.

5.2 Data Reduction Costs

The different types of performance data reduction inToM were demonstrated in Section 4. In each case ex-tra work is performed in order to achieve the reduction(e.g. the 3-Phase histogram). Under what circumstancesis reduction beneficial, if at all? We evaluate the costsof performing that reduction versus the savings obtainedfrom doing so. The metric used is the average time takento perform a single offload at the BE. As the rate at whichoffloads occur increases beyond the service rate offeredby ToM (and the underlying physical network), persis-tent queuing leads to buffer exhaustion and eventually to

a blocked send() call. This cost is reflected in the aver-age time to offload data onto ToM. While a non-blockingsend() may not directly suffer these costs, the systemwill still require the same amount of time (or possiblymore since offload rate will not be reduced by blocking)to eventually transfer the queued performance data. Itshould be noted that the experiments in this section area severe stress-test of ToM.

We use a simple offload benchmark summarized inFigure 8. The avg.time variable is a measure of themean of the worst offload time suffered per round acrossthe ranks and is plotted as the Benchmark Performancein Figure 9. The x-axis (Profile Period) represents theinterval between offloads in microseconds. The y-axisis the ToM Fanout. The ToM curve represents the theavg.timewith no reduction and the ToM Reduce curverepresents the case with reduction using histogramming.

In Figure 9(A) (application ranks, N=64), at relativelylow offload rates both curves are overlaid. The knee ob-served in the curves is due to the offload rate increasingabove the service rate. At Fanout=2, the knee in ToMReduce occurs later than that in ToM. And at Fanout=4,while the knee occurs at the same rate, the magnitude ofincrease in ToM Reduce is smaller. In both cases, savingsfrom data reduction clearly trump the costs of performinghistogramming. At Fanout=8 ToM Reduce loses its ad-vantage from data reduction. Reduction using histogram-ming has its own costs. For instance, it requires that eachintermediate ToM rank has double the number of threads(due to the DownStream Filter). As Fanout increases thecosts dominate the savings obtained from data reduction,suggesting that with low N and high Fanout, reductiondoes not help. In contrast, in Figure 9(B) where N is larger(256, 512), even with double the Fanout (16), ToM Re-duce performs an order of magnitude better than ToM. AsN increases, the savings obtained from reduction propor-tionally increases. Whereas the Fanout remains fixed andso too the cost of performing the reduction. This also sug-gests that at lower offload rates, much higher fanouts canbe used, effectively reducing transport resource usage.

These experiments were run with a modest number ofevents (20). Repeating the runs with 50 and 150 events(results not shown here) had similar results. At small N,the cost of performing the reduction increased to be largerthan the savings obtained. But with large N, the resultsclosely resembled Figure 9(B), confirming that reduction

7

Page 35: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Characterization: N=64, FO=8

29

25000

50000

75000

100000

125000 2

4

8

10

20

30

40

50

60

70

80

Benchmark Performance (msecs)

Offload Benchmark | N=64

ToMToM Reduce

Profile Period

Fan-Out

Benchmark Performance (msecs)

usec

Page 36: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Characterization: N=64, FO=8

29

25000

50000

75000

100000

125000 2

4

8

10

20

30

40

50

60

70

80

Benchmark Performance (msecs)

Offload Benchmark | N=64

ToMToM Reduce

Profile Period

Fan-Out

Benchmark Performance (msecs)

usecToM-Reduce outperforms ToM

Page 37: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Characterization: N=64, FO=8

29

25000

50000

75000

100000

125000 2

4

8

10

20

30

40

50

60

70

80

Benchmark Performance (msecs)

Offload Benchmark | N=64

ToMToM Reduce

Profile Period

Fan-Out

Benchmark Performance (msecs)

usecToM-Reduce outperforms ToM

Load overtakingservice rate

Page 38: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Characterization: N=64, FO=8

29

25000

50000

75000

100000

125000 2

4

8

10

20

30

40

50

60

70

80

Benchmark Performance (msecs)

Offload Benchmark | N=64

ToMToM Reduce

Profile Period

Fan-Out

Benchmark Performance (msecs)

usec

Cost of reductionovertakes savings

ToM-Reduce outperforms ToM

Load overtakingservice rate

Page 39: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Characterization: Large N (256, 512)

30

0

50

100

150

200

250

300

350

400

450

500

550

600

25000 50000 75000 100000 125000

Benchm

ark

Perf

orm

ance (

msecs)

Profile Period

Offload Benchmak | Large N

N=512 FO=8N=512 FO=8 Reduce

N=256 FO=16N=256 FO=16 Reduce

Page 40: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece

Characterization: Large N (256, 512)

30

0

50

100

150

200

250

300

350

400

450

500

550

600

25000 50000 75000 100000 125000

Benchm

ark

Perf

orm

ance (

msecs)

Profile Period

Offload Benchmak | Large N

N=512 FO=8N=512 FO=8 Reduce

N=256 FO=16N=256 FO=16 Reduce

At relatively large N- ToM-Reduce significantly out-performs ToM- Even at much larger fan-outs than before

Page 41: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece 31

Conclusion and Future Work High return on investment from additional resources

Fan-out of 64 is only 1.5% extra resources Have only scratched the surface

Interesting distributed performance analysis to explore Support of feedback into application

based on performance dynamicsLoad-balancing and resource (re-)allocation

Interest in experimentation on very large scales Looking for candidate applications

Would like to hookup system to real-time visualizations

Page 42: TAUoverMRNet (ToM): A Framework for Scalable Parallel ...STHEC 2008, Kos, Greece TAUoverMRNet (ToM) Motivation Performance problem analysis increasingly complex Multi-core, heterogeneous,

TAUoverMRNet (ToM) STHEC 2008, Kos, Greece 32

Credits University of Oregon

Aroon NatarajAlan MorrisAllen D. MalonyTAU group members

University of WisconsinDorian C. ArnoldMichael BrimBarton P. Miller