12 ID36 presentation Data October 2014 CITATIONS READS 0 32 5 - - PDF document

12 id36 presentation
SMART_READER_LITE
LIVE PREVIEW

12 ID36 presentation Data October 2014 CITATIONS READS 0 32 5 - - PDF document

See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/267327739 12 ID36 presentation Data October 2014 CITATIONS READS 0 32 5 authors , including: Sameer Shende Deepika Shanmugam


slide-1
SLIDE 1

See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/267327739

12 ID36 presentation

Data · October 2014

CITATIONS READS

32

5 authors, including: Some of the authors of this publication are also working on these related projects: Rotorcraft View project The POOMA Project View project Sameer Shende University of Oregon

159 PUBLICATIONS 3,655 CITATIONS

SEE PROFILE

Deepika Shanmugam Sri Ramakrishna Engineering College

18 PUBLICATIONS 59 CITATIONS

SEE PROFILE

All content following this page was uploaded by Sameer Shende on 24 October 2014.

The user has requested enhancement of the downloaded file.

slide-2
SLIDE 2

John ¡C. ¡Linford1, ¡Sameer ¡Shende1, ¡Allen ¡D. ¡Malony1, ¡ Andrew ¡Wissink2, ¡Stephen ¡Adamec3 ¡

Isolating Runtime Faults with Callstack Debugging using TAU

1ParaTools, Inc.

Eugene, OR, USA, 21093

2Ames Research Center

Moffett Field, CA, USA, 90435

3University of Alabama at Birmingham

Birmingham, AL, USA, 35209

slide-3
SLIDE 3

Outline ¡

  • Brief ¡overview ¡of ¡TAU ¡
  • MulG-­‑language ¡callstack ¡debugging ¡with ¡TAU ¡
  • Design ¡and ¡implementaGon ¡
  • Examples: ¡CREATE-­‑AV ¡Helios ¡and ¡Kestrel ¡
  • Summary ¡and ¡conclusions ¡

2 ¡

slide-4
SLIDE 4

3 ¡

Brief overview of TAU

slide-5
SLIDE 5

TAU ¡is ¡a ¡performance ¡evaluaGon ¡tool ¡

  • TAU ¡supports ¡parallel ¡profiling ¡and ¡tracing ¡ ¡
  • Profiling: ¡how ¡much ¡(me ¡was ¡spent ¡in ¡each ¡rou4ne ¡ ¡
  • Tracing: ¡when ¡the ¡events ¡take ¡place ¡in ¡each ¡process ¡
  • TAU ¡can ¡measure ¡hardware ¡performance ¡counters ¡
  • TAU ¡can ¡automaGcally ¡instrument ¡your ¡source ¡code ¡
  • Rou4nes, ¡loops, ¡I/O, ¡memory, ¡phases, ¡etc. ¡
  • TAU ¡runs ¡on ¡all ¡HPC ¡plaTorms ¡and ¡it ¡is ¡free ¡
  • TAU ¡has ¡instrumentaGon, ¡measurement ¡and ¡analysis ¡tools ¡
  • ParaProf, ¡PerfExplorer, ¡Jumpshot, ¡etc. ¡
  • TAU ¡has ¡performance ¡database ¡technology ¡(TAUdb) ¡

4 ¡

slide-6
SLIDE 6

For ¡more ¡informaGon ¡

TAU ¡Website: ¡hYp://tau.uoregon.edu/ ¡ ¡

  • SoEware ¡download ¡
  • Release ¡notes ¡
  • Documenta4on ¡

TAU ¡LiveDVD: ¡hYp://www.hpclinux.com/ ¡

  • Boot ¡up ¡on ¡your ¡laptop ¡or ¡desktop ¡
  • Includes ¡TAU ¡and ¡variety ¡of ¡other ¡packages ¡
  • Include ¡documenta4on ¡and ¡tutorial ¡slides ¡

5 ¡

slide-7
SLIDE 7

6 ¡

Multi-language callstack debugging with TAU

slide-8
SLIDE 8

Segfault! ¡ ¡What ¡do ¡you ¡do? ¡

7 ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Python ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡C++ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Fortran ¡ Callstack ¡ MPI ¡

slide-9
SLIDE 9

Debugging ¡challenges ¡

8 ¡

  • ExecuGon ¡text ¡output ¡rarely ¡sufficient ¡
  • Core ¡files ¡aren’t ¡much ¡help ¡for ¡10k ¡processes ¡
  • What ¡if ¡the ¡fault ¡occurred ¡in ¡a ¡DSO? ¡
  • Most ¡debuggers ¡are ¡monolingual ¡
  • Developers ¡need ¡to ¡reproduce ¡the ¡crash ¡to ¡fix ¡it, ¡

but ¡program ¡inputs ¡are ¡sensiGve ¡or ¡proprietary ¡

slide-10
SLIDE 10

TAU ¡has ¡already ¡solved ¡most ¡of ¡these ¡

9 ¡

  • Rich ¡performance ¡informaGon ¡
  • Scales ¡to ¡100k ¡processes ¡and ¡beyond ¡
  • Highly ¡efficient ¡packed ¡profile ¡format ¡
  • Maintains ¡and ¡updates ¡address ¡maps ¡for ¡DSOs ¡
  • C, ¡C++, ¡CUDA, ¡Fortran, ¡UPC, ¡Python, ¡Java, ¡etc. ¡
  • With ¡tau_exec, ¡recompile ¡not ¡required ¡
slide-11
SLIDE 11

TAU ¡callstack ¡debugging ¡has ¡two ¡goals ¡

  • Assist ¡in ¡debugging ¡mulG-­‑language ¡applicaGons ¡
  • Unwind ¡the ¡callstack ¡across ¡C/C++, ¡Fortran, ¡

Python, ¡Java, ¡UPC, ¡etc. ¡

  • Explore ¡applica4on ¡performance ¡at ¡all ¡levels ¡
  • Close ¡the ¡loop ¡with ¡developers ¡for ¡more ¡rapid ¡

turnaround ¡of ¡bug ¡fixes ¡

  • Compact, ¡portable, ¡informa4ve ¡reports ¡
  • Independent ¡of ¡sensi4ve ¡or ¡proprietary ¡inputs ¡

10 ¡

slide-12
SLIDE 12

Callstack ¡unwinding ¡is ¡the ¡key ¡to ¡debugging ¡

11 ¡

PyEval_EvalCode … Solver<float>::iterate … TIMESTEP aero.py:328 … Solver.cpp:19 … JCL1.F:1798

FPE ¡

slide-13
SLIDE 13

Performance ¡informaGon ¡is ¡retained ¡

12 ¡

PyEval_EvalCode … Solver<float>::iterate … TIMESTEP Started on rank 13 … MPI_Recv read 451k … Allocated 3298k heap 954s runtime

FPE ¡

slide-14
SLIDE 14

The ¡debugger ¡can ¡answer ¡these ¡quesGons ¡

  • 1. Where ¡and ¡when ¡did ¡the ¡program ¡fail? ¡
  • 2. What ¡was ¡the ¡nature ¡of ¡the ¡fault? ¡
  • 3. What ¡was ¡the ¡applicaGon’s ¡heap ¡memory ¡

uGlizaGon? ¡

  • 4. Where ¡there ¡any ¡memory ¡leaks ¡in ¡the ¡applicaGon? ¡
  • 5. What ¡were ¡the ¡applicaGon’s ¡performance ¡

characterisGcs? ¡

  • 6. How ¡much ¡Gme ¡did ¡the ¡applicaGon ¡spend ¡in ¡I/O ¡and ¡

communicaGon ¡operaGons? ¡

13 ¡

slide-15
SLIDE 15

14 ¡

Design and Implementation

slide-16
SLIDE 16

Signal ¡handler ¡intercepts ¡the ¡fault ¡signal ¡

  • export ¡TAU_TRACK_SIGNALS=1 ¡
  • tau_exec ¡registers ¡a ¡signal ¡handler ¡
  • Error ¡signal ¡triggers ¡callstack ¡unwind ¡

15 ¡

tau_exec

slide-17
SLIDE 17

TAU ¡unwinds ¡the ¡callstack ¡of ¡each ¡thread ¡

  • GLIBC ¡backtrace ¡API ¡and ¡GNU ¡binuGls ¡determine ¡

rouGne ¡name, ¡file ¡name, ¡source ¡line ¡number ¡

  • A ¡profile ¡file ¡is ¡created ¡for ¡each ¡thread ¡

16 ¡

profile.0.0.0 ¡ profile.1.0.0 ¡ … ¡

slide-18
SLIDE 18

TAU ¡orchestrates ¡a ¡graceful ¡shutdown ¡

  • Profile ¡files ¡containing ¡diagnosGc ¡informaGon ¡are ¡

created ¡for ¡all ¡threads, ¡healthy ¡or ¡otherwise ¡

  • Healthy ¡threads ¡exit ¡gracefully ¡

17 ¡

slide-19
SLIDE 19

18 ¡

Examples: CREATE-AV Helios and Kestrel

slide-20
SLIDE 20

CREATE-­‑AV ¡Helios ¡and ¡Kestrel ¡

19 ¡

slide-21
SLIDE 21

Helios ¡and ¡Kestrel ¡somware ¡architecture ¡

20 ¡

slide-22
SLIDE 22

Build ¡with ¡debugging ¡symbols ¡(-­‑g) ¡for ¡a ¡ more ¡informaGve ¡backtrace ¡

21 ¡

slide-23
SLIDE 23

Create ¡a ¡wrapper ¡file ¡to ¡see ¡Python ¡events ¡

22 ¡

import tau def OurMain(): import samarcrun tau.run('OurMain()')

wrapper.py ¡

slide-24
SLIDE 24

Set ¡environment ¡variables ¡and ¡ ¡ run ¡with ¡tau_exec ¡

mpirun ¡-­‑np ¡{n} ¡tau_exec ¡-­‑T ¡python ¡pyMPI ¡-­‑io ¡-­‑memory ¡\ ¡ wrapper.py ¡

23 ¡

export ¡TAU_TRACK_SIGNALS=1 ¡ export ¡TAU_CALLPATH_DEPTH=100 ¡ mpirun ¡-­‑np ¡{n} ¡tau_exec ¡-­‑T ¡python ¡pyMPI ¡wrapper.py ¡ Normal Execution mpirun -np {n} pyMPI ./samarcrun.py Debugging with TAU Debugging with TAU + I/O and Memory Tracking

slide-25
SLIDE 25

TAU ¡generates ¡profile ¡data ¡at ¡Gme ¡of ¡failure ¡

24 ¡

slide-26
SLIDE 26

Use ¡ParaProf ¡to ¡explore ¡the ¡profile ¡data ¡

25 ¡

slide-27
SLIDE 27

Right-­‑click ¡the ¡thread ¡you ¡want ¡to ¡explore ¡

26 ¡

slide-28
SLIDE 28

Use ¡the ¡Metadata ¡window ¡to ¡locate ¡the ¡ source ¡line ¡that ¡caused ¡the ¡error ¡ ¡

27 ¡

slide-29
SLIDE 29

ParaProf ¡highlights ¡the ¡erroneous ¡line ¡

28 ¡

slide-30
SLIDE 30

Peak ¡read ¡bandwidth ¡in ¡Helios ¡

29 ¡

slide-31
SLIDE 31

A ¡segmentaGon ¡fault ¡in ¡Kestrel ¡with ¡ memory ¡and ¡I/O ¡diagnosGcs ¡

30 ¡

slide-32
SLIDE 32

Inclusive ¡Gme ¡spent ¡in ¡Kestrel ¡code ¡regions ¡

31 ¡

slide-33
SLIDE 33

Exclusive ¡Gme ¡spent ¡in ¡Kestrel ¡code ¡regions ¡

32 ¡

slide-34
SLIDE 34

Summary ¡and ¡conclusions ¡

  • 1. TAU ¡callstack ¡debugging ¡isolates ¡errors ¡in ¡mulG-­‑language ¡

HPC ¡somware ¡by ¡intercepGng ¡signals ¡at ¡runGme ¡

  • 2. Run ¡codes ¡with ¡tau_exec ¡to ¡register ¡the ¡TAU ¡signal ¡

handler, ¡create ¡profile ¡files, ¡and ¡shutdown ¡gracefully ¡

  • 3. The ¡profile ¡can ¡be ¡sent ¡to ¡developers ¡when ¡sensiGve ¡or ¡

proprietary ¡inputs ¡cannot ¡be ¡provided ¡

  • 4. Developers ¡use ¡ParaProf ¡to ¡analyze ¡the ¡fault ¡locaGon ¡and ¡

runGme ¡performance ¡data ¡in ¡the ¡profiles ¡

  • 5. Memory ¡use, ¡IO, ¡and ¡runGme ¡performance ¡are ¡recorded ¡
  • 6. No ¡recompilaGon ¡necessary ¡

33 ¡

slide-35
SLIDE 35

Acknowledgments ¡

This ¡work ¡was ¡supported ¡by ¡the ¡DoD ¡High ¡Performance ¡ CompuGng ¡ModernizaGon ¡Program ¡(HPCMP) ¡User ¡ ProducGvity ¡Enhancement, ¡Technology ¡Transfer ¡and ¡Training ¡ (PETTT) ¡program ¡and ¡through ¡support ¡provided ¡by ¡the ¡DoD ¡ HPCMO ¡to ¡the ¡HIARMS ¡InsGtute ¡and ¡the ¡CREATE ¡program. ¡

View publication stats View publication stats