DDT Debugging Techniques Carlos Rosales Scaling to Petascale 2010 July 7, 2010.

Slides:



Advertisements
Similar presentations
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER TotalView on the T3E and IBM SP Systems NERSC User Services June 12, 2000.
Advertisements

Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3-1.
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Dr. Fabrizio Gala Dipartimento di Scienze di Base e Applicate Per l’Ingegneria – Sezione di Fisica Via Scarpa Rome, Italy 1.
Advanced MPI Lab MPI I/O Exercises. 1 Getting Started Get a training account from the instructor Login (using ssh) to ranger.tacc.utexas.edu.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
JavaScript, Fourth Edition
Parallel Debugging Techniques Le Yan Louisiana Optical Network Initiative 8/3/2009Scaling to Petascale Virtual Summer School.
Hands-On Microsoft Windows Server 2008 Chapter 11 Server and Network Monitoring.
Using Microsoft Outlook: Basics. Objectives Guided Tour of Outlook –Identification –Views Basics –Contacts –Folders –Web Access Q&A.
Windows Server 2008 Chapter 11 Last Update
Parallel Debugging Techniques & Introduction to Totalview Le Yan Louisiana Optical Network Initiative 7/6/2010Scaling to Petascale Virtual Summer School.
Access Tutorial 10 Automating Tasks with Macros
Financial Information System Running Reports in FIS.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Debugging Cluster Programs using symbolic debuggers.
Advanced User Guide to Outlook and all its features.
Debugging applications, using properties Jim Warren – COMPSCI 280 S Enterprise Software Development.
DEBUGGING CHAPTER Topics  Getting Started with Debugging  Types of Bugs –Compile-Time Bugs –Bugs Attaching Scripts –Runtime Errors  Stepping.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC BUILDING BLOCKS Bilal Munir Mughal 1 Chapter-5.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Support for Debugging Automatically Parallelized Programs Robert Hood Gabriele Jost CSC/MRJ Technology Solutions NASA.
Debugging and Profiling GMAO Models with Allinea’s DDT/MAP Georgios Britzolakis April 30, 2015.
TotalView Debugging Tool Presentation Josip Jakić
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because.
Session Objectives • Login to PeopleSoft Test Framework(PTF)
Debugging in Java. Common Bugs Compilation or syntactical errors are the first that you will encounter and the easiest to debug They are usually the result.
Active-HDL Interfaces Debugging C Code Course 10.
Oracle Data Integrator Procedures, Advanced Workflows.
Martin Schulz Center for Applied Scientific Computing Lawrence Livermore National Laboratory Lawrence Livermore National Laboratory, P. O. Box 808, Livermore,
Testing and Debugging Session 9 LBSC 790 / INFM 718B Building the Human-Computer Interface.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Microsoft Project – Tutorial 4 Leveling Overallocations In some cases, a resource could be assigned more work in a given time period than it has working.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
A New Parallel Debugger for Franklin: DDT Katie Antypas User Services Group NERSC User Group Meeting September 17, 2007.
Debugging parallel programs. Breakpoint debugging Probably the most widely familiar method of debugging programs is breakpoint debugging. In this method,
An Introduction to Designing, Executing and Sharing Workflows with Taverna Katy Wolstencroft myGrid University of Manchester IMPACT/Taverna Hackathon 2011.
CH 13 Server and Network Monitoring. Hands-On Microsoft Windows Server Objectives Understand the importance of server monitoring Monitor server.
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
HPCC Mid-Morning Break Dirk Colbry, Ph.D. Research Specialist Institute for Cyber Enabled Discovery TotalView Parallel Debugger.
Office of Housing Choice Voucher Program Voucher Management System – VMS Version Released October 2011.
Indicator 13 Secondary Transition. Main Menu SPP13 has a navigation toolbar located at the top of each screen. If you use the toolbar to navigate to another.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Unit - V. Debugging GNU Debugger helps you in getting information about the following: 1.If a core dump happened, then what statement or expression did.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Mitglied der Helmholtz-Gemeinschaft Debugging and Validation Tools on Parallel Systems 2012 |Bernd Mohr Institute for Advanced Simulation (IAS) Jülich.
Hands-On Microsoft Windows Server 2008 Chapter 5 Configuring Windows Server 2008 Printing.
Intoduction to Andriod studio Environment With a hello world program.
Debugging Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Introduction to HPC Debugging with Allinea DDT Nick Forrington
What's New in Visual Studio 2010 Debugging Brian Peek Senior Consultant, ASPSOFT, Inc. Microsoft MVP - C#
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Debugging using By: Samuel Ashby. What is debugging?  A bug is an error in either a program or the hardware itself.  Debugging is first locating and.
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 10 Operating System Management.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
HP-SEE TotalView Debugger Josip Jakić Scientific Computing Laboratory Institute of Physics Belgrade The HP-SEE initiative.
OpenMP Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.
Chapter 2: The Visual Studio .NET Development Environment
Eclipse Navigation & Usage.
Testing and Debugging.
Computer Programming I
Advanced TAU Commander
Testing, debugging, and using support libraries
Our Environment We will exercise on Microsoft Visual C++ v.6
Presentation transcript:

DDT Debugging Techniques Carlos Rosales Scaling to Petascale 2010 July 7, 2010

Debugging Parallel Programs Usual problems – Memory access issues – Special cases not accounted for in the code – Wrong arguments to functions – …. New set of problems – Work distribution and partitioning – Arguments to parallel function calls – Racing conditions (shared memory / OMP) – Deadlocks (MPI) – …

The failure of printf/write Usually buffered by system – May not appear on screen/file even after executed – If called from all tasks they create too much data When un-buffered (or flushed) – Not ordered (because of delays between tasks) – Code must be “instrumented” manually May change code behavior (introduces delays) Time Consuming Inaccurate

Parallel Debuggers Parallel applications themselves Overhead is of concern for large-scale runs Frontend + distributed agents attached to each task In DDT agents are instances of a modified GDB serial debugger Frontend Agent 1 Task 1 Agent 2 Task 2 Agent 3 Task 3 Agent 4 Task 4 Agent 5 Task 5 Debugger Engine

About DDT Allinea Distributed Debugger Tool Multiplatform Supports all MPI distributions Capable of debugging large scale OMP/MPI Comprehensive – Memory checking – MPI message tracking Useful Graphical User Interface

CONFIGURATION setting up a debug session

Using DDT Compile your code using the standard debug flags: % mpicc –g –O0./srcFile.c % mpif90 -g -O0./srcFile.f90 Load the DDT module: % module load ddt % module list Start up DDT: % ddt./a.out

Configuration: Welcome Screen Three ways of starting a debug session – Run and debug – Attach to a running program – Open core dump file

Configuration: Job Submission

Configuration: Options Choose the correct version of MPI – mvapich 1 – mvapich 2 – openMPI Leave Debugger on the Automatic setting

Configuration: Queue Parameters Choose the queue Set the Wall Clock Limit (H:MM:SS) Set your project code - for this training class use HPC HPC

Configuration: Memory Checks Open the Advanced tab. Enable Memory Debugging (bottom left check box) Open the Memory Debug Settings

Configuration: Memory Options Change the Heap Debugging option from the default Runtime to Low Even the option None provides some memory checking Leave Heap and Advanced unchecked unless you really know that you need them…

Memory Checks and Running Time The higher the level of memory checking the longer the execution time Runtime overhead is NOT LINEAR with the level of memory checking Often a low level of memory checking is sufficient to debug non-pathological issues

Job Queuing Add any necessary arguments to the program. Click the Submit button. A new window will open: The job is submitted to the specified queue. An automatically refreshing job status window appears. The debug session will begin when the job starts.

DDT: The debug session Code window Stack view and output window Variable window Evaluation window Project navigation window Process groups window Process controls Right click on a line to set a breakpoint. Most operations available as buttons in the process controls bar

PROCESS CONTROL focus, breakpoints and watches

Stack Window Local variables for the currently selected line and stack information is visible here

Parallel Stack View Shows position of each thread /process in the code. Hover over any function to see a list of processes at that position.

Creating Process Groups Ctr-Click to select Control->Create Group Group is created from selection with default name Right-Click the group to edit properties

Changing Focus Process control window changes to reflect selection Control->Focus Select – Group – Process – Thread Or direct selection button

Inserting Breakpoints Double-click on any line Right-click on any line Control -> Add Breakpoint Breakpoint icon

Conditional Breakpoints Right-Click on any breakpoint in the breakpoint window Edit Breakpoint Write condition in appropriate language

Conditional Breakpoints Change will be reflected in breakpoint window

Inserting Watches Right-Click in Watch Window Right-Click on Local/Evaluation Windows

Watch Point Activation When a watch point is triggered DDT will pause execution and issue a warning This gives you the opportunity to analyze the current execution state and the values of your variables

VIEWING AND EDITING DATA multidimensional array viewer, memory stats, parallel message queue

Viewing and Editing Variables Local variables appear in the variable window Drag & drop variables from Variable window to Evaluation window Right-click the variable name in the Evaluation window and select “Edit Value” or “Edit Type” View as vector to see dynamically allocated values

Data Values Across Processes View->Cross-Process Comparison View variable values across all processes in a group View->Cross-Thread Comparison View variable values across all threads in a process

Data Values Across Processes (2) Visual comparison Statistical Info Value comparison

Array data access

Multi-Dimensional Array Viewer One of these for each dimension

Data Visualization Change by selecting task in process control window

Analyzing Memory Usage Current Memory UsageOverall Memory Stats

Current memory Usage Go to View -> Current Memory Usage Process 0 is using much more memory than the others. This looks like a memory leak.

Overall Memory Stats (Size) Go to View -> Overall Memory Stats

Overall Memory Stats (Calls)

Segmentation Faults DDT tells you the exact line in the code where the problem occurs. DDT tells you the precise reason that caused the problem.

Message Queues Click on bottom left for additional information (message sizes, etc…) Pending messages in the “Unexpected” queue are indicative of MPI problems Go to View -> Message Queues

HANDS-ON

Setup Login to Ranger or Lonestar: -ssh -X -ssh -X Make sure you can export graphics to your laptop screen: – xclock If you do not see a clock, contact an instructor If you are in Ranger swap the PGI and Intel compilers: –module swap pgi intel Untar the lab files: – cd – tar xvf ~train00/ddt_petascale.tar Change directories and ls to see the files: – cd ddt_petascale – ls

Hands-On Code Using the same examples you already studied with TotalView You should find C and F90 versions of a single code, with indicative names: – cell_seq.c, cell_seq.f90 Baseline code – cell_mpi_bug.c, cell_mpi_bug.f90 MPI code to be debugged – cell_omp_bug.c, cell_omp_bug.f90 OpenMP code to be debugged Both the MPI and OMP codes contain bugs that you must find with DDT and fix.

Instructions Compile the three given codes with the -g -O0 flags: –icc -g -O0 cell_seq.c -o seq –mpicc -g -O0 cell_mpi_bug.c -o mpi –icc -g -O0 -openmp cell_omp_bug.c -o omp Load the ddt module –module load ddt Run the sequential code using DDT and write down the answer. Run the MPI and OMP codes using DDT and try to find and correct all errors, until you obtain an output identical to that of the sequential run.