High Performance Computing on Windows. Debugging with VS2005 Debugging parallel programs. Christian Terboven

Similar documents
Debugging Serial and Parallel Programs with Visual Studio

HPC on Windows. Visual Studio 2010 and ISV Software

TotalView. Debugging Tool Presentation. Josip Jakić

Introduction to OpenMP. OpenMP basics OpenMP directives, clauses, and library routines

Debugging with TotalView

HPC Tools on Windows. Christian Terboven Center for Computing and Communication RWTH Aachen University.

Introduction to OpenMP

First Experiences with Intel Cluster OpenMP

Shared Memory Parallel Programming. Shared Memory Systems Introduction to OpenMP

Shared Memory programming paradigm: openmp

SHARCNET Workshop on Parallel Computing. Hugh Merz Laurentian University May 2008

OpenMP Algoritmi e Calcolo Parallelo. Daniele Loiacono

C++ and OpenMP Christian Terboven Center for Computing and Communication RWTH Aachen University, Germany

Performance Tools for Technical Computing

Module 4: Working with MPI

Introduction to OpenMP

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

Advanced C Programming Winter Term 2008/09. Guest Lecture by Markus Thiele

Introduction. Key features and lab exercises to familiarize new users to the Visual environment

Laboratory Assignment #4 Debugging in Eclipse CDT 1

<Insert Picture Here> OpenMP on Solaris

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

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

Using Intel VTune Amplifier XE for High Performance Computing

Acknowledgments. Amdahl s Law. Contents. Programming with MPI Parallel programming. 1 speedup = (1 P )+ P N. Type to enter text

Starting Embedded C Programming CM0506 Small Embedded Systems

Shared memory programming model OpenMP TMA4280 Introduction to Supercomputing

Debugging OpenMP Programs

Setting up a Project and Debugging with Visual Studio

Session 4: Parallel Programming with OpenMP

Developing Scientific Applications Using Eclipse and the Parallel Tools Platform

CS691/SC791: Parallel & Distributed Computing

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

Getting Started (1.8.7) 9/2/2009

COMP528: Multi-core and Multi-Processor Computing

C C V OpenMP V3.0. Dieter an Mey Center for Computing and Communication, RWTH Aachen University, Germany

CS 150 Lab 3 Arithmetic and the Debugger. Lab 3.0 We are going to begin using the Visual Studio 2017 debugger to aid with debugging programs.

Martin Kruliš, v

Windows-HPC Environment at RWTH Aachen University

A Tutorial for ECE 175

Jackson Marusarz Software Technical Consulting Engineer

STARTING THE DDT DEBUGGER ON MIO, AUN, & MC2. (Mouse over to the left to see thumbnails of all of the slides)

Introduction to C/C++ Programming

Supplement: Visual C++ Debugging

Introduction to OpenMP

Elementary Parallel Programming with Examples. Reinhold Bader (LRZ) Georg Hager (RRZE)

7 The Integrated Debugger

COSC 6385 Computer Architecture - Thread Level Parallelism (I)

Memory & Thread Debugger

OpenMP Tutorial. Dirk Schmidl. IT Center, RWTH Aachen University. Member of the HPC Group Christian Terboven

Programming Logic - Beginning

Table of Contents. User Manual

Parallel Debugging with TotalView BSC-CNS

Large Scale Debugging

RVDS 3.0 Introductory Tutorial

OpenMP Overview. in 30 Minutes. Christian Terboven / Aachen, Germany Stand: Version 2.

Using Eclipse and the

The Road to CCSv4. Status Update

Computer Science II Lab 3 Testing and Debugging

EW The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually.

NetBeans IDE Field Guide

A Quick Tour GETTING STARTED WHAT S IN THIS CHAPTER?

Implementation of Parallelization

Zend Studio 3.0. Quick Start Guide

Runtime Correctness Checking for Emerging Programming Paradigms

EE/CSCI 451 Introduction to Parallel and Distributed Computation. Discussion #4 2/3/2017 University of Southern California

PTP - PLDT Parallel Language Development Tools Overview, Status & Plans

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

Parallel Programming & Murat Keçeli

GPU Debugging Made Easy. David Lecomber CTO, Allinea Software

3 TUTORIAL. In This Chapter. Figure 1-0. Table 1-0. Listing 1-0.

Alfio Lazzaro: Introduction to OpenMP

EPL372 Lab Exercise 5: Introduction to OpenMP

OpenMP Introduction. CS 590: High Performance Computing. OpenMP. A standard for shared-memory parallel programming. MP = multiprocessing

Cluster Clonetroop: HowTo 2014

ADT: Eclipse development tools for ATL

Lab 8 - Vectors, and Debugging. Directions

OpenMP 4.0/4.5: New Features and Protocols. Jemmy Hu

Using the Xcode Debugger

OpenMP - II. Diego Fabregat-Traver and Prof. Paolo Bientinesi WS15/16. HPAC, RWTH Aachen

Chap. 6 Part 3. CIS*3090 Fall Fall 2016 CIS*3090 Parallel Programming 1

CodeWarrior Development Studio for StarCore DSP SC3900FP Architectures Quick Start for the Windows Edition

OpenMP and MPI. Parallel and Distributed Computing. Department of Computer Science and Engineering (DEI) Instituto Superior Técnico.

Trends and Challenges in Multicore Programming

Bring your application to a new era:

Installation Guide and Release Notes

Debugging and profiling of MPI programs

BASICS OF THE RENESAS SYNERGY TM

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

Binding Nested OpenMP Programs on Hierarchical Memory Architectures

Winshuttle STUDIO 11 TRANSACTION Developer Basic Training. Copyright ADSOTECH Scandinavia Oy

OpenMP and MPI. Parallel and Distributed Computing. Department of Computer Science and Engineering (DEI) Instituto Superior Técnico.

1. Move your mouse to the location you wish text to appear in the document. 2. Click the mouse. The insertion point appears.

ICOM 4015 Advanced Programming Laboratory. Chapter 1 Introduction to Eclipse, Java and JUnit

Notices. DFARS/Restricted Rights Notice. Warranty. Technology Licenses. Document History

PGI Visual Fortran Release Notes. Version The Portland Group

Integration for CodeBlocks

JCreator. Starting JCreator

The NetBeans Debugger: A Brief Tutorial

Introduction to Parallel Performance Engineering

Transcription:

High Permance omputing on Windows Debugging with VS2005 Debugging parallel programs hristian Terboven enter RWTH Aachen University 1 HP on Windows - 2007 enter

Agenda Enabling OpenMP and MPI Debugging serial programs Debugging parallel OpenMP programs Debugging parallel MPI programs Short demo: Jacobi--Hybrid 2 HP on Windows - 2007 enter

Agenda Enabling OpenMP and MPI Debugging serial programs Debugging parallel OpenMP programs Debugging parallel MPI programs Short demo: Jacobi--Hybrid 3 HP on Windows - 2007 enter

100000 10000 1000 100 OpenMP: Motivation How capable is a current computer? A 3 GHz Intel Xeon PU is approximately as fast as all human beings together, if they compute one floating point operation per second. Moore s Law: Number of transistors doubles every 18 months. Wrong interpretation: The permance doubles every 18 months. The n cores of current and future processors have to be exploited by a program. 10 1 0,1 1975 1983 1991 1999 2003 2007 2003 4 HP on Windows - 2007 enter Source: Herb Sutter www.gotw.ca/publications/concurrency-ddj.htm

OpenMP: Overview Master Thread Slave Threads Slave Threads Slave Threads Serial Part Parallel Region An OpenMP program starts just like a serial program with one thread: the so-called Master thread. At a so-called Parallel Region slave threads are spawned, together with the master thread they m a Team. Between parallel regions, in the serial part of a program, the slave threads are put to sleep. oncept: Fork-Join 5 HP on Windows - 2007 enter Allows an incremental parallelization of an existing program!

Enabling OpenMP OpenMP support has to be enabled in a configuration: OpenMP-enabled compilers: VS2005 /++ Intel /++ Intel FORTRAN 6 HP on Windows - 2007 enter

Enabling OpenMP Known problem with Visual Studio 2005 and OpenMP: The message above appears, if an OpenMP program has been compiled with Visual Studio 2005 with OpenMP support enabled, but omp.h had not been included. Solution: include omp.h in at least one file per project. 7 HP on Windows - 2007 enter

Enabling OpenMP Setting the number of threads debugging of OpenMP programs: set environment variable OMP_NUM_THREADS. 8 HP on Windows - 2007 enter

Enabling MPI As MPI is implemented by a library, an application includes a file containing the type and function declarations namedmpi.h and has to be linked with that library. Modify the project properties: Add Include Path: /++ General Additional Include Directories, mpi.h resides in :\Program Files\Microsoft ompute luster Pack\Include Add Library Path: Linker General Additional Library Directories, msmpi.lib resides in :\Program Files\Microsoft ompute luster Pack\Lib\[i386 amd64] 9 HP on Windows - 2007 enter

Agenda Enabling OpenMP and MPI Debugging serial programs Debugging parallel OpenMP programs Debugging parallel MPI programs Short demo: Jacobi--Hybrid 10 HP on Windows - 2007 enter

VS2005: Debugging serial programs Navigating in a /++ project: By choosing a function of the current scope, the cursor jumps to the function definition. You can use the class view to navigate through your code as well. 11 HP on Windows - 2007 enter

VS2005: Debugging serial programs A breakpoint can be set by clicking in the grey area left of the line number. licking again removes the breakpoint. Right-clicking on a breakpint shows the context menu with the following functions Disable a breakpoint (temporary) Set breakpoint trigger conditions Trigger filter selected threads or processes Define actions to be executed when the breakpoint is triggered Just hold the mouse over a variable a short moment to get the actual value displayed (hover). This is also possible marked expression (to some extent). 12 HP on Windows - 2007 enter

VS2005: Debugging serial programs During a debugging session, the actual program location is marked by a yellow arrow. You can drag this arrow up and down. 13 HP on Windows - 2007 enter

Agenda Enabling OpenMP and MPI Debugging serial programs Debugging parallel OpenMP programs Debugging parallel MPI programs Short demo: Jacobi--Hybrid 14 HP on Windows - 2007 enter

VS2005: Debugging OpenMP programs Debugging of OpenMP applications in Visual Studio 2005 works with all compilers: the Microsoft /++ compiler, the Intel /++ compiler and the Fortran compiler. Note: If you use the Intel compiler and let a program run with four threads, you will see five threads (one management thread). We advise you to compile without any optimization debugging, that means use the pre-configure Debug configuration and just enable OpenMP. ontrol debugging: Start / ontinue, Break, Stop, Restart Show next statement, Step Into, Step Over, Step Out 15 HP on Windows - 2007 enter

VS2005: Debugging OpenMP programs All threads stop at a breakpoint the moment one thread reaches it. Using the Threads register, you can select all threads. If you want a thread to stand still while further debugging, you have to freeze it. 16 HP on Windows - 2007 enter

Visual Studio 2005 Debuggen von OpenMP-Anwendungen For all threads, you can view the local and shared variables. The Locals register contains all variables of the current scope. The Autos register contains a set of interesting variables guessed by the compiler remarkably good. Some limitations when using the Intel Fortran compiler: The Autos register is empty, Locals is working fine. One can not (at least sometimes) identify the management thread by the name that is the one you get an error message that no source code is available if you select it ;-) Sometimes expressions have to be updated, because of (possible) compiler optimization. 17 HP on Windows - 2007 enter

Agenda Enabling OpenMP and MPI Debugging serial programs Debugging parallel OpenMP programs Debugging parallel MPI programs Short demo: Jacobi--Hybrid 18 HP on Windows - 2007 enter

VS2005: Debugging MPI programs Typically Microsoft MPI works best, but you should be able to use MPIH2 as well. At leasts the following instructions work both. Visual Studio 2005 supports debugging of MPI programs using the luster Debugger. As far as I know or was able to verify the cluster debugger only works with the Microsoft /++ compiler and not with projects using the Intel /++ compiler or the Intel FORTRAN compiler. In the project properties under Debugging, choose the MPI luster Debugger as Debugger to launch. MPIRun: c:\program files\microsoft compute cluster pack\bin\mpiexec MPIRun Arguments: example n 2 MPIShim Location: It is not possible to specify a path containing empty spaces here, so you have to copy MPIShim from c:\program files[ (x86)]\microsoft visual studio 8 \common7\ide\remotedebugger\x86[or x64]\mpishim to a suitable location. 19 HP on Windows - 2007 enter

VS2005: Debugging MPI programs In order to stop all processes at a breakpoint, please check the following option: In Tools Options Debugging General the checkbox Break all processes when one process breaks has to be activated. Select the current process using the Processes register. Problem: if one process make a step, all other processes make a step as well. Solution 1: Be clever setting breakpoints Solution 2: Detach the second (and third and fourth and ) process from the VS2005 debugger (think at the right-click and context menu), open up another VS2005 instance (maybe more) and attach to the process. Going the second way, VS2005 becomes the most powerful parallel debugger available today (and I tried nearly all debuggers)! 20 HP on Windows - 2007 enter

VS2005: Debugging MPI programs Master Slave 21 HP on Windows - 2007 enter

Agenda Enabling OpenMP and MPI Debugging serial programs Debugging parallel OpenMP programs Debugging parallel MPI programs Short demo: Jacobi--Hybrid 22 HP on Windows - 2007 enter

End of this part Questions? 23 HP on Windows - 2007 enter