Debugging with TotalView

Size: px
Start display at page:

Download "Debugging with TotalView"

Transcription

1 Debugging with TotalView Dieter an Mey Center for Computing and Communication Aachen University of Technology 1 TotalView, Dieter an Mey, SunHPC 2006

2 Debugging on Sun dbx line mode debugger serial and multi-threaded not covered here Sun Forte IDE debugger based on dbx not covered here TotalView (Etnus) prime serial + parallel debugger (MPI + multi-threaded) on many platforms new memory debugging features (not covered here) DDT (Allinea) serial and MPI a newcomer, available on Linux and Solaris not covered here 2 TotalView, Dieter an Mey, SunHPC 2006

3 Help TotalView is a commercial debugger of Etnus Inc.: TotalView Users Guide TotalView Online Help Appendix in RWTH Primer Online Tutorial LLNL TotalView, Dieter an Mey, SunHPC 2006

4 Start of TotalView on the Sun Fire Current Version is 8.0 Sun Compilers are supported from Studio 7 on Compile with-g and without optimization Sun HPC ClusterTools V5/V6 (MPI) are supported Start executable with totalview a.out totalview a.out a args totalview mprun -a -np 8... a.out # MPI totalview mprun -a -np 8... a.out args # MPI totalview a.out core # investigate a core file totalview # and attach a running program 4 TotalView, Dieter an Mey, SunHPC 2006

5 TotalView Windows - Overview Root Window Variable Window Stack Trace Stack Frame Process Window Expression List Terminal Session 5 TotalView, Dieter an Mey, SunHPC 2006 Action Points

6 Root Window 6 TotalView, Dieter an Mey, SunHPC 2006

7 Status + ID Process Window Stack Trace Stack + Register Threads Action Points 7 TotalView, Dieter an Mey, SunHPC 2006

8 Variable Window (1) RMB: Dive in New Window Type casting 8 TotalView, Dieter an Mey, SunHPC 2006

9 Variable Window (2) Slicing Filtering 9 TotalView, Dieter an Mey, SunHPC 2006

10 Surface View Window Tools - Visualize 10 TotalView, Dieter an Mey, SunHPC 2006

11 Surface View Window 11 TotalView, Dieter an Mey, SunHPC 2006

12 Watchpoint if ( k%50==0 ) { $visualize (u); $stop; } 12 TotalView, Dieter an Mey, SunHPC 2006

13 OpenMP - Debugging 13 TotalView, Dieter an Mey, SunHPC 2006

14 Debugging OpenMP Programs? If you want to debug your OpenMP code try to avoid using TotalView Well try to avoid to use any debugger with OpenMP Debug your serial program first. And then look out for data races which may not show up during the debugging process If you still want to debug your OpenMP code you may want to use TotalView 14 TotalView, Dieter an Mey, SunHPC 2006

15 OpenMP Debugging Recepy 1 of 2 Prepare the serial code Carefully select a reasonable test case! Is the serial program delivering the right results? ( with optimization turned on? ) How about compiler warnings? Fortran: Put all local variables on the stack first. Now try the OpenMP version Need to encrease the stacksize limits? export STACKSIZE=... # not yet standardized; ulimit s... Respect compiler messages (your compiler may have switches to turn on excessive checking) Fortran: USE omp_lib Try the OpenMP dummy library, which your compiler may provide. (Sun Studio: link with lompstubs ) 15 TotalView, Dieter an Mey, SunHPC 2006

16 OpenMP Debugging Recepy 2 of 2 Is the OpenMP program running well with a single thread? Is the OpenMP program running correctly sometimes with more than one thread? Race Conditions? Thread Safety? Use of static or global variables within a parallel region? (f90: SAVE, DATA, initializations,..., C: static, extern ) Use a data race detection tool (Intel Thread Checker, Sun Studio 12) Turn on and off single parallel regions! serialise parts of long parallel regions (single directive) introduce additional barriers for testing Different rounding errors matter? Turn off certain compiler optimizations Don t parallelize reductions 16 TotalView, Dieter an Mey, SunHPC 2006

17 Data Races The typical OpenMP programming errors: Data Races One thread modifies a memory location, which another thread reads or writes in the same region (between 2 synchronisation points). Take care: The sequence of the execution of parallel loop iterations is non deterministic and may change from run to run. Necessary condition for parallelizing a loop: The serial code should give the same answers, when running the loop backwards. Data race detection tools trace memory references and detect possible data races which may never occur while you step through your code with a debugger In many cases private clauses, barriers, or critical regions are missing. 17 TotalView, Dieter an Mey, SunHPC 2006

18 Using TotalView with OpenMP See TotalView User s Guide: Each parallel region is outlined into a separate routine Each parallel loop is outlined into a separate routine The names of these outlined routines base on the original name of the calling routine and the line number of the parallel directive Shared variables are declared in the calling routine and passed to the outlined routine. Private variables are declared in the outlined routine. The slave threads are generated on entry of the parallel region You must not step into a parallel region, but run into a previously defined breakpoint. 18 TotalView, Dieter an Mey, SunHPC 2006

19 Example OpenMP-Program x = 43.0 h = 1.0d0 / n sum = 0.0d0!$omp parallel do private(i,x) reduction(+:sum) shared(n,h) do i = 1,n x = h * ( i ) sum = sum + 4.0d0 / ( 1.0d0 + x * x ) end do!$omp end parallel do pi = h * sum x =? In a parallel region (loop...), when watching a shared variable, look at the variable in the original routine. when watching a private variable, look at that variable in the outlined routine. In OpenMP V2.5 the private version of the master thread may share the memory location of the original variable. In OpenMP V3.0 this may no longer be allowed. 19 TotalView, Dieter an Mey, SunHPC 2006

20 MPI - Debugging 20 TotalView, Dieter an Mey, SunHPC 2006

21 Start Process Window Root Window 21 TotalView, Dieter an Mey, SunHPC 2006

22 Start Process Window Root Window 22 TotalView, Dieter an Mey, SunHPC 2006

23 Start Process Window Root Window 23 TotalView, Dieter an Mey, SunHPC 2006

24 Root Window Open another process window by right clicking and selecting Dive in New Window Process ID State: B Breakpoint (stopped) E Error (stopped) H Hold I Idle K in Kernel M Mixed Name R Running S Sleeping T Stopped W Watchpoint (stopped) Z Zombie 24 TotalView, Dieter an Mey, SunHPC 2006

25 Process Window Switch between processes by clicking on P- or P+ Switch between threads by clicking on T- or T+ 25 TotalView, Dieter an Mey, SunHPC 2006

26 Process Window Evaluation Point Breakpoint Barrier Conditional Watchpoint Unconditional Watchpoint 26 TotalView, Dieter an Mey, SunHPC 2006

27 Laminate Variables Variable my_rank Contains the id of each process 27 TotalView, Dieter an Mey, SunHPC 2006

28 Laminate Variables 28 TotalView, Dieter an Mey, SunHPC 2006

29 Laminate Variables 29 TotalView, Dieter an Mey, SunHPC 2006

30 Summary Debugging of Parallel codes: Parallelize carefully! Parallelization adds one dimension to the error space Let the compiler statically analyse your code + watch the messag Check the interfaces In the case of MPI export MPI_SHOW_ERRORS=1; export MPI_CHECK_ARGS=1 There are deadlock detection tools out there In the case of OpenMP: Most likely, using a debugger on OpenMP codes is not necessary. If it is, TotalView might help you. Never put an OpenMP Code into production without checking for data races beforehand! 30 TotalView, Dieter an Mey, SunHPC 2006

31 MPO Demo on Opteron-based Systems $ cd /home/hpc/kurse/sunhpc2007/mpo/f (or../c) $ gmake n build $ gmake build $ gmake n go $ gmake go export OMP_NUM_THREADS=4; export SUNW_MP_PROCBIND=" "; # Running Jacobi without memory placement optimizations (MPO) echo '2000,2000\n0.8\n1.0\n1e-12\n100\nF\nF\n' jacobi2.x # Running Jacobi with memory placement optimizations by initializing data in parallel (first touch) echo '2000,2000\n0.8\n1.0\n1e-12\n100\nT\nF\n' jacobi2.x ) # Running Jacobi with memory placement optimizations by using the madvise API call (next touch) echo '2000,2000\n0.8\n1.0\n1e-12\n100\nF\nT\n' jacobi2.x ) # Running Jacobi with MPO by using the madv.so library to distribute data export LD_PRELOAD=madv.so.1; export MADV=access_many echo '2000,2000\n0.8\n1.0\n1e-12\n100\nF\nF\n' jacobi2.x ) Fortran / C Performance 1190 / 1290 Mflop/s 2960 / 3240 Mflop/s 2810 / 3060 Mflop/s 2130 / 2160 Mflop/s 31 TotalView, Dieter an Mey, SunHPC 2006

Debugging OpenMP Programs

Debugging OpenMP Programs Debugging OpenMP Programs Dieter an Mey Center for Computing and Communication Aachen University anmey@rz.rwth-aachen.de aachen.de 1 Debugging OpenMP Programs General Hints dbx Sun IDE Debugger TotalView

More information

Tools for OpenMP Programming

Tools for OpenMP Programming Tools for OpenMP Programming Dieter an Mey Center for Computing and Communication Aachen University anmey@rz rz.rwth-aachen.de 1 Tools for OpenMP Programming Debugging of OpenMP Codes KAP/Pro Toolset from

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

!OMP #pragma opm _OPENMP

!OMP #pragma opm _OPENMP Advanced OpenMP Lecture 12: Tips, tricks and gotchas Directives Mistyping the sentinel (e.g.!omp or #pragma opm ) typically raises no error message. Be careful! The macro _OPENMP is defined if code is

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

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

OPENMP TIPS, TRICKS AND GOTCHAS

OPENMP TIPS, TRICKS AND GOTCHAS OPENMP TIPS, TRICKS AND GOTCHAS OpenMPCon 2015 2 Directives Mistyping the sentinel (e.g.!omp or #pragma opm ) typically raises no error message. Be careful! Extra nasty if it is e.g. #pragma opm atomic

More information

OPENMP TIPS, TRICKS AND GOTCHAS

OPENMP TIPS, TRICKS AND GOTCHAS OPENMP TIPS, TRICKS AND GOTCHAS Mark Bull EPCC, University of Edinburgh (and OpenMP ARB) markb@epcc.ed.ac.uk OpenMPCon 2015 OpenMPCon 2015 2 A bit of background I ve been teaching OpenMP for over 15 years

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

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

Hands-on Workshop on How To Debug Codes at the Institute Hands-on Workshop on How To Debug Codes at the Institute H. Birali Runesha, Shuxia Zhang and Ben Lynch (612) 626 0802 (help) help@msi.umn.edu October 13, 2005 Outline Debuggers at the Institute Totalview

More information

Automatic Scoping of Variables in Parallel Regions of an OpenMP Program

Automatic Scoping of Variables in Parallel Regions of an OpenMP Program Automatic Scoping of Variables in Parallel Regions of an OpenMP Program Yuan Lin 1 Christian Terboven 2 Dieter an Mey 2 Nawal Copty 1 1 Sun Microsystems, USA 2 RWTH Aachen University, Germany The Problem

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

<Insert Picture Here> OpenMP on Solaris

<Insert Picture Here> OpenMP on Solaris 1 OpenMP on Solaris Wenlong Zhang Senior Sales Consultant Agenda What s OpenMP Why OpenMP OpenMP on Solaris 3 What s OpenMP Why OpenMP OpenMP on Solaris

More information

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

High Performance Computing on Windows. Debugging with VS2005 Debugging parallel programs. Christian Terboven 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

More information

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

Introduction to OpenMP. OpenMP basics OpenMP directives, clauses, and library routines Introduction to OpenMP Introduction OpenMP basics OpenMP directives, clauses, and library routines What is OpenMP? What does OpenMP stands for? What does OpenMP stands for? Open specifications for Multi

More information

Performance Tools for Technical Computing

Performance Tools for Technical Computing Christian Terboven terboven@rz.rwth-aachen.de Center for Computing and Communication RWTH Aachen University Intel Software Conference 2010 April 13th, Barcelona, Spain Agenda o Motivation and Methodology

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

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

OpenMP programming Part II. Shaohao Chen High performance Louisiana State University

OpenMP programming Part II. Shaohao Chen High performance Louisiana State University OpenMP programming Part II Shaohao Chen High performance computing @ Louisiana State University Part II Optimization for performance Trouble shooting and debug Common Misunderstandings and Frequent Errors

More information

First Experiences with Intel Cluster OpenMP

First Experiences with Intel Cluster OpenMP First Experiences with Intel Christian Terboven, Dieter an Mey, Dirk Schmidl, Marcus Wagner surname@rz.rwth aachen.de Center for Computing and Communication RWTH Aachen University, Germany IWOMP 2008 May

More information

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

C C V OpenMP V3.0. Dieter an Mey Center for Computing and Communication, RWTH Aachen University, Germany V 3.0 1 OpenMP V3.0 Dieter an Mey enter for omputing and ommunication, RWTH Aachen University, Germany anmey@rz.rwth-aachen.de enter for omputing and ommunication Setting the Scene The Time Scale Is OpenMP

More information

Parallel Programming: OpenMP

Parallel Programming: OpenMP Parallel Programming: OpenMP Xianyi Zeng xzeng@utep.edu Department of Mathematical Sciences The University of Texas at El Paso. November 10, 2016. An Overview of OpenMP OpenMP: Open Multi-Processing An

More information

Introduction to OpenMP

Introduction to OpenMP Introduction to OpenMP Christian Terboven 10.04.2013 / Darmstadt, Germany Stand: 06.03.2013 Version 2.3 Rechen- und Kommunikationszentrum (RZ) History De-facto standard for

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

Introduction to OpenMP

Introduction to OpenMP 1 / 7 Introduction to OpenMP: Exercises and Handout Introduction to OpenMP Christian Terboven Center for Computing and Communication, RWTH Aachen University Seffenter Weg 23, 52074 Aachen, Germany Abstract

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

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

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

OpenMP Tutorial. Dirk Schmidl. IT Center, RWTH Aachen University. Member of the HPC Group Christian Terboven OpenMP Tutorial Dirk Schmidl IT Center, RWTH Aachen University Member of the HPC Group schmidl@itc.rwth-aachen.de IT Center, RWTH Aachen University Head of the HPC Group terboven@itc.rwth-aachen.de 1 IWOMP

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 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

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

OpenMP at Sun. EWOMP 2000, Edinburgh September 14-15, 2000 Larry Meadows Sun Microsystems

OpenMP at Sun. EWOMP 2000, Edinburgh September 14-15, 2000 Larry Meadows Sun Microsystems OpenMP at Sun EWOMP 2000, Edinburgh September 14-15, 2000 Larry Meadows Sun Microsystems Outline Sun and Parallelism Implementation Compiler Runtime Performance Analyzer Collection of data Data analysis

More information

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

HPC Tools on Windows. Christian Terboven Center for Computing and Communication RWTH Aachen University. - Excerpt - Christian Terboven terboven@rz.rwth-aachen.de Center for Computing and Communication RWTH Aachen University PPCES March 25th, RWTH Aachen University Agenda o Intel Trace Analyzer and Collector

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

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

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

SHARCNET Workshop on Parallel Computing. Hugh Merz Laurentian University May 2008 SHARCNET Workshop on Parallel Computing Hugh Merz Laurentian University May 2008 What is Parallel Computing? A computational method that utilizes multiple processing elements to solve a problem in tandem

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

OpenMP on Ranger and Stampede (with Labs)

OpenMP on Ranger and Stampede (with Labs) OpenMP on Ranger and Stampede (with Labs) Steve Lantz Senior Research Associate Cornell CAC Parallel Computing at TACC: Ranger to Stampede Transition November 6, 2012 Based on materials developed by Kent

More information

Compiling and running OpenMP programs. C/C++: cc fopenmp o prog prog.c -lomp CC fopenmp o prog prog.c -lomp. Programming with OpenMP*

Compiling and running OpenMP programs. C/C++: cc fopenmp o prog prog.c -lomp CC fopenmp o prog prog.c -lomp. Programming with OpenMP* Advanced OpenMP Compiling and running OpenMP programs C/C++: cc fopenmp o prog prog.c -lomp CC fopenmp o prog prog.c -lomp 2 1 Running Standard environment variable determines the number of threads: tcsh

More information

Binding Nested OpenMP Programs on Hierarchical Memory Architectures

Binding Nested OpenMP Programs on Hierarchical Memory Architectures Binding Nested OpenMP Programs on Hierarchical Memory Architectures Dirk Schmidl, Christian Terboven, Dieter an Mey, and Martin Bücker {schmidl, terboven, anmey}@rz.rwth-aachen.de buecker@sc.rwth-aachen.de

More information

Two OpenMP Programming Patterns

Two OpenMP Programming Patterns Two OpenMP Programming Patterns Dieter an Mey Center for Computing and Communication, Aachen University anmey@rz.rwth-aachen.de 1 Introduction A collection of frequently occurring OpenMP programming patterns

More information

Debugging Serial and Parallel Programs with Visual Studio

Debugging Serial and Parallel Programs with Visual Studio and Parallel Programs with Visual Studio Christian Terboven terboven@rz.rwth aachen.de Center for Computing and Communication RWTH Aachen University Windows HPC 2008 (II) September 17, RWTH Aachen Agenda

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

Amdahl s Law. AMath 483/583 Lecture 13 April 25, Amdahl s Law. Amdahl s Law. Today: Amdahl s law Speed up, strong and weak scaling OpenMP

Amdahl s Law. AMath 483/583 Lecture 13 April 25, Amdahl s Law. Amdahl s Law. Today: Amdahl s law Speed up, strong and weak scaling OpenMP AMath 483/583 Lecture 13 April 25, 2011 Amdahl s Law Today: Amdahl s law Speed up, strong and weak scaling OpenMP Typically only part of a computation can be parallelized. Suppose 50% of the computation

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

Parallel Programming

Parallel Programming Parallel Programming OpenMP Dr. Hyrum D. Carroll November 22, 2016 Parallel Programming in a Nutshell Load balancing vs Communication This is the eternal problem in parallel computing. The basic approaches

More information

OpenMP Case Studies. Dieter an Mey. Center for Computing and Communication Aachen University

OpenMP Case Studies. Dieter an Mey. Center for Computing and Communication Aachen University OpenMP Case Studies Dieter an Mey Center for Computing and Communication Aachen University anmey@rz rz.rwth-aachen.de 1 OpenMP Case Studies, Dieter an Mey, SunHPC 2004 OpenMP Case Studies Parallelization

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

Lab: Scientific Computing Tsunami-Simulation

Lab: Scientific Computing Tsunami-Simulation Lab: Scientific Computing Tsunami-Simulation Session 4: Optimization and OMP Sebastian Rettenberger, Michael Bader 23.11.15 Session 4: Optimization and OMP, 23.11.15 1 Department of Informatics V Linux-Cluster

More information

A common scenario... Most of us have probably been here. Where did my performance go? It disappeared into overheads...

A common scenario... Most of us have probably been here. Where did my performance go? It disappeared into overheads... OPENMP PERFORMANCE 2 A common scenario... So I wrote my OpenMP program, and I checked it gave the right answers, so I ran some timing tests, and the speedup was, well, a bit disappointing really. Now what?.

More information

CMSC 714 Lecture 4 OpenMP and UPC. Chau-Wen Tseng (from A. Sussman)

CMSC 714 Lecture 4 OpenMP and UPC. Chau-Wen Tseng (from A. Sussman) CMSC 714 Lecture 4 OpenMP and UPC Chau-Wen Tseng (from A. Sussman) Programming Model Overview Message passing (MPI, PVM) Separate address spaces Explicit messages to access shared data Send / receive (MPI

More information

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

OpenMP 4.0/4.5: New Features and Protocols. Jemmy Hu OpenMP 4.0/4.5: New Features and Protocols Jemmy Hu SHARCNET HPC Consultant University of Waterloo May 10, 2017 General Interest Seminar Outline OpenMP overview Task constructs in OpenMP SIMP constructs

More information

A common scenario... Most of us have probably been here. Where did my performance go? It disappeared into overheads...

A common scenario... Most of us have probably been here. Where did my performance go? It disappeared into overheads... OPENMP PERFORMANCE 2 A common scenario... So I wrote my OpenMP program, and I checked it gave the right answers, so I ran some timing tests, and the speedup was, well, a bit disappointing really. Now what?.

More information

OpenMP Shared Memory Programming

OpenMP Shared Memory Programming OpenMP Shared Memory Programming John Burkardt, Information Technology Department, Virginia Tech.... Mathematics Department, Ajou University, Suwon, Korea, 13 May 2009.... http://people.sc.fsu.edu/ jburkardt/presentations/

More information

HPC on Windows. Visual Studio 2010 and ISV Software

HPC on Windows. Visual Studio 2010 and ISV Software HPC on Windows Visual Studio 2010 and ISV Software Christian Terboven 19.03.2012 / Aachen, Germany Stand: 16.03.2012 Version 2.3 Rechen- und Kommunikationszentrum (RZ) Agenda

More information

A Tutorial for ECE 175

A Tutorial for ECE 175 Debugging in Microsoft Visual Studio 2010 A Tutorial for ECE 175 1. Introduction Debugging refers to the process of discovering defects (bugs) in software and correcting them. This process is invoked when

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

Department of Informatics V. HPC-Lab. Session 2: OpenMP M. Bader, A. Breuer. Alex Breuer

Department of Informatics V. HPC-Lab. Session 2: OpenMP M. Bader, A. Breuer. Alex Breuer HPC-Lab Session 2: OpenMP M. Bader, A. Breuer Meetings Date Schedule 10/13/14 Kickoff 10/20/14 Q&A 10/27/14 Presentation 1 11/03/14 H. Bast, Intel 11/10/14 Presentation 2 12/01/14 Presentation 3 12/08/14

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

OpenACC Course. Office Hour #2 Q&A

OpenACC Course. Office Hour #2 Q&A OpenACC Course Office Hour #2 Q&A Q1: How many threads does each GPU core have? A: GPU cores execute arithmetic instructions. Each core can execute one single precision floating point instruction per cycle

More information

OpenMP: Open Multiprocessing

OpenMP: Open Multiprocessing OpenMP: Open Multiprocessing Erik Schnetter June 7, 2012, IHPC 2012, Iowa City Outline 1. Basic concepts, hardware architectures 2. OpenMP Programming 3. How to parallelise an existing code 4. Advanced

More information

Debugging, benchmarking, tuning i.e. software development tools. Martin Čuma Center for High Performance Computing University of Utah

Debugging, benchmarking, tuning i.e. software development tools. Martin Čuma Center for High Performance Computing University of Utah Debugging, benchmarking, tuning i.e. software development tools Martin Čuma Center for High Performance Computing University of Utah m.cuma@utah.edu SW development tools Development environments Compilers

More information

DDT Debugging Techniques

DDT Debugging Techniques DDT Debugging Techniques Carlos Rosales carlos@tacc.utexas.edu Scaling to Petascale 2010 July 7, 2010 Debugging Parallel Programs Usual problems Memory access issues Special cases not accounted for in

More information

Debugging CUDA Applications with Allinea DDT. Ian Lumb Sr. Systems Engineer, Allinea Software Inc.

Debugging CUDA Applications with Allinea DDT. Ian Lumb Sr. Systems Engineer, Allinea Software Inc. Debugging CUDA Applications with Allinea DDT Ian Lumb Sr. Systems Engineer, Allinea Software Inc. ilumb@allinea.com GTC 2013, San Jose, March 20, 2013 Embracing GPUs GPUs a rival to traditional processors

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

Introduction to OpenMP

Introduction to OpenMP Introduction to OpenMP p. 1/?? Introduction to OpenMP Synchronisation Nick Maclaren Computing Service nmm1@cam.ac.uk, ext. 34761 June 2011 Introduction to OpenMP p. 2/?? Summary Facilities here are relevant

More information

Allinea Unified Environment

Allinea Unified Environment Allinea Unified Environment Allinea s unified tools for debugging and profiling HPC Codes Beau Paisley Allinea Software bpaisley@allinea.com 720.583.0380 Today s Challenge Q: What is the impact of current

More information

CS691/SC791: Parallel & Distributed Computing

CS691/SC791: Parallel & Distributed Computing CS691/SC791: Parallel & Distributed Computing Introduction to OpenMP 1 Contents Introduction OpenMP Programming Model and Examples OpenMP programming examples Task parallelism. Explicit thread synchronization.

More information

GPU Debugging Made Easy. David Lecomber CTO, Allinea Software

GPU Debugging Made Easy. David Lecomber CTO, Allinea Software GPU Debugging Made Easy David Lecomber CTO, Allinea Software david@allinea.com Allinea Software HPC development tools company Leading in HPC software tools market Wide customer base Blue-chip engineering,

More information

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

OpenMP Introduction. CS 590: High Performance Computing. OpenMP. A standard for shared-memory parallel programming. MP = multiprocessing CS 590: High Performance Computing OpenMP Introduction Fengguang Song Department of Computer Science IUPUI OpenMP A standard for shared-memory parallel programming. MP = multiprocessing Designed for systems

More information

MPI and OpenMP (Lecture 25, cs262a) Ion Stoica, UC Berkeley November 19, 2016

MPI and OpenMP (Lecture 25, cs262a) Ion Stoica, UC Berkeley November 19, 2016 MPI and OpenMP (Lecture 25, cs262a) Ion Stoica, UC Berkeley November 19, 2016 Message passing vs. Shared memory Client Client Client Client send(msg) recv(msg) send(msg) recv(msg) MSG MSG MSG IPC Shared

More information

Debugging Programs Accelerated with Intel Xeon Phi Coprocessors

Debugging Programs Accelerated with Intel Xeon Phi Coprocessors Debugging Programs Accelerated with Intel Xeon Phi Coprocessors A White Paper by Rogue Wave Software. Rogue Wave Software 5500 Flatiron Parkway, Suite 200 Boulder, CO 80301, USA www.roguewave.com Debugging

More information

Introduction to OpenMP.

Introduction to OpenMP. Introduction to OpenMP www.openmp.org Motivation Parallelize the following code using threads: for (i=0; i

More information

Oracle Developer Studio 12.6

Oracle Developer Studio 12.6 Oracle Developer Studio 12.6 Oracle Developer Studio is the #1 development environment for building C, C++, Fortran and Java applications for Oracle Solaris and Linux operating systems running on premises

More information

Shared Memory Programming With OpenMP Exercise Instructions

Shared Memory Programming With OpenMP Exercise Instructions Shared Memory Programming With OpenMP Exercise Instructions John Burkardt Interdisciplinary Center for Applied Mathematics & Information Technology Department Virginia Tech... Advanced Computational Science

More information

Shared memory programming model OpenMP TMA4280 Introduction to Supercomputing

Shared memory programming model OpenMP TMA4280 Introduction to Supercomputing Shared memory programming model OpenMP TMA4280 Introduction to Supercomputing NTNU, IMF February 16. 2018 1 Recap: Distributed memory programming model Parallelism with MPI. An MPI execution is started

More information

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

OpenMP - II. Diego Fabregat-Traver and Prof. Paolo Bientinesi WS15/16. HPAC, RWTH Aachen OpenMP - II Diego Fabregat-Traver and Prof. Paolo Bientinesi HPAC, RWTH Aachen fabregat@aices.rwth-aachen.de WS15/16 OpenMP References Using OpenMP: Portable Shared Memory Parallel Programming. The MIT

More information

Shared memory programming

Shared memory programming CME342- Parallel Methods in Numerical Analysis Shared memory programming May 14, 2014 Lectures 13-14 Motivation Popularity of shared memory systems is increasing: Early on, DSM computers (SGI Origin 3000

More information

OpenMP programming. Thomas Hauser Director Research Computing Research CU-Boulder

OpenMP programming. Thomas Hauser Director Research Computing Research CU-Boulder OpenMP programming Thomas Hauser Director Research Computing thomas.hauser@colorado.edu CU meetup 1 Outline OpenMP Shared-memory model Parallel for loops Declaring private variables Critical sections Reductions

More information

Allinea DDT Debugger. Dan Mazur, McGill HPC March 5,

Allinea DDT Debugger. Dan Mazur, McGill HPC  March 5, Allinea DDT Debugger Dan Mazur, McGill HPC daniel.mazur@mcgill.ca guillimin@calculquebec.ca March 5, 2015 1 Outline Introduction and motivation Guillimin login and DDT configuration Compiling for a debugger

More information

C++ and OpenMP. 1 ParCo 07 Terboven C++ and OpenMP. Christian Terboven. Center for Computing and Communication RWTH Aachen University, Germany

C++ and OpenMP. 1 ParCo 07 Terboven C++ and OpenMP. Christian Terboven. Center for Computing and Communication RWTH Aachen University, Germany C++ and OpenMP Christian Terboven terboven@rz.rwth-aachen.de Center for Computing and Communication RWTH Aachen University, Germany 1 ParCo 07 Terboven C++ and OpenMP Agenda OpenMP and objects OpenMP and

More information

A Short Introduction to OpenMP. Mark Bull, EPCC, University of Edinburgh

A Short Introduction to OpenMP. Mark Bull, EPCC, University of Edinburgh A Short Introduction to OpenMP Mark Bull, EPCC, University of Edinburgh Overview Shared memory systems Basic Concepts in Threaded Programming Basics of OpenMP Parallel regions Parallel loops 2 Shared memory

More information

Shared Memory Programming with OpenMP

Shared Memory Programming with OpenMP Shared Memory Programming with OpenMP (An UHeM Training) Süha Tuna Informatics Institute, Istanbul Technical University February 12th, 2016 2 Outline - I Shared Memory Systems Threaded Programming Model

More information

Data Environment: Default storage attributes

Data Environment: Default storage attributes COSC 6374 Parallel Computation Introduction to OpenMP(II) Some slides based on material by Barbara Chapman (UH) and Tim Mattson (Intel) Edgar Gabriel Fall 2014 Data Environment: Default storage attributes

More information

IBM PSSC Montpellier Customer Center. Content

IBM PSSC Montpellier Customer Center. Content Content IBM PSSC Montpellier Customer Center Standard Tools Compiler Options GDB IBM System Blue Gene/P Specifics Core Files + addr2line Coreprocessor Supported Commercial Software TotalView Debugger Allinea

More information

OpenMP. Dr. William McDoniel and Prof. Paolo Bientinesi WS17/18. HPAC, RWTH Aachen

OpenMP. Dr. William McDoniel and Prof. Paolo Bientinesi WS17/18. HPAC, RWTH Aachen OpenMP Dr. William McDoniel and Prof. Paolo Bientinesi HPAC, RWTH Aachen mcdoniel@aices.rwth-aachen.de WS17/18 Loop construct - Clauses #pragma omp for [clause [, clause]...] The following clauses apply:

More information

Shared Memory programming paradigm: openmp

Shared Memory programming paradigm: openmp IPM School of Physics Workshop on High Performance Computing - HPC08 Shared Memory programming paradigm: openmp Luca Heltai Stefano Cozzini SISSA - Democritos/INFM

More information

Introduction to OpenMP

Introduction to OpenMP Christian Terboven, Dirk Schmidl IT Center, RWTH Aachen University Member of the HPC Group terboven,schmidl@itc.rwth-aachen.de IT Center der RWTH Aachen University History De-facto standard for Shared-Memory

More information

Introduction to OpenMP

Introduction to OpenMP Introduction to OpenMP Le Yan Scientific computing consultant User services group High Performance Computing @ LSU Goals Acquaint users with the concept of shared memory parallelism Acquaint users with

More information

OpenMP: Open Multiprocessing

OpenMP: Open Multiprocessing OpenMP: Open Multiprocessing Erik Schnetter May 20-22, 2013, IHPC 2013, Iowa City 2,500 BC: Military Invents Parallelism Outline 1. Basic concepts, hardware architectures 2. OpenMP Programming 3. How to

More information

Shared Memory Programming With OpenMP Computer Lab Exercises

Shared Memory Programming With OpenMP Computer Lab Exercises Shared Memory Programming With OpenMP Computer Lab Exercises Advanced Computational Science II John Burkardt Department of Scientific Computing Florida State University http://people.sc.fsu.edu/ jburkardt/presentations/fsu

More information

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

OpenMP Overview. in 30 Minutes. Christian Terboven / Aachen, Germany Stand: Version 2. OpenMP Overview in 30 Minutes Christian Terboven 06.12.2010 / Aachen, Germany Stand: 03.12.2010 Version 2.3 Rechen- und Kommunikationszentrum (RZ) Agenda OpenMP: Parallel Regions,

More information

Introduction to OpenMP. Lecture 2: OpenMP fundamentals

Introduction to OpenMP. Lecture 2: OpenMP fundamentals Introduction to OpenMP Lecture 2: OpenMP fundamentals Overview 2 Basic Concepts in OpenMP History of OpenMP Compiling and running OpenMP programs What is OpenMP? 3 OpenMP is an API designed for programming

More information

Short Introduction to Debugging Tools on the Cray XC40

Short Introduction to Debugging Tools on the Cray XC40 Short Introduction to Debugging Tools on the Cray XC40 Overview Debugging Get your code up and running correctly. Profiling Locate performance bottlenecks. Light weight At most relinking. Get a first picture

More information

Introduction to OpenMP

Introduction to OpenMP Introduction to OpenMP Lecture 2: OpenMP fundamentals Overview Basic Concepts in OpenMP History of OpenMP Compiling and running OpenMP programs 2 1 What is OpenMP? OpenMP is an API designed for programming

More information

Understanding Dynamic Parallelism

Understanding Dynamic Parallelism Understanding Dynamic Parallelism Know your code and know yourself Presenter: Mark O Connor, VP Product Management Agenda Introduction and Background Fixing a Dynamic Parallelism Bug Understanding Dynamic

More information

Debugging HPC Applications. David Lecomber CTO, Allinea Software

Debugging HPC Applications. David Lecomber CTO, Allinea Software Debugging HPC Applications David Lecomber CTO, Allinea Software david@allinea.com Agenda Bugs and Debugging Debugging parallel applications Debugging OpenACC and other hybrid codes Debugging for Petascale

More information

Using Intel VTune Amplifier XE for High Performance Computing

Using Intel VTune Amplifier XE for High Performance Computing Using Intel VTune Amplifier XE for High Performance Computing Vladimir Tsymbal Performance, Analysis and Threading Lab 1 The Majority of all HPC-Systems are Clusters Interconnect I/O I/O... I/O I/O Message

More information

[Potentially] Your first parallel application

[Potentially] Your first parallel application [Potentially] Your first parallel application Compute the smallest element in an array as fast as possible small = array[0]; for( i = 0; i < N; i++) if( array[i] < small ) ) small = array[i] 64-bit Intel

More information

Lecture 4: OpenMP Open Multi-Processing

Lecture 4: OpenMP Open Multi-Processing CS 4230: Parallel Programming Lecture 4: OpenMP Open Multi-Processing January 23, 2017 01/23/2017 CS4230 1 Outline OpenMP another approach for thread parallel programming Fork-Join execution model OpenMP

More information