Debugging with TotalView

Similar documents
Debugging with TotalView

GPU Tools Sandra Wienke

Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005

Using the Intel Inspector XE

The RWTH Compute Cluster Environment

Debugging in Heterogeneous Environments with TotalView. ECMWF HPC Workshop 30 th October 2014

RWTH GPU Cluster. Sandra Wienke November Rechen- und Kommunikationszentrum (RZ) Fotos: Christian Iwainsky

Advanced MPI. Hybrid programming, profiling and debugging of MPI applications. Hristo Iliev RZ. Rechen- und Kommunikationszentrum (RZ)

Parallel Debugging with DDT

Eliminate Memory Errors and Improve Program Stability

Memory Debugging with TotalView on AIX and Linux/Power

Getting Started with CodeXL

Real-time Debugging using GDB Tracepoints and other Eclipse features

NetBeans Profiler is an

CUDA Debugging. GPGPU Workshop, August Sandra Wienke Center for Computing and Communication, RWTH Aachen University

AMD CodeXL 1.7 GA Release Notes

High Performance Computing in Aachen

Improve Fortran Code Quality with Static Analysis

Running applications on the Cray XC30 4/12/2015

RTOS Debugger for ecos

Using the Windows Cluster

The Asterope compute cluster

Debugging Export Connectors With Visual Studio.NET

Linux tools for debugging and profiling MPI codes

Introduction to Hybrid Programming

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

DS-5 ARM. Using the Debugger. Version 5.7. Copyright 2010, 2011 ARM. All rights reserved. ARM DUI 0446G (ID092311)

serious tools for serious apps

DS-5 ARM. Using the Debugger. Version Copyright ARM. All rights reserved. ARM DUI 0446M (ID120712)

WebSphere Business Monitor

INTEL PARALLEL STUDIO XE EVALUATION GUIDE

SLURM Workload Manager

SANbox Manager Release Notes Version Rev A

Lab 2-2: Exploring Threads

MONITORING PERFORMANCE IN WINDOWS 7

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

Also on the Performance tab, you will find a button labeled Resource Monitor. You can invoke Resource Monitor for additional analysis of the system.

EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Multitasking ARM-Applications with uvision and RTX

High Performance Computing in Aachen

Chapter 2: OS Overview

Developing Parallel Applications with the Eclipse Parallel Tools Platform

Redis OLTP (Transactional) Load Testing

Performance analysis with Periscope

TM SysAid Chat Guide Document Updated: 10 November 2009

How to Run Parallel Jobs Efficiently

JORAM 3.7 Administration & Monitoring Tool

Session 2: MUST. Correctness Checking

Department of Veterans Affairs. Open Source Electronic Health Record Services

STLinux Software development environment

MPI / ClusterTools Update and Plans

End-user Tools for Application Performance Analysis Using Hardware Counters

Capacitive Touch Lab. Renesas Capacitive Touch Lab R8C/36T-A Family

Wakanda Studio Features

Debugging and Profiling Lab. Carlos Rosales, Kent Milfeld and Yaakoub Y. El Kharma

How to test and debug an ASP.NET application

How to Design and Manage a Multi- Migger for parallel Programs

DS-5 ARM. Using the Debugger. Version Copyright ARM. All rights reserved. ARM DUI0446P

Improve Fortran Code Quality with Static Security Analysis (SSA)

Monitoring, Tracing, Debugging (Under Construction)

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board

vtcommander Installing and Starting vtcommander

Technical Computing Suite Job Management Software

Why Threads Are A Bad Idea (for most purposes)

JProfiler: Code Coverage Analysis Tool for OMP Project

Streamline Computing Linux Cluster User Training. ( Nottingham University)

- An Essential Building Block for Stable and Reliable Compute Clusters

ERIKA Enterprise pre-built Virtual Machine

LICENSE4J FLOATING LICENSE SERVER USER GUIDE

Multi-core Programming System Overview

Using Process Monitor

Orchestrating Document and Media Management using CMIS

Training Simulator and Demo Software

Load testing with. WAPT Cloud. Quick Start Guide

The New ABAP Debugger - An Introduction. Boris Gebhardt Christoph Stoeck SAP AG

Integrating SNiFF+ with the Data Display Debugger (DDD)

Table of Contents. Safety Warnings..3. Introduction.. 4. Host-side Remote Desktop Connection.. 5. Setting Date and Time... 7

Monitoring Replication

Parallel Computing with Mathematica UVACSE Short Course

HPC Wales Skills Academy Course Catalogue 2015

Allinea Forge User Guide. Version 6.0.1

This section provides a 'Quickstart' guide to using TestDriven.NET any version of Microsoft Visual Studio.NET

Load Imbalance Analysis

IBM Tivoli Monitoring Version 6.3 Fix Pack 2. Infrastructure Management Dashboards for Servers Reference

TMA Management Suite. For EAD and TDM products. ABOUT OneAccess. Value-Adding Software Licenses TMA

What s Cool in the SAP JVM (CON3243)

CHAPTER 15: Operating Systems: An Overview

Nios II IDE Help System

RA MPI Compilers Debuggers Profiling. March 25, 2009

Introduction to Eclipse

Introduction to Running Computations on the High Performance Clusters at the Center for Computational Research

Parallel Programming for Multi-Core, Distributed Systems, and GPUs Exercises

Case Study on Productivity and Performance of GPGPUs

Debugging JavaScript and CSS Using Firebug. Harman Goei CSCI 571 1/27/13

Chapter 3 Application Monitors

Red Hat Linux Internals

How to Login Username Password:

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Table of Contents. 1. Overview Materials Required System Requirements User Mode Installation Instructions..

ACR Triad Site Server Click Once Software System

Transcription:

Tim Cramer cramer@rz.rwth-aachen.de Rechen- und Kommunikationszentrum (RZ)

Why to use a Debugger? If your program goes haywire, you may... ( wand (... buy a magic... read the source code again and again and...... enrich your application with printf s OR Use an adequate tool a debugger. Debuggers will enhance your productivity. 2

What is TotalView? A comprehensive debugging solution for demanding parallel and multi-core applications Wide compiler & platform support C, C++, Fortran 77 & 90, UPC Linux, OS X, Unix Windows frontend (client) Handles concurrency multi-threaded debugging parallel debugging MPI, PVM, others remote and client/server debugging Integrated Memory Debugging Reverse Debugging available ReplayEngine Supports a Variety of Usage Models powerful and easy GUI visualization CLI for scripting Long distance remote debugging Unattended batch debugging / GUI-free debugging with TVScript 3

About this Session TotalView is a GUI-based Debugger I don t like slides with one screenshot after the other I want to do this as interactive as possible If you want: Start your Laptops and login Login to RWTH Compute Cluster using the NX client All examples should be distributed in the hpclabxx accounts Slides for interactive sessions will be online with screenshots 4

Before you start Lean back and relax Check your environment increase ulimits (ulimit -a) -s (! OpenMP Stack size (crucial for Fortran and -t CPU time -v Address space and others -c ( files Core file size (crucial for debugging on core Remove all objects and intermediate files ( g -) Rebuild with debugging info ON ( O0 -) optimization OFF Problem still here? Use a debugger! 5

TotalView in the RWTH Environment Initialize the environment and startup: $ module load totalview $ totalview or load a binary directly (here called a.out): $ totalview a.out -a <options of a.out> Main modes: Start a new process Attach to a running process Load a core file (Post-Mortem) 6

Process Window Toolbar Process and Thread Status Stack Trace Pane Stack Frame Pane Source Pane Tabbed Pane 7

Root Window and Console Status Info B = Breakpoint E = Error W = Watchpoint R = Running M = Mixed T = Stopped 8

Break- and Watchpoints Breakpoints (just presented) Interrupt execution when reaching a specific code line Conditional Breakpoints possible Set by clicking in the source pane Temporary disabling is possible Watchpoints Interrupt when a change occurs to a specific memory location Conditional watchpoints possible (e.g. only stop if the sign of the value changes or specified threshold reached) 9

Demo 1: TotalView Startup and Basics Live Demo Startup 10

L1: Login with NX & Startup TotalView 11

L1: TotalView Window 12

L1: Post-Mortem Debugging (1/2) 13

L1: Post-Mortem Debugging (2/2) 14

L1: Running within TotalView 15

Setting a breakpoint 16

Inspecting an array in C/C++ Typecast necessary 17

Data Visualizations Helpful for big data arrays 18

Demo 2: TotalView Watchpoints Live Demo Watchpoints 19

L2: Watchpoints (1/2) Create a watchpoint for a[29] 20

L2: Watchpoints (2/2) Will interrupt as soon as a[29] changes 21

Parallel Parallel Debugging might be very hard Try to debug a serial version of the program first! Typical multithreading errors may not be found (e.g., race conditions) Some errors only occur with optimized code (uninitialized variables?) with many processes outside of debug sessions (different timing) Nevertheless, TV is better than no TV Stack frames for every process / thread in one GUI Switching between processes / threads (even for accelerators like GPGPUs) Variable inspection (and visualization) across all processes / threads Deadlock detection Visualization of the MPI message queue 22

OpenMP and TotalView (1/2) Overview of thread number Number of threads in root window some OpenMP implementations use an additional system thread Thread state and navigation Step into a parallel region is not possible -> Set a breakpoint Easy switching between the threads with T- / T+ 23

OpenMP and TotalView (2/2) Breakpoint properties and barriers Default behavior: Same breakpoint for all threads Change Properties Group Barriers Process Thread Similar to breakpoints Help to synchronize Stop all threads of all processes Stop all threads of one process (default) Stop only the current thread 24

MPI and TotalView Two startup methods for MPI jobs New launch: $ totalview mpi-a.out Set parameters in GUI Easy and intuitive No detaching or re-attaching possible Not available on all platforms Classic lauch: $ mpiexec tv -np 4 mpi-a.out Arguments depend on MPI vendor Attach / Attach to subset / Detache / Reattache possible Warning: Not possible @ RZ at the moment 25

Demo 3: Parallel Debugging with MPI Live Demo Parallel Debugging 26

L3: MPI Debugging 27

L3: MPI Debugging Be patient 28

L3: MPI Debugging 29

L3: MPI Debugging Press the HALT button 30

L3: MPI Debugging Rank 0 is waiting in barrier 31

L3: MPI Debugging Rank 1 still waits for data 32

L3: MPI Debugging Message Queue Graph Rank 1, 2, 3 are waiting for data on tag 99 33

Debugging of Large MPI Jobs Limitations Each MPI process consumes a TotalView license token RWTH has only 50 licenses Try to debug a small example Debugging of subset of the whole job Attaching to subset possible File -> Preferences -> Parallel When a job goes parallel menu set: [x] on Ask what to do (instead of Attach to all ) Choose a subset of processors in Group -> Attach Subset 34

Message Queue Graph Tools Message Queue Graph Hangs & Deadlocks Pending Messages Communication Patterns Green: Pending Sends Blue: Pending Receives Red: Unexpected Messages Find deadlocks: Options Cycle Detection 35

Memory Debugging: MemoryScape Debugging for Memory leaks (Leak detection) Double free Invalid arrary bounds Memory reports Consumption Comparisons 36

Summary Using a debugger enhances productivity TotalView helps you! Serial programs Threaded (OpenMP) programs MPI programs Hybrid programs GPGPUs Online information http://www.roguewave.com/support/product-documentation/totalview.aspx#totalview http://www.rz.rwth-aachen.de/hpc/primer 37

The End Thank you for your attention! Questions? We have prepared several exercises. 38