AMD gdebugger 6.2 for Linux

Similar documents
AMD CodeXL 1.3 GA Release Notes

image1d_t, image1d_array_t, image2d_array_t Limited support. User cannot view contents of image types while kernel debugging.

CS354 gdb Tutorial Written by Chris Feilbach

Copyright Khronos Group, Page Graphic Remedy. All Rights Reserved

OpenACC Course. Office Hour #2 Q&A

Using a debugger. Segmentation fault? GDB to the rescue!

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

CS 220: Introduction to Parallel Computing. Introduction to CUDA. Lecture 28

Customizing DAZ Studio

ECE/ME/EMA/CS 759 High Performance Computing for Engineering Applications

COSC 2P91. Introduction Part Deux. Week 1b. Brock University. Brock University (Week 1b) Introduction Part Deux 1 / 14

Exercise Session 6 Computer Architecture and Systems Programming

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

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

EE , GPU Programming

Configuring the Android Manifest File

Xcode Tricks. ios App Development Fall 2010 Lecture 13

GPU Computing Master Clss. Development Tools

printf Debugging Examples

CSE 374 Programming Concepts & Tools

Programming Studio #9 ECE 190

Integrated Software Environment. Part 2

OpenCL API. OpenCL Tutorial, PPAM Dominik Behr September 13 th, 2009

Scientific Programming in C IX. Debugging

Jackson Marusarz Software Technical Consulting Engineer

Introduction to GPU hardware and to CUDA

Debugging. ICS312 Machine-Level and Systems Programming. Henri Casanova

Mention driver developers in the room. Because of time this will be fairly high level, feel free to come talk to us afterwards

NVIDIA s Compute Unified Device Architecture (CUDA)

NVIDIA s Compute Unified Device Architecture (CUDA)

The NetBeans IDE is a big file --- a minimum of around 30 MB. After you have downloaded the file, simply execute the file to install the software.

Unit 13. Linux Operating System Debugging Programs

A Tutorial for ECE 175

How Rust views tradeoffs. Steve Klabnik

Reviewing gcc, make, gdb, and Linux Editors 1

Using the KD30 Debugger

Getting Started. 1 by Conner Irwin

Interrupts and System Calls

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

Intel OpenCL SDK. User's Guide. Copyright Intel Corporation. All Rights Reserved. Document Number: US. Revision: 1.

About Parallels Desktop 14 for Mac

CSE 351. GDB Introduction

Android App Development

Programming Logic - Beginning

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

This lecture presents ordered lists. An ordered list is one which is maintained in some predefined order, such as alphabetical or numerical order.

Hands-on CUDA exercises

Chapter 1 Getting Started

Virtualization. ...or how adding another layer of abstraction is changing the world. CIS 399: Unix Skills University of Pennsylvania.

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

COMP390 (Design &) Implementation

week3 Tommy MacWilliam Design GDB week3 Running Time Search Sorting Recursion Practice Problems September 26, 2011

Intro to MS Visual C++ Debugging

Improving Linux development with better tools

Eclipse Environment Setup

GPGPU, 4th Meeting Mordechai Butrashvily, CEO GASS Company for Advanced Supercomputing Solutions

How to build Simbody 2.2 from source on Windows

CLU: Open Source API for OpenCL Prototyping

Visual Studio Device Unsupported Instruction Set

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

Setting up a Project and Debugging with Visual Studio

COMP390 (Design &) Implementation

Martin Dubois, ing. Contents

Computational Graphics: Lecture 15 SpMSpM and SpMV, or, who cares about complexity when we have a thousand processors?

Memory & Thread Debugger

GPU 101. Mike Bailey. Oregon State University. Oregon State University. Computer Graphics gpu101.pptx. mjb April 23, 2017

GPU 101. Mike Bailey. Oregon State University

AMD CodeXL Quick Start Guide

Andy OS User Manual 46

CS 220: Introduction to Parallel Computing. Beginning C. Lecture 2

Assignment 1c: Compiler organization and backend programming

Top 6 Mac user mistakes

Outline. Computer programming. Debugging. What is it. Debugging. Hints. Debugging

Doom 3 Dante. Performance on Mesa (i965) (Not a Demo!) Oliver McFadden 1

Using the Command Line

Unit 10. Linux Operating System

2 Installation Installing SnuCL CPU Installing SnuCL Single Installing SnuCL Cluster... 7

How to Secure SSH with Google Two-Factor Authentication

Rescuing Lost Files from CDs and DVDs

Tesla GPU Computing A Revolution in High Performance Computing

A Tutorial on using Code::Blocks with Catalina 3.0.3

Chapter 1 Introduction

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

NSIGHT ECLIPSE EDITION

More performance options

International Journal of Current Research and Modern Education (IJCRME) ISSN (Online): ( Volume I, Issue II, 2016

Interrupts & System Calls

Lab 8. Follow along with your TA as they demo GDB. Make sure you understand all of the commands, how and when to use them.

Web Host. Choosing a. for Your WordPress Site. What is web hosting, and why do you need it?

LPC17 - Supporting newer toolchains in the kernel. Bernhard Bero Rosenkränzer

Going to cover; - Why we have SPIR-V - Brief history of SPIR-V - Some of the core required features we wanted - How OpenCL will use SPIR-V - How

Intel OpenCL SDK. User's Guide. Copyright 2010 Intel Corporation. All Rights Reserved. Document Number: US

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

Basic functions of a debugger

Lab 4. Out: Friday, February 25th, 2005

CS/COE 0449 term 2174 Lab 5: gdb

Performance Metrics (I)

Unified Memory. Notes on GPU Data Transfers. Andreas Herten, Forschungszentrum Jülich, 24 April Member of the Helmholtz Association

Cache Coherence Tutorial

Could you make the XNA functions yourself?

Transcription:

AMD gdebugger 6.2 for Linux by vincent Saturday, 19 May 2012 http://www.streamcomputing.eu/blog/2012-05-19/amd-gdebugger-6-2-for-linux/ The printf-funtion in kernels isn t the solution to everything, so hence profilers and debuggers specially tailored for GPU-programming. On Windows there is a lot of choice, but mostly only if you have a paid version of Visual Studio. On Linux you have GDB, but that program is not really user-friendly for the GUI-lovers. For AMD there is now gdebugger again available for Linux. Again, as version 5.8 by Gremedy worked with Linux, after AMD bought the company it got Windows-only for version 6. A few weeks ago, 10 months after 6.0, Linux-binaries got back with version 6.2. It supports OpenCL 1.2, OpenGL 3.2 and quite some extensions. As only AMD is supported, later more on debugging OpenCL-applications on NVidia and Intel. Installation is quite straightforward. For creating a menu-item, you ll find an useful image in /opt/gdebugger6.2.xxx/tutorial/images/. Turning on the driver s debug mode You need the latest drivers, or at least the 2.4.1 drivers for full support. And make sure the latest AMD APP, or at least 2.6 is installed and tested (by running make in /opt/amdapp). Recently AMD has renaming a various libraries from ati to amd if you get segmentation faults when using OpenCL, check if there are still ati-libraries loaded (in /etc/ld.so.conf.d for instance) and make sure there were no errors when installing the drivers. The new type xorg.conf is quite empty, as much happens automatically. AMD uses the old xorg.conf for settings, so make sure you have run aticonfig initial aticonfig sb off page 1 / 10

Else you get the following error: To turn on debugging manually, in xorg.conf put the following at the [device]-section: Option BlockSignalsOnLock off Then reboot, and test by starting gdebugger. Your first gdebugged program Note: if you use Chromium/Chrome, the help doesn t work. You must open them in Firefox. The tutorial helps mostly with things like keyboard-shortcuts and introducing the two OpenCL debug-levels: API-level and kernel-level. The webhelp goes into further detail, but you really should have read the tutorial (or this blog-post) first before starting there. Preparing the software Both the software and the kernel(s) need to be compiled in debug-mode. When you use GCC or LLVM-Clang you can use -g as one of the parameters to put the host-code in debug-mode. To get the kernel in debug-mode, you have to search for the build-step clbuildprogram and add the -g build-option: err = clbuildprogram(program, 1, devices, -g, NULL, NULL); This way the kernels will also be put in debug-mode. Best is that you write your host-code such that you can pass paramters to the kernel from the command-line. Don t forget to use make in parallel using parameter -j, i.e.: make -j 8?. I used make dbg=1 -j 12? to build the debug-version of NVidia s SDK. A new project page 2 / 10

Starting a New Project goes via a wizard. Selecting the executable in the first screen is most times enough. We won t focus on OpenGL or Host-debugging, so leave the OpenGL-screens to default. You can always change the debug-settings under men debug. Enabling breakpoints in Kernels The menu breakpoints shows where it can break the process. The breakpoint-options are quite interesting though, as they help you identify problems you really don t want. It does not show a list of kernels unfortunately. The written method is to keep stepping over the API-calls and then step into the kernel (described later). You can also manually add the kernel. To do that, go to the breakpoints view. If it is not visible, check the menu view->views. page 3 / 10

There double click and write the name of the kernel. The type cl kernel will appear. page 4 / 10

Know that stepping into won t work when you have break points of type cl kernel. Play Now hit F5 or the green play-button. Personally I don t really see what the five buttons after the start-debug button do. There are two modes, while in host-code: Go to next frame-terminator call Go to next OpenGL draw-function call (OpenGL) Go to next API function call (being one of OpenCL or OpenGL) Step into (like normal debugging). If the current function enqueues a kernel for execution, then step into the kernel only works when you have no breakpoint on a kernel. Step out (like normal debugging). While in OpenCL kernel code: Undefined Undefined Go to the next line. Step into (like normal debugging). Step out (like normal debugging). It is somewhat confusing, but I ended up clicking the third button the most. page 5 / 10

If all goes well, you end up in the kernel. There you can double click at the left side to get manual break points, step through, etc. While at any break point The below is only visible, when the program runs even the statistics. If any view is not visible, go to the menu view->views and select it. To see the variables per instance, you need to find two views. At the top right you can select the kernel-id. At the bottom-left you ll find the local variables for that instance. page 6 / 10

Another view worth going through are the statistics. page 7 / 10

The above warning is a possible problem, not necessarily true. Happy debugging There are a lot more functions in the program, which help you avoid using printf. Just fiddle around with the provided teapot-example to learn. Also check out these posts page 8 / 10

The entanglement of Bitcoins and compute-capa The OpenCL power: offloading to the CPU (AVX+ AMD positions FirePro S10000 against both TES Intel s answer to AMD and NVIDIA: the XEON Ph page 9 / 10

Powered by TCPDF (www.tcpdf.org) AMD gdebugger 6.2 for Linux - 2012-05-19 Also check out these posts The entanglement of Bitcoins and compute-capa... The OpenCL power: offloading to the CPU (AVX+... AMD positions FirePro S10000 against both TES... Intel's answer to AMD and NVIDIA: the XEON Ph... page 10 / 10