Hands-on Workshop on How To Debug Codes at the Institute

Size: px
Start display at page:

Download "Hands-on Workshop on How To Debug Codes at the Institute"

Transcription

1 Hands-on Workshop on How To Debug Codes at the Institute H. Birali Runesha, Shuxia Zhang and Ben Lynch (612) (help) October 13, 2005 Outline Debuggers at the Institute Totalview Starting TotalView The TotalView GUI and basic windows Data management and visualization Breakpoints and Action points Parallel debugging: MPI, OpenMP, etc. 1

2 Debuggers at the Institute Write statements dbx pdbx Xpdbx xldb Pedb GNU gdb CVD Intel IDB DDD Totalview Other tools: Compiler options, profilers, hardware counters dbx dbx is a command line debugger for serial and parallel Fortran and C programs respectively Most useful Commands: stop at linenumber # set a breakpoint at the given linenumber stop in myroutine # set a breakpoint at the given routine run < infile # run your program, reading from the file infile next # to execute the next step of your code print var # see the value of a given variable whatis var # determine the data type of a given variable cont # continue execution from where it stopped Compile your program with g option Start dbx with or without the executable as an argument. More info: man dbx, on dbx prompt use help Available: unix systems: IBM, SGI and SUN 2

3 pdbx Command-line parallel debugger built on dbx IBM debugger for parallel programs on AIX systems and accepts all flags supported by POE Supports C, C++, Fortran 77, Fortran 90 programs Compile the code with -g flag Setup POE environment variables, e.g.: setenv MP_BUFFER_MEM 28MB setenv MP_EAGER_LIMIT 4090kb Run pdbx: pdbx a.out [program_options] [poe options] or pdbx -a poe process id [limited poe options] Available: IBM Power3 and Power4 More information: man pdbx xpdbx Parallel debugger with graphical interface Load executable after starting xpdbx. Use the File menu Use X resources to customize the xpdbx window The default resources for xpdbx are listed in /usr/lib/x11/app-defaults/xpdbx Needs the rmpool option on the IBM SP/Power4 for an interactive run Can set break/trace points 3

4 xldb Serial and multi-thread debugger with graphical interface xldb a.out Window pops up with source, etc Group of blue bars at the top right Click on bar to open window To minimize window, click on bar at top to get menu, click on minimize To set breakpoint, click on source line To navigate, see commands window pedb Graphical user interface based parallel debugger for Fortran and C programs Same as xpdbx pedb a.out <poe options> Window pops up with source, etc To set breakpoint, double-click on source line. To delete breakpoint, right-click icon in left margin, select delete To navigate, use buttons below source listing Step over step into step return Continue halt play stop tasks (processes for MPI) are chosen using buttons in task window Use Find to find a specific variable 4

5 GNU gdb gdb is a command line debugger for serial programs Support C, C++, and Fortran77 programs Available: linux and unix systems Compile the code : g77 g my.f or gcc g my.c Start debugging: gdb./a.out or gdb./a.out core # to include the core or gdb./a.out 1234 # to attach GDB to process 1234 Most useful Commands: quit: Exit from GDB. break [file:]function: Set a breakpoint at function in file. run: Start your program bt: Backtrace: display the program stack. print expr: Display the value of an expression. c: Continue running your program (after stopping) stop:set a breakpoint at line number or routine Getting help: (gdb) help _toc.html man gdb 5

6 CVD CVD - Invokes the WorkShop Debugger a source-level debugging tool with GUI set various types of breakpoints, watchpoints, and so on. view variables, expressions, structures, arrays, call tree debug Ada, C, C++, Fortran 77, and Fortran 90 programs. Available on SGI system running Irix Operating systems (SGI workstations and Origin) To invoke the Debugger for a Fortran 77 program: $ f77 -g -o myprog myprog.f $ cvd myprog # serial job or $ cvd myprog core # serial job with core dump or $ cvd mpirun -args -np 2 a.out # For an mpi job More information: Manpage: man cvd CVD and Other Workshop Tools: Build Analyzer (cvbuild) - Invokes the Build Analyzer that provides a graphical display of build dependency information. Parallel Analyzer (cvpav) - Invokes the Parallel Analyzer that presents information about MP Fortran programs. Performance Analyzer (cvperf) - Invokes the Performance Analyzer that lets you specify the name of a performance task to enable proper data collection for your experiment. Static Analyzer (cvstatic) - Invokes the Static Analyzer that lets you display source code information about your code and facilitates the setting of breakpoints. Tester (cvxcov) - Invokes the test coverage tool that lets you perform dynamic test coverage over any set of tests. 6

7 Intel IDB Intel debugger are part of the compiler installation Support C, C++, Fortran 77/90 Both dbx (default) and gdb like interfaces Documentation: anual_l.html Debugging of optimized code generated by intel compilers does not work Does not support multithreaded/multiprocess applications. claims do support mpich programs (untested) Available on the SGI Altix and systems with Intel compilers DDD Graphical debugger Part of Redhat distribution Works best with gdb Can hook in idb via: ddd --debugger idb -- dbx./a.out Multiple panes for Data/array browsing Source code Assembler code Command line interface Use help menu for details 7

8 Other Debuggers Portland Group PGDBG graphical debugger LF95: Fujitsu debugger FDB Write statements! Editors Totalview 8

9 Introduction Debugger for Unix/Linux platform Supports Fortran, C/C++ programs Serial, multi-threaded, parallel programs employing multiple processors MPI, MPICH, OpenMP, PVM, SHMEM, Global arrays, and UPC User interface and debugging style remain uniform and consistent across platforms and programming models. Starting TotalView Compile with g option Starting Totalview on MSI machines: module load totalview On a new process: % totalview a.out -a <arguments to a.out> On a core file: % totalview a.out core To attach to a running process: % totalview 9

10 o File > New Program dialog Box Short cut: ctrl-n F1 function key tells Totalview to display help info about the window TotalView Windows Root Window Unattached Processes Window Process Window Data Windows Test drive: Menu driven Alternative keyboard shortcuts for those who prefer them All 3 mouse buttons are used 10

11 Root Window Process/thread status Process name Number of threads Expand list Process Window Stack Trace pane Local variables for the selected frame Source pane Thread pane Action Points pane 11

12 Source Pane Gridded box is a possible site for a breakpoint Current function and source file Select to set onecurrent point of execution Dive on a source word to get more information Select a line to use Run to selection command Select or dive on a line number to set an action point Stack Trace Pane Select a line to choose a new stack frame Just dive on a routine and TotalView shows the routine in the Source Pane and its variables in the Stack Frame Pane. Stack frame value 12

13 Stack Frame Pane Names of arguments Names of function s local variables Stack Frame pane in the process window contains current call stack Values of variables Dive on a variable to bring up a data pane (and follow a pointer) Starting, Stopping, & Restarting Your Program Method 1 Set a breakpoint Select Go on the icon bar The program starts executing and stop when it reaches the breakpoint Method 2 Select step Totalview starts and then stops it immediately before the first statement in your main function To stop a running program, select halt To restart a program, select the Group > Restart command 13

14 Stepping through a Program Use the Step and Next commands. Step and Next both execute the current line. The difference between them is that if the line has a function call, Step dives into the function while Next executes it. If you want to get to a line without individually stepping each intervening line, select the line, and then select Run To. Stepping Out of a Function If you've stepped into a function and want to pop out to the statement that called it, select the Out command. Data Management 14

15 Displaying Data Seeing a value of a variable Method 1 Dive on a variable displayed in the Source Pane. The variable appears in a Variable Window. Method 2 Scroll to the variable in the Stack Frame Pane. If you want to display a compound variable like an array or structure, dive on it. TotalView responds by displaying information in a Variable Window. Method 3 Use the View > Lookup Variable command. The variable can be global or local. If you've defined the same variable in more than one routine, TotalView displays the variable contained in the current stack frame. Variable Window Array Data Window Array has an actual type as well as a declaration type Arrays have a slice field that you can edit to specify the dimensions to display You can update data by Selecting (left mouse button) the value and editing it 15

16 Array Slice An array slice indicates which portion of an array you want to see. I.e.: see elements 3 to 8 Fortran example- TotalView displays a one-dimensional array by using (:). It uses (:,:) if it is displaying a two-dimensional array, and so on Data Array Filtering Go to the Filter line and type a filter expression You can specify the elements of an array you re interested in This example requests all elements with values >0.8 16

17 Data Array Filtering (cont.) Filter: 5:998 will display elements between 5 and 998 Filter:== $nan Filter:== $inf In an array data pane select Visualize from the menu The Visualizer is automatically started Arrays of rank up to two may be visualized Unlike data panes visualizations are not automatically updated $visualize in EVAL points for animated display Visualization 17

18 Action Points Action Point Types Action point is a generic name for several types of breakpoints: Breakpoint stops execution of processes and threads that reach it Barrier breakpoint holds each process that reaches it until all processes in the group reach it Conditional breakpoint stops code if condition is met Evaluation point is point at which user-defined code fragments get executed Data watchpoint 18

19 Setting a Breakpoint at a Function Method 1: If you can see the function, click on a line number within the function. Method 2: Use the View > Lookup Function command to find the function. After the function displays, select a line number. Method 3: Select Action Points > At Location and then type the function's name in the dialog box. Setting a Data Watchpoint A data watchpoint is a type of breakpoint that monitors a variable's value. Unlike other action points, it isn't set on a source line. Instead, it's set on the memory location where your program stores the variable. When the contents of this memory location change, TotalView stops execution and displays the source line that changed it. This means you should only set watchpoints on global variables or on malloc'd memory. Set a watchpoint by first diving on the variable to display its Variable Window, and then select the Tools > Watchpoint command. 19

20 Printing Something at a Breakpoint After creating a breakpoint, right-click on the sign, and then select Properties from the popup menu. In the Properties dialog box, select Evaluate and then type a print statement. For example: printf("the value of foo divided by 20 is: %d\n",foo/20); When code is associated with a breakpoint, the breakpoint is called an eval point. Stopping Your Program Using a Condition Create an eval point (this was discussed in the previous section), entering a condition instead of a statement. For example, here's a condition that stops execution when the value of the variable i in the eval point's line is equal to 30: if (i == 30) $stop One of the big differences between an eval point and a breakpoint is that execution doesn't stop unless you tell it to. That is, if you don't add a $stop to your eval point, TotalView just continues executing. 20

21 Stopping Your Program Every "x" Times TotalView Executes a Line Create an eval point that uses the $count statement to tell TotalView how many times the line should execute. For example: $count 20 $count is another of TotalView's built-in functions. $stop is implied when you use this statement. Saving Your Action Points You usually want this to happen automatically and, unless someone has changed things, TotalView automatically saves them. If it isn't saving them, go to the Options Tab in the File > Preferences dialog box and select Save preferences file on exit. While you're looking at preferences, you might want to look at the other things you can set. 21

22 Enabled breakpoint Disabled breakpoint Action Point List Pane Breakpoint location Select on action point icon enables/disables it Dive on action point refocuses source pane to location; this behaves like a bookmark Parallelism in TotalView 22

23 Supported Parallelism TotalView supports all major parallel programming paradigms MPI OpenMP Pthreads PVM HPF Shmem TotalView Multi-Process Functionality TotalView performs actions on groups of processes Start / stop Share breakpoints across executables Take action on multiple processes when at breakpoint Attach to multiple running processes Single step groups of processes Set barrier breakpoints Easily view and manipulate variables processes Laminated variables for threads and processes Distributed HPF arrays 23

24 Debugging MPI Programs on the IBM SP with Totalview % totalview poe -a a.out [program_args][pe_args] Automatically attaches to all of the MPI processes TotalView can display MPI message queues Displaying a variable in all processes or threads Need to view or update the value of a variable in all of the processes or threads at once 1. First display an instance of the variable in a Variable Window 2. View > Laminate > Process, or View > Laminate > Thread 3. View > Laminate > None, delaminates the window Example on the right is for an OpenMP 24

25 Other tools Other Tools Profiler: Xprofiler: GUI based IBM performance profiling tool Graphical function call tree Flat report: line by line CPU time Compile and link your program with pg Run your code => produce gmon.out Invoke xprofiler xprofiler executable [-s] gmon.out.<processor-id> 25

26 Hardware counter: Hpm on the IBM systems Hardware performance counters Cycles Instructions Float point and fixed point operations Loads/stores Cache misses TLB misses Etc Supports MPI, OpenMP and threaded applications Multiple instrumentations and derived metrics MSI Help: Totalview Visit Online documentation at 26

TotalView. Debugging Tool Presentation. Josip Jakić

TotalView. Debugging Tool Presentation. Josip Jakić TotalView Debugging Tool Presentation Josip Jakić josipjakic@ipb.ac.rs Agenda Introduction Getting started with TotalView Primary windows Basic functions Further functions Debugging parallel programs Topics

More information

SGI Altix Getting Correct Code Reiner Vogelsang SGI GmbH

SGI Altix Getting Correct Code Reiner Vogelsang SGI GmbH SGI Altix Getting Correct Code Reiner Vogelsang SGI GmbH reiner@sgi.com Module Objectives After completing the module, you will able to Find caveats and hidden errors in application codes Handle debuggers

More information

TotalView. Users Guide. August 2001 Version 5.0

TotalView. Users Guide. August 2001 Version 5.0 TotalView Users Guide August 2001 Version 5.0 Copyright 1999 2001 by Etnus LLC. All rights reserved. Copyright 1998 1999 by Etnus Inc. All rights reserved. Copyright 1996 1998 by Dolphin Interconnect Solutions,

More information

HPCC - Hrothgar. Getting Started User Guide TotalView. High Performance Computing Center Texas Tech University

HPCC - Hrothgar. Getting Started User Guide TotalView. High Performance Computing Center Texas Tech University HPCC - Hrothgar Getting Started User Guide TotalView High Performance Computing Center Texas Tech University HPCC - Hrothgar 2 Table of Contents *This user guide is under development... 3 1. Introduction...

More information

Debugging with TotalView

Debugging with TotalView Debugging with TotalView Le Yan HPC Consultant User Services Goals Learn how to start TotalView on Linux clusters Get familiar with TotalView graphic user interface Learn basic debugging functions of TotalView

More information

Parallel Debugging with TotalView BSC-CNS

Parallel Debugging with TotalView BSC-CNS Parallel Debugging with TotalView BSC-CNS AGENDA What debugging means? Debugging Tools in the RES Allinea DDT as alternative (RogueWave Software) What is TotalView Compiling Your Program Starting totalview

More information

Debug for GDB Users. Action Description Debug GDB $debug <program> <args> >create <program> <args>

Debug for GDB Users. Action Description Debug GDB $debug <program> <args> >create <program> <args> Page 1 of 5 Debug for GDB Users Basic Control To be useful, a debugger must be capable of basic process control. This functionally allows the user to create a debugging session and instruct the process

More information

Debugging with GDB and DDT

Debugging with GDB and DDT Debugging with GDB and DDT Ramses van Zon SciNet HPC Consortium University of Toronto June 28, 2012 1/41 Ontario HPC Summerschool 2012 Central Edition: Toronto Outline Debugging Basics Debugging with the

More information

TotalView. User Guide. June 2004 Version 6.5

TotalView. User Guide. June 2004 Version 6.5 TotalView User Guide June 2004 Version 6.5 Copyright 1999 2004 by Etnus LLC. All rights reserved. Copyright 1998 1999 by Etnus, Inc. Copyright 1996 1998 by Dolphin Interconnect Solutions, Inc. Copyright

More information

Debugging with TotalView

Debugging with TotalView Debugging with TotalView Dieter an Mey Center for Computing and Communication Aachen University of Technology anmey@rz.rwth-aachen.de 1 TotalView, Dieter an Mey, SunHPC 2006 Debugging on Sun dbx line mode

More information

Your code must have been compiled with the -g compiler option. Example:

Your code must have been compiled with the -g compiler option. Example: ddd Tips This provides some helpful information about the Unix ddd debugger. with more detailed information: There are other resources available gnu ddd manual matloff ddd information Contents Prerequisites...

More information

Debugging with Totalview. Martin Čuma Center for High Performance Computing University of Utah

Debugging with Totalview. Martin Čuma Center for High Performance Computing University of Utah Debugging with Totalview Martin Čuma Center for High Performance Computing University of Utah mcuma@chpc.utah.edu Overview Totalview introduction. Basic operation. Serial debugging. Parallel debugging.

More information

Introduction to debugging. Martin Čuma Center for High Performance Computing University of Utah

Introduction to debugging. Martin Čuma Center for High Performance Computing University of Utah Introduction to debugging Martin Čuma Center for High Performance Computing University of Utah m.cuma@utah.edu Overview Program errors Simple debugging Graphical debugging DDT and Totalview Intel tools

More information

Using gdb to find the point of failure

Using gdb to find the point of failure gdb gdb is the GNU debugger on our CS machines. gdb is most effective when it is debugging a program that has debugging symbols linked in to it. With gcc and g++, this is accomplished using the -g option,

More information

Debugging and Profiling

Debugging and Profiling Debugging and Profiling Dr. Axel Kohlmeyer Senior Scientific Computing Expert Information and Telecommunication Section The Abdus Salam International Centre for Theoretical Physics http://sites.google.com/site/akohlmey/

More information

TotalView. Graphic User Interface Commands Guide. version 8.0

TotalView. Graphic User Interface Commands Guide. version 8.0 TotalView Graphic User Interface Commands Guide version 8.0 Copyright 1998 2006 by Etnus LLC. All rights reserved. Copyright 1996 1998 by Dolphin Interconnect Solutions, Inc. Copyright 1993 1996 by BBN

More information

Using the Debugger. Michael Jantz Dr. Prasad Kulkarni

Using the Debugger. Michael Jantz Dr. Prasad Kulkarni Using the Debugger Michael Jantz Dr. Prasad Kulkarni 1 Debugger What is it a powerful tool that supports examination of your program during execution. Idea behind debugging programs. Creates additional

More information

CSE 351. GDB Introduction

CSE 351. GDB Introduction CSE 351 GDB Introduction Lab 2 Out either tonight or tomorrow Due April 27 th (you have ~12 days) Reading and understanding x86_64 assembly Debugging and disassembling programs Today: General debugging

More information

Parallel Debugging. Matthias Müller, Pavel Neytchev, Rainer Keller, Bettina Krammer

Parallel Debugging. Matthias Müller, Pavel Neytchev, Rainer Keller, Bettina Krammer Parallel Debugging Matthias Müller, Pavel Neytchev, Rainer Keller, Bettina Krammer University of Stuttgart High-Performance Computing-Center Stuttgart (HLRS) www.hlrs.de Höchstleistungsrechenzentrum Stuttgart

More information

TotalView. User Guide. September 2003 Version 6.3

TotalView. User Guide. September 2003 Version 6.3 TotalView User Guide September 2003 Version 6.3 Copyright 1999 2003 by Etnus LLC. All rights reserved. Copyright 1998 1999 by Etnus, Inc. Copyright 1996 1998 by Dolphin Interconnect Solutions, Inc. Copyright

More information

IBM High Performance Computing Toolkit

IBM High Performance Computing Toolkit IBM High Performance Computing Toolkit Pidad D'Souza (pidsouza@in.ibm.com) IBM, India Software Labs Top 500 : Application areas (November 2011) Systems Performance Source : http://www.top500.org/charts/list/34/apparea

More information

TotalView Users Guide. version 8.8

TotalView Users Guide. version 8.8 TotalView Users Guide version 8.8 Copyright 2007 2010 by TotalView Technologies. All rights reserved Copyright 1998 2007 by Etnus LLC. All rights reserved. Copyright 1996 1998 by Dolphin Interconnect Solutions,

More information

Debugging. John Lockman Texas Advanced Computing Center

Debugging. John Lockman Texas Advanced Computing Center Debugging John Lockman Texas Advanced Computing Center Debugging Outline GDB Basic use Attaching to a running job DDT Identify MPI problems using Message Queues Catch memory errors PTP For the extremely

More information

Debugging with GDB and DDT

Debugging with GDB and DDT Debugging with GDB and DDT Ramses van Zon SciNet HPC Consortium University of Toronto June 13, 2014 1/41 Ontario HPC Summerschool 2014 Central Edition: Toronto Outline Debugging Basics Debugging with the

More information

NEW CEIBO DEBUGGER. Menus and Commands

NEW CEIBO DEBUGGER. Menus and Commands NEW CEIBO DEBUGGER Menus and Commands Ceibo Debugger Menus and Commands D.1. Introduction CEIBO DEBUGGER is the latest software available from Ceibo and can be used with most of Ceibo emulators. You will

More information

GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial

GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial A Walkthrough with Examples CMSC 212 - Spring 2009 Last modified March 22, 2009 What is gdb? GNU Debugger A debugger for several languages, including C and C++ It allows you to inspect what the program

More information

CSE 374 Programming Concepts & Tools

CSE 374 Programming Concepts & Tools CSE 374 Programming Concepts & Tools Hal Perkins Fall 2017 Lecture 11 gdb and Debugging 1 Administrivia HW4 out now, due next Thursday, Oct. 26, 11 pm: C code and libraries. Some tools: gdb (debugger)

More information

Source level debugging. October 18, 2016

Source level debugging. October 18, 2016 Source level debugging October 18, 2016 Source level debugging Source debugging is a nice tool for debugging execution problems; it can be particularly useful when working with crashed programs that leave

More information

Welcome. HRSK Practical on Debugging, Zellescher Weg 12 Willers-Bau A106 Tel

Welcome. HRSK Practical on Debugging, Zellescher Weg 12 Willers-Bau A106 Tel Center for Information Services and High Performance Computing (ZIH) Welcome HRSK Practical on Debugging, 03.04.2009 Zellescher Weg 12 Willers-Bau A106 Tel. +49 351-463 - 31945 Matthias Lieber (matthias.lieber@tu-dresden.de)

More information

Introduction to Parallel Programming. Martin Čuma Center for High Performance Computing University of Utah

Introduction to Parallel Programming. Martin Čuma Center for High Performance Computing University of Utah Introduction to Parallel Programming Martin Čuma Center for High Performance Computing University of Utah mcuma@chpc.utah.edu Overview Types of parallel computers. Parallel programming options. How to

More information

Laboratory Assignment #4 Debugging in Eclipse CDT 1

Laboratory Assignment #4 Debugging in Eclipse CDT 1 Lab 4 (10 points) November 20, 2013 CS-2301, System Programming for Non-majors, B-term 2013 Objective Laboratory Assignment #4 Debugging in Eclipse CDT 1 Due: at 11:59 pm on the day of your lab session

More information

CS 270 Systems Programming. Debugging Tools. CS 270: Systems Programming. Instructor: Raphael Finkel

CS 270 Systems Programming. Debugging Tools. CS 270: Systems Programming. Instructor: Raphael Finkel Debugging Tools CS 270: Systems Programming Instructor: Raphael Finkel Gdb: The Gnu debugger It runs on most computers and operating systems. It allows you to examine a running executable program. It does

More information

Exercise Session 6 Computer Architecture and Systems Programming

Exercise Session 6 Computer Architecture and Systems Programming Systems Group Department of Computer Science ETH Zürich Exercise Session 6 Computer Architecture and Systems Programming Herbstsemester 2016 Agenda GDB Outlook on assignment 6 GDB The GNU Debugger 3 Debugging..

More information

Problem Set 1: Unix Commands 1

Problem Set 1: Unix Commands 1 Problem Set 1: Unix Commands 1 WARNING: IF YOU DO NOT FIND THIS PROBLEM SET TRIVIAL, I WOULD NOT RECOMMEND YOU TAKE THIS OFFERING OF 300 AS YOU DO NOT POSSESS THE REQUISITE BACKGROUND TO PASS THE COURSE.

More information

Performance Analysis and Debugging Tools

Performance Analysis and Debugging Tools Performance Analysis and Debugging Tools Performance analysis and debugging intimately connected since they both involve monitoring of the software execution. Just different goals: Debugging -- achieve

More information

Addressing the Increasing Challenges of Debugging on Accelerated HPC Systems. Ed Hinkel Senior Sales Engineer

Addressing the Increasing Challenges of Debugging on Accelerated HPC Systems. Ed Hinkel Senior Sales Engineer Addressing the Increasing Challenges of Debugging on Accelerated HPC Systems Ed Hinkel Senior Sales Engineer Agenda Overview - Rogue Wave & TotalView GPU Debugging with TotalView Nvdia CUDA Intel Phi 2

More information

Profiling and debugging. Carlos Rosales September 18 th 2009 Texas Advanced Computing Center The University of Texas at Austin

Profiling and debugging. Carlos Rosales September 18 th 2009 Texas Advanced Computing Center The University of Texas at Austin Profiling and debugging Carlos Rosales carlos@tacc.utexas.edu September 18 th 2009 Texas Advanced Computing Center The University of Texas at Austin Outline Debugging Profiling GDB DDT Basic use Attaching

More information

Improving the Productivity of Scalable Application Development with TotalView May 18th, 2010

Improving the Productivity of Scalable Application Development with TotalView May 18th, 2010 Improving the Productivity of Scalable Application Development with TotalView May 18th, 2010 Chris Gottbrath Principal Product Manager Rogue Wave Major Product Offerings 2 TotalView Technologies Family

More information

Intro to Segmentation Fault Handling in Linux. By Khanh Ngo-Duy

Intro to Segmentation Fault Handling in Linux. By Khanh Ngo-Duy Intro to Segmentation Fault Handling in Linux By Khanh Ngo-Duy Khanhnd@elarion.com Seminar What is Segmentation Fault (Segfault) Examples and Screenshots Tips to get Segfault information What is Segmentation

More information

Your code must have been compiled with the -g compiler option. Example:

Your code must have been compiled with the -g compiler option. Example: ddd Tips This provides some helpful information about the Unix ddd debugger. with more detailed information: There are other resources available gnu ddd manual matloff ddd information Contents Prerequisites...

More information

Visual Profiler. User Guide

Visual Profiler. User Guide Visual Profiler User Guide Version 3.0 Document No. 06-RM-1136 Revision: 4.B February 2008 Visual Profiler User Guide Table of contents Table of contents 1 Introduction................................................

More information

Introduction to Parallel Programming. Martin Čuma Center for High Performance Computing University of Utah

Introduction to Parallel Programming. Martin Čuma Center for High Performance Computing University of Utah Introduction to Parallel Programming Martin Čuma Center for High Performance Computing University of Utah mcuma@chpc.utah.edu Overview Types of parallel computers. Parallel programming options. How to

More information

Debugging Applications Using Totalview

Debugging Applications Using Totalview Debugging Applications Using Totalview Timothy H. Kaiser tkaiser@sdsc.edu Slides by:nicholas J Wright First things first.. There is no point in optimising a program that has a bug in it a really fast code

More information

The Art of Debugging: How to think like a programmer. Melissa Sulprizio GEOS-Chem Support Team

The Art of Debugging: How to think like a programmer. Melissa Sulprizio GEOS-Chem Support Team The Art of Debugging: How to think like a programmer Melissa Sulprizio GEOS-Chem Support Team geos-chem-support@as.harvard.edu Graduate Student Forum 23 February 2017 GEOS-Chem Support Team Bob Yantosca

More information

The Distributed Debugging Tool

The Distributed Debugging Tool The Distributed Debugging Tool Userguide - PAGE 1 - - PAGE 2 - Contents Contents... 3 1. Introduction... 7 2. Installation... 8 Licence Files... 8 Floating Licences... 9 Getting Help... 10 3. Starting

More information

Le Yan Louisiana Optical Network Initiative. 8/3/2009 Scaling to Petascale Virtual Summer School

Le Yan Louisiana Optical Network Initiative. 8/3/2009 Scaling to Petascale Virtual Summer School Parallel Debugging Techniques Le Yan Louisiana Optical Network Initiative 8/3/2009 Scaling to Petascale Virtual Summer School Outline Overview of parallel debugging Challenges Tools Strategies Gtf Get

More information

Debugging. P.Dagna, M.Cremonesi. May 2015

Debugging. P.Dagna, M.Cremonesi. May 2015 Debugging P.Dagna, M.Cremonesi May 2015 Introduction Oneofthemostwidelyusedmethodstofindoutthereasonofa strange behavior in a program is the insertion of printf or write statements in the supposed critical

More information

1. Allowed you to see the value of one or more variables, or 2. Indicated where you were in the execution of a program

1. Allowed you to see the value of one or more variables, or 2. Indicated where you were in the execution of a program CS0449 GDB Lab What is a debugger? A debugger is a program that helps you find logical mistakes in your programs by running them in a controlled way. Undoubtedly by this point in your programming life,

More information

Basic functions of a debugger

Basic functions of a debugger UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS61B Spring 1998 P. N. Hilfinger Simple Use of GDB A debugger is a program that runs other

More information

WhatÕs New in the Message-Passing Toolkit

WhatÕs New in the Message-Passing Toolkit WhatÕs New in the Message-Passing Toolkit Karl Feind, Message-passing Toolkit Engineering Team, SGI ABSTRACT: SGI message-passing software has been enhanced in the past year to support larger Origin 2

More information

TotalView Training. Developing parallel, data-intensive applications is hard. We make it easier. Copyright 2012 Rogue Wave Software, Inc.

TotalView Training. Developing parallel, data-intensive applications is hard. We make it easier. Copyright 2012 Rogue Wave Software, Inc. TotalView Training Developing parallel, data-intensive applications is hard. We make it easier. 1 Agenda Introduction Startup Remote Display Debugging UI Navigation and Process Control Action Points Data

More information

COMP4510 Introduction to Parallel Computation. Shared Memory and OpenMP. Outline (cont d) Shared Memory and OpenMP

COMP4510 Introduction to Parallel Computation. Shared Memory and OpenMP. Outline (cont d) Shared Memory and OpenMP COMP4510 Introduction to Parallel Computation Shared Memory and OpenMP Thanks to Jon Aronsson (UofM HPC consultant) for some of the material in these notes. Outline (cont d) Shared Memory and OpenMP Including

More information

GDB cheatsheet - page 1

GDB cheatsheet - page 1 Running # gdb [core dump] Start GDB (with optional core dump). # gdb --args Start GDB and pass arguments # gdb --pid Start GDB and attach to process. set args

More information

INSTALLING INSTALLING INSTALLING

INSTALLING INSTALLING INSTALLING NightView Version 5.4 Release Notes (PowerMAX) June 2002 0890395-5.4 READ READ READ ME ME ME BEFORE BEFORE BEFORE INSTALLING INSTALLING INSTALLING THIS THIS THIS PRODUCT PRODUCT PRODUCT Copyright Disclaimer

More information

Introduction to Parallel Programming. Martin Čuma Center for High Performance Computing University of Utah

Introduction to Parallel Programming. Martin Čuma Center for High Performance Computing University of Utah Introduction to Parallel Programming Martin Čuma Center for High Performance Computing University of Utah mcuma@chpc.utah.edu Overview Types of parallel computers. Parallel programming options. How to

More information

CSE 374 Programming Concepts & Tools. Brandon Myers Winter 2015 Lecture 11 gdb and Debugging (Thanks to Hal Perkins)

CSE 374 Programming Concepts & Tools. Brandon Myers Winter 2015 Lecture 11 gdb and Debugging (Thanks to Hal Perkins) CSE 374 Programming Concepts & Tools Brandon Myers Winter 2015 Lecture 11 gdb and Debugging (Thanks to Hal Perkins) Hacker tool of the week (tags) Problem: I want to find the definition of a function or

More information

CS2141 Software Development using C/C++ Debugging

CS2141 Software Development using C/C++ Debugging CS2141 Software Development using C/C++ Debugging Debugging Tips Examine the most recent change Error likely in, or exposed by, code most recently added Developing code incrementally and testing along

More information

TotalView Debugger New Features Guide. version 8.4.0

TotalView Debugger New Features Guide. version 8.4.0 TotalView Debugger New Features Guide version 8.4.0 Copyright 2007, 2008 by TotalView Technologies. All rights reserved Copyright 1998 2007 by Etnus LLC. All rights reserved. Copyright 1996 1998 by Dolphin

More information

The Dynamic Debugger gdb

The Dynamic Debugger gdb Introduction The Dynamic Debugger gdb This handout introduces the basics of using gdb, a very powerful dynamic debugging tool. No-one always writes programs that execute perfectly every time, and while

More information

Module 4: Working with MPI

Module 4: Working with MPI Module 4: Working with MPI Objective Learn how to develop, build and launch a parallel (MPI) program on a remote parallel machine Contents Remote project setup Building with Makefiles MPI assistance features

More information

Introduction to Parallel Programming. Martin Čuma Center for High Performance Computing University of Utah

Introduction to Parallel Programming. Martin Čuma Center for High Performance Computing University of Utah Introduction to Parallel Programming Martin Čuma Center for High Performance Computing University of Utah m.cuma@utah.edu Overview Types of parallel computers. Parallel programming options. How to write

More information

Debugging process. The debugging process can be divided into four main steps: 1. Start your program, specifying anything that might affect its

Debugging process. The debugging process can be divided into four main steps: 1. Start your program, specifying anything that might affect its Debugging Introduction One of the most widely used methods to find out the reason of a strange behavior in a program is the insertion of printf or write statements in the supposed critical area. However

More information

COSC 6374 Parallel Computation. Debugging MPI applications. Edgar Gabriel. Spring 2008

COSC 6374 Parallel Computation. Debugging MPI applications. Edgar Gabriel. Spring 2008 COSC 6374 Parallel Computation Debugging MPI applications Spring 2008 How to use a cluster A cluster usually consists of a front-end node and compute nodes Name of the front-end node: shark.cs.uh.edu You

More information

DEBUGGING ON FERMI PREPARING A DEBUGGABLE APPLICATION GDB. GDB on front-end nodes

DEBUGGING ON FERMI PREPARING A DEBUGGABLE APPLICATION GDB. GDB on front-end nodes DEBUGGING ON FERMI Debugging your application on a system based on a BG/Q architecture like FERMI could be an hard task due to the following problems: the core files generated by a crashing job on FERMI

More information

Laboratory 1 Semester 1 11/12

Laboratory 1 Semester 1 11/12 CS2106 National University of Singapore School of Computing Laboratory 1 Semester 1 11/12 MATRICULATION NUMBER: In this lab exercise, you will get familiarize with some basic UNIX commands, editing and

More information

PGI Debugger User Guide

PGI Debugger User Guide Version 2015 PGI Compilers and Tools TABLE OF CONTENTS Preface... xii Intended Audience...xii Documentation... xii Compatibility and Conformance to Standards... xii Organization... xiii Conventions...

More information

ARCHER Single Node Optimisation

ARCHER Single Node Optimisation ARCHER Single Node Optimisation Profiling Slides contributed by Cray and EPCC What is profiling? Analysing your code to find out the proportion of execution time spent in different routines. Essential

More information

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger.

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger. UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS164 Spring 2008 P. N. Hilfinger The GJDB Debugger A debugger is a program that runs other

More information

You can also start with both an executable program and a core file specified:

You can also start with both an executable program and a core file specified: NAME ddd, xddd - the data display debugger SYNOPSIS ddd [ gdb ][ dbx ][ xdb ][ jdb ][ pydb ][ perl ][ debugger name ][ [r]host [username@]hostname ]] [ help ][ trace ][ version ][ configuration ][options...

More information

1 Basic functions of a debugger

1 Basic functions of a debugger UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS61B Fall 2014 P. N. Hilfinger The GJDB Debugger A debugger is a program that runs other programs,

More information

Reviewing gcc, make, gdb, and Linux Editors 1

Reviewing gcc, make, gdb, and Linux Editors 1 Reviewing gcc, make, gdb, and Linux Editors 1 Colin Gordon csgordon@cs.washington.edu University of Washington CSE333 Section 1, 3/31/11 1 Lots of material borrowed from 351/303 slides Colin Gordon (University

More information

Scalable Debugging with TotalView on Blue Gene. John DelSignore, CTO TotalView Technologies

Scalable Debugging with TotalView on Blue Gene. John DelSignore, CTO TotalView Technologies Scalable Debugging with TotalView on Blue Gene John DelSignore, CTO TotalView Technologies Agenda TotalView on Blue Gene A little history Current status Recent TotalView improvements ReplayEngine (reverse

More information

IBM VisualAge for Java,Version3.5. Distributed Debugger for Workstations

IBM VisualAge for Java,Version3.5. Distributed Debugger for Workstations IBM VisualAge for Java,Version3.5 Distributed Debugger for Workstations Note! Before using this information and the product it supports, be sure to read the general information under Notices. Edition notice

More information

Module 3: Working with C/C++

Module 3: Working with C/C++ Module 3: Working with C/C++ Objective Learn basic Eclipse concepts: Perspectives, Views, Learn how to use Eclipse to manage a remote project Learn how to use Eclipse to develop C programs Learn how to

More information

Intro to MS Visual C++ Debugging

Intro to MS Visual C++ Debugging Intro to MS Visual C++ Debugging 1 Debugger Definition A program used to control the execution of another program for diagnostic purposes. Debugger Features / Operations Single-Stepping 100011101010101010

More information

Parallel Debugging. ª Objective. ª Contents. ª Learn the basics of debugging parallel programs

Parallel Debugging. ª Objective. ª Contents. ª Learn the basics of debugging parallel programs ª Objective ª Learn the basics of debugging parallel programs ª Contents ª Launching a debug session ª The Parallel Debug Perspective ª Controlling sets of processes ª Controlling individual processes

More information

PRACE Autumn School Basic Programming Models

PRACE Autumn School Basic Programming Models PRACE Autumn School 2010 Basic Programming Models Basic Programming Models - Outline Introduction Key concepts Architectures Programming models Programming languages Compilers Operating system & libraries

More information

dbx90: Fortran debugger March 9, 2009

dbx90: Fortran debugger March 9, 2009 dbx90: Fortran debugger March 9, 2009 1 Name dbx90 a Fortran 90/95 debugger for use with the NAG Fortran compiler. 2 Usage dbx90 [option]... executable-file 3 Description dbx90 is a Fortran 90/95 debugger

More information

Debugging Intel Xeon Phi KNC Tutorial

Debugging Intel Xeon Phi KNC Tutorial Debugging Intel Xeon Phi KNC Tutorial Last revised on: 10/7/16 07:37 Overview: The Intel Xeon Phi Coprocessor 2 Debug Library Requirements 2 Debugging Host-Side Applications that Use the Intel Offload

More information

EE 355 Lab 3 - Algorithms & Control Structures

EE 355 Lab 3 - Algorithms & Control Structures 1 Introduction In this lab you will gain experience writing C/C++ programs that utilize loops and conditional structures. This assignment should be performed INDIVIDUALLY. This is a peer evaluated lab

More information

DDT: A visual, parallel debugger on Ra

DDT: A visual, parallel debugger on Ra DDT: A visual, parallel debugger on Ra David M. Larue dlarue@mines.edu High Performance & Research Computing Campus Computing, Communications, and Information Technologies Colorado School of Mines March,

More information

BASICS OF THE RENESAS SYNERGY PLATFORM

BASICS OF THE RENESAS SYNERGY PLATFORM BASICS OF THE RENESAS SYNERGY PLATFORM TM Richard Oed 2018.11 02 CHAPTER 11 EVENT ANALYSIS WITH TRACEX CONTENTS 11 EVENT ANALYSIS WITH TRACEX 03 11.1 An Introduction to TraceX 03 11.2 Built-in Views and

More information

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS INTRODUCTION A program written in a computer language, such as C/C++, is turned into executable using special translator software.

More information

CodeWarrior Development Studio for etpu v10.x Quick Start SYSTEM REQUIREMENTS

CodeWarrior Development Studio for etpu v10.x Quick Start SYSTEM REQUIREMENTS CodeWarrior Development Studio for etpu v10.x Quick Start SYSTEM REQUIREMENTS Hardware Operating System Software Disk Space Intel Pentium 4 processor, 2 GHz or faster, Intel Xeon, Intel Core, AMD Athlon

More information

CS/COE 0449 term 2174 Lab 5: gdb

CS/COE 0449 term 2174 Lab 5: gdb CS/COE 0449 term 2174 Lab 5: gdb What is a debugger? A debugger is a program that helps you find logical mistakes in your programs by running them in a controlled way. Undoubtedly by this point in your

More information

Implementation of Parallelization

Implementation of Parallelization Implementation of Parallelization OpenMP, PThreads and MPI Jascha Schewtschenko Institute of Cosmology and Gravitation, University of Portsmouth May 9, 2018 JAS (ICG, Portsmouth) Implementation of Parallelization

More information

Porting Applications to Blue Gene/P

Porting Applications to Blue Gene/P Porting Applications to Blue Gene/P Dr. Christoph Pospiech pospiech@de.ibm.com 05/17/2010 Agenda What beast is this? Compile - link go! MPI subtleties Help! It doesn't work (the way I want)! Blue Gene/P

More information

Performance Analysis of MPI Programs with Vampir and Vampirtrace Bernd Mohr

Performance Analysis of MPI Programs with Vampir and Vampirtrace Bernd Mohr Performance Analysis of MPI Programs with Vampir and Vampirtrace Bernd Mohr Research Centre Juelich (FZJ) John von Neumann Institute of Computing (NIC) Central Institute for Applied Mathematics (ZAM) 52425

More information

At the shell prompt, enter idlde

At the shell prompt, enter idlde IDL Workbench Quick Reference The IDL Workbench is IDL s graphical user interface and integrated development environment. The IDL Workbench is based on the Eclipse framework; if you are already familiar

More information

Debugging and Debugger. Terminology. GNU gcc and gdb. Debugging C programs in Unix and Windows Environments - Part One

Debugging and Debugger. Terminology. GNU gcc and gdb. Debugging C programs in Unix and Windows Environments - Part One Debugging C programs in Unix and Windows Environments - Part One ICT106 Fundamentals of Computer Systems Eric Li Debugging and Debugger The process of finding bugs in code called Debugging; A must-have

More information

Software Development With Emacs: The Edit-Compile-Debug Cycle

Software Development With Emacs: The Edit-Compile-Debug Cycle Software Development With Emacs: The Edit-Compile-Debug Cycle Luis Fernandes Department of Electrical and Computer Engineering Ryerson Polytechnic University August 8, 2017 The Emacs editor permits the

More information

CSCI0330 Intro Computer Systems Doeppner. Lab 02 - Tools Lab. Due: Sunday, September 23, 2018 at 6:00 PM. 1 Introduction 0.

CSCI0330 Intro Computer Systems Doeppner. Lab 02 - Tools Lab. Due: Sunday, September 23, 2018 at 6:00 PM. 1 Introduction 0. CSCI0330 Intro Computer Systems Doeppner Lab 02 - Tools Lab Due: Sunday, September 23, 2018 at 6:00 PM 1 Introduction 0 2 Assignment 0 3 gdb 1 3.1 Setting a Breakpoint 2 3.2 Setting a Watchpoint on Local

More information

TotalView Release Notes

TotalView Release Notes Platform Changes The following new platforms are now supported by TotalView: NVIDIA CUDA 5.0 and 5.5 Mac OS X Mavericks (10.9) Ubuntu 12.04, 12.10 and 13.04 Fedora 19 The following platforms are no longer

More information

ECMWF Workshop on High Performance Computing in Meteorology. 3 rd November Dean Stewart

ECMWF Workshop on High Performance Computing in Meteorology. 3 rd November Dean Stewart ECMWF Workshop on High Performance Computing in Meteorology 3 rd November 2010 Dean Stewart Agenda Company Overview Rogue Wave Product Overview IMSL Fortran TotalView Debugger Acumem ThreadSpotter 1 Copyright

More information

Profiling and Debugging Tools. Lars Koesterke University of Porto, Portugal May 28-29, 2009

Profiling and Debugging Tools. Lars Koesterke University of Porto, Portugal May 28-29, 2009 Profiling and Debugging Tools Lars Koesterke University of Porto, Portugal May 28-29, 2009 Outline General (Analysis Tools) Listings & Reports Timers Profilers (gprof, tprof, Tau) Hardware performance

More information

Programming Studio #9 ECE 190

Programming Studio #9 ECE 190 Programming Studio #9 ECE 190 Programming Studio #9 Concepts: Functions review 2D Arrays GDB Announcements EXAM 3 CONFLICT REQUESTS, ON COMPASS, DUE THIS MONDAY 5PM. NO EXTENSIONS, NO EXCEPTIONS. Functions

More information

TotalView Setting Up MPI Programs. version 8.6

TotalView Setting Up MPI Programs. version 8.6 TotalView Setting Up MPI Programs version 8.6 Copyright 2007 2008 by TotalView Technologies. All rights reserved Copyright 1998 2007 by Etnus LLC. All rights reserved. Copyright 1996 1998 by Dolphin Interconnect

More information

Performance Analysis of Parallel Scientific Applications In Eclipse

Performance Analysis of Parallel Scientific Applications In Eclipse Performance Analysis of Parallel Scientific Applications In Eclipse EclipseCon 2015 Wyatt Spear, University of Oregon wspear@cs.uoregon.edu Supercomputing Big systems solving big problems Performance gains

More information

NetBeans Tutorial. For Introduction to Java Programming By Y. Daniel Liang. This tutorial applies to NetBeans 6, 7, or a higher version.

NetBeans Tutorial. For Introduction to Java Programming By Y. Daniel Liang. This tutorial applies to NetBeans 6, 7, or a higher version. NetBeans Tutorial For Introduction to Java Programming By Y. Daniel Liang This tutorial applies to NetBeans 6, 7, or a higher version. This supplement covers the following topics: Getting Started with

More information

Intel Parallel Studio XE 2017 Composer Edition BETA C++ - Debug Solutions Release Notes

Intel Parallel Studio XE 2017 Composer Edition BETA C++ - Debug Solutions Release Notes Developer Zone Intel Parallel Studio XE 2017 Composer Edition BETA C++ - Debug Solutions Release Notes Submitted by Georg Z. (Intel) on August 5, 2016 This page provides the current Release Notes for the

More information