Debugging Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.

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.
Code Composer Department of Electrical and Computer Engineering
Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Utilizing the GDB debugger to analyze programs Background and application.
Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
Using the Argo Cluster Paul Sexton CS 566 February 6, 2006.
ALEPH version 21 Task Manager. New Task Manager Interface Admin tab 2 The Task Manager interface has been removed from the ALEPH menu, and is now found.
E.1 Eclipse. e.2 Installing Eclipse Download the eclipse.installation.exe from the course web site to your computer and execute it. Keep the destination.
Asynchronous Solution Appendix Eleven. Training Manual Asynchronous Solution August 26, 2005 Inventory # A11-2 Chapter Overview In this chapter,
Memory & Storage Architecture Seoul National University Computer Architecture “ Bomb Lab Hints” 2nd semester, 2014 Modified version : The original.
Microsoft Office Word 2013 Core Microsoft Office Word 2013 Core Courseware # 3250 Lesson 8: Using Productivity Tools.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Access Tutorial 10 Automating Tasks with Macros
Using Task Manager to Work EDI/ERA Posting Lori Phillips CHUG at Centricity Live April 29 – May 2,2015.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. M I C R O S O F T ® Preparing for Electronic Distribution Lesson 14.
Debugging Cluster Programs using symbolic debuggers.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Bigben Pittsburgh Supercomputing Center J. Ray Scott
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Selecting, Formatting, and Printing a finished Report…….
Creating a Project with C++ Builder
Compiling & Debugging Quick tutorial. What is gcc? Gcc is the GNU Project C compiler A command-line program Gcc takes C source files as input Outputs.
Developing C/C++ applications with the Eclipse CDT David Gallardo.
DDT Debugging Techniques Carlos Rosales Scaling to Petascale 2010 July 7, 2010.
Playing Back Scripts In HP LoadRunner >>>>>>>>>>>>>>>>>>>>>>
Active-HDL Interfaces Debugging C Code Course 10.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
A Tutorial on Introduction to gdb By Sasanka Madiraju Graduate Assistant Center for Computation and Technology.
Configuring IQmol for Windows machines, use version!
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
CSE 351 GDB Introduction. Lab 1 Status? How is Lab 1 going? I’ll be available at the end of class to answer questions There are office hours later today.
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.
Using Simulator With Undertow Suite. Source environment variables For example, envsource has all the environment variables set up. You can change the.
HPCC Mid-Morning Break Dirk Colbry, Ph.D. Research Specialist Institute for Cyber Enabled Discovery TotalView Parallel Debugger.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
17/02/2016S. Ponce / EP-LBC1 Debugging Under Linux Sebastien Ponce Friday, 8 March 2002.
15 Copyright © 2004, Oracle. All rights reserved. Debugging Triggers.
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
Wouter Verkerke, NIKHEF 1 Using ‘stoomboot’ for NIKHEF-ATLAS batch computing What is ‘stoomboot’ – Hardware –16 machines, each 2x quad-core Pentium = 128.
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
2016 TELPAS Online Testing & Data Collection. Disclaimer  These slides have been prepared by the Student Assessment Division of the Texas Education Agency.
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.
1 Using an Integrated Development Environment. Integrated Development Environments An Integrated Development Environment, or IDE, permits you to edit,
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
OpenMP Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.
Advanced Computing Facility Introduction
DEBUG.
Getting Eclipse for C/C++ Development
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Eclipse Navigation & Usage.
PRU-ICSS Programming with CCS
Computer Architecture “Bomb Lab Hints”
Debugging with Eclipse
Getting Started: Developing Code with Cloud9
Testing, debugging, and using support libraries
Getting Eclipse for C/C++ Development
MECH 3550 : Simulation & Visualization
Debugging.
Working in The IITJ HPC System
Makefiles, GDB, Valgrind
Debugging with Eclipse
Presentation transcript:

Debugging Lab Antonio Gómez-Iglesias Texas Advanced Computing Center

Setup – X11 Login to Stampede: -ssh -X Untar the lab files: – cd – tar zxvf ~train00/dbg_lab.tgz Change directories and ls to see the files: – cd dbg_lab – ls

GNU DEBUGGING LAB

Find a bug with gdb In this example we will use gdb to debug a code that crashes. First, you should be on a compute node when debugging with gdb % idev -p normal -A TRAINING-HPC % idev -p normal -A TG-TRA After your session begins, compile the deadlock example: % icc -g -o divcrash./divcrash.c # C example Run the code %./divcrash What happened?

Find a bug with gdb Now, we’ll run with gdb Use gdb to load the executable: % gdb./divcrash Kick off the run (gdb) run Where does the code crash? What line was it on? Set a breakpoint at the line that the code crashed on Step through each iteration using the continue command Print the value of x and y at each breakpoint (this will not work for codes compiled with ifort with the default gdb)

DDT DEBUGGING LAB

Finding a deadlock with DDT In this example we will use DDT to debug a code that deadlocks (you need X11, so ssh -X ). Exit from your idev session Compile the deadlock example: % mpicc -g -O0 -o deadlock./deadlock.c #C example % mpif90 -g -O0 -o deadlock./deadlock.f90#F90 Load the DDT module: % module load ddt Start up DDT: % ddt./deadlock

DDT Run Window If you are using X11, you should see the default Run window with the executable name in the Application text box. Don’t click submit yet! We need to configure: MPI type Number of processes Memory Debugging Queue Submission Parameters Advanced Options

Configure DDT: Options Choose the correct version of MPI – mvapich 2 – Intel MPI Leave the default MPI (MVAPICH 2) Leave Debugger on the Automatic setting

Configure DDT: Tasks + Memory Debugging Set the number of tasks to 8 Enable memory debugging Enter Memory Debugging Pane

Configure DDT: Memory Debugging Ensure the library is set to C/Fortran If your code is C++, reset this to C++ If ddt crashes with memory debugging enabled, try setting guard pages

Configure DDT: Batch Submission This step is specific to this lab. Normally, you will not have to change this. Open the Configure pane for batch submission

Configure DDT: Batch Submission Update the Submission template file entry to point to the custom template file in the local directory This template file has the reservation command for the batch script created by ddt. Edit the queue parameters

Configure DDT: Queue Parameters Choose the “normal” queue Set your project code - for this training class use: TRAINING-HPC or TG-TRA The reservation text box is specific to this custom template Select the OK button

DDT: Job Queuing Add any necessary arguments to the program (none for the example) 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 pane Stack view, input/output, breakpoints, etc. Variable pane Evaluation pane Source navigator Process controls Automatically stops at the first command past MPI_Init

DDT: Program Hangs The output we expect does not appear in the Stdout window. No active communication between procs. Pause execution to analyze the program status (top left).

DDT: Stacks On the bottom left window select the Stacks view. Note that since this version of MPI was compiled with debug information, the halting point is within the MPI library

DDT: Stacks Move to the top of the stack to determine which lines of your code are at the halting point. All processors seem to be stuck on a MPI_Send().

DDT: What’s Wrong? This is a classic deadlock situation. All tasks are engaged in a blocking send, but there are no tasks receiving. Rearrange the order of communications to remove the deadlock.