OpenMP 3.0 Feature: Error Detection Capability Kang Su Gatlin Visual C++ Program Manager.

Slides:



Advertisements
Similar presentations
AUTOMATICALLY TUNING PARALLEL AND PARALLELIZED PROGRAMS Chirag Dave and Rudolf Eigenmann Purdue University.
Advertisements

Parallel Processing with OpenMP
May 2, 2015©2006 Craig Zilles1 (Easily) Exposing Thread-level Parallelism  Previously, we introduced Multi-Core Processors —and the (atomic) instructions.
1 Programming Explicit Thread-level Parallelism  As noted previously, the programmer must specify how to parallelize  But, want path of least effort.
Implementing A Simple Storage Case Consider a simple case for distributed storage – I want to back up files from machine A on machine B Avoids many tricky.
Exceptions Any number of exceptional circumstances may arise during program execution that cause trouble import java.io.*; class IOExample { public static.
1 Lecture 11 Interfaces and Exception Handling from Chapters 9 and 10.
Exception Handling. 2 Two types of bugs (errors) Logical error Syntactic error Logical error occur  due to poor understanding of the problem and solution.
Exception Handling.  What are errors?  What does exception handling allow us to do?  Where are exceptions handled?  What does exception handling facilitate?
API Design CPSC 315 – Programming Studio Fall 2008 Follows Kernighan and Pike, The Practice of Programming and Joshua Bloch’s Library-Centric Software.
PARALLEL PROGRAMMING WITH OPENMP Ing. Andrea Marongiu
DISTRIBUTED AND HIGH-PERFORMANCE COMPUTING CHAPTER 7: SHARED MEMORY PARALLEL PROGRAMMING.
OpenMP Andrew Williams References Chandra et al, Parallel Programming in OpenMP, Morgan Kaufmann Publishers 1999 OpenMP home:
© Copyright Eliyahu Brutman Exceptions. © Copyright Eliyahu Brutman Exceptions and Design Patterns - 2 Introduction to Exception Handling Definition:
IS4401 Project Technology Issues. Introduction This seminar covers Databases When to use a Database What Database to use Development Tools Visual Studio.
INTEL CONFIDENTIAL Confronting Race Conditions Introduction to Parallel Programming – Part 6.
CS 206 Introduction to Computer Science II 01 / 23 / 2009 Instructor: Michael Eckmann.
1 Lab Session-3 CSIT221 Fall 2002 b Exception Handling b Lab Exercise (Demo Required)
CSCI-383 Object-Oriented Programming & Design Lecture 15.
© 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 1 Concurrency in Programming Languages Matthew J. Sottile Timothy G. Mattson Craig.
10/04/2011CS4961 CS4961 Parallel Programming Lecture 12: Advanced Synchronization (Pthreads) Mary Hall October 4, 2011.
CS470/570 Lecture 5 Introduction to OpenMP Compute Pi example OpenMP directives and options.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Chapter 5 Shared Memory Programming with OpenMP An Introduction to Parallel Programming Peter Pacheco.
Parallel Programming in Java with Shared Memory Directives.
Visual C New Optimizations Ayman Shoukry Program Manager Visual C++ Microsoft Corporation.
Parallel implementation of RAndom SAmple Consensus (RANSAC) Adarsh Kowdle.
And other languages…. must remember to check return value OR, must pass label/exception handler to every function Caller Function return status Caller.
C++ Code Analysis: an Open Architecture for the Verification of Coding Rules Paolo Tonella ITC-irst, Centro per la Ricerca Scientifica e Tecnologica
ICOM 5995: Performance Instrumentation and Visualization for High Performance Computer Systems Lecture 7 October 16, 2002 Nayda G. Santiago.
Introduction to JavaScript + More on Interactive Forms.
CMSC 202 Exceptions. Aug 7, Error Handling In the ideal world, all errors would occur when your code is compiled. That won’t happen. Errors which.
Critical Reference An occurrence of a variable v is defined to be critical reference: a. if it is assigned to in one process and has an occurrence in another.
OpenMP Blue Waters Undergraduate Petascale Education Program May 29 – June
REVIEW On Friday we explored Client-Server Applications with Sockets. Servers must create a ServerSocket object on a specific Port #. They then can wait.
Exceptions Handling Exceptionally Sticky Problems.
Exception Handling in JAVA. Introduction Exception is an abnormal condition that arises when executing a program. In the languages that do not support.
1 Software Construction and Evolution - CSSE 375 Exception Handling - Principles Steve Chenoweth, RHIT Above – Exception handling on the ENIAC. From
Hybrid MPI and OpenMP Parallel Programming
Exceptions CSC 171 FALL 2004 LECTURE 24. READING Read Horstmann Chapter 14 This course covered Horstmann Chapters
Exception Handling Unit-6. Introduction An exception is a problem that arises during the execution of a program. An exception can occur for many different.
1 C++ Classes and Data Structures Jeffrey S. Childs Chapter 4 Pointers and Dynamic Arrays Jeffrey S. Childs Clarion University of PA © 2008, Prentice Hall.
BIO Java 1 Exception Handling Aborting program not always a good idea – can’t lose messages – E-commerce: must ensure correct handling of private.
Introduction to JavaScript CS101 Introduction to Computing.
9/22/2011CS4961 CS4961 Parallel Programming Lecture 9: Task Parallelism in OpenMP Mary Hall September 22,
Exceptions in C++. Exceptions  Exceptions provide a way to handle the errors generated by our programs by transferring control to functions called handlers.
Exception-Handling Fundamentals  A Java exception is an object that describes an exceptional (that is, error) condition that has occurred in a piece of.
Session 7 Introduction to Inheritance. Accumulator Example a simple calculator app classes needed: –AdderApp - contains main –AddingFrame - GUI –CloseableFrame.
Uses some of the slides for chapters 7 and 9 accompanying “Introduction to Parallel Computing”, Addison Wesley, 2003.
CMSC 202 Computer Science II for Majors. CMSC 202UMBC Topics Exceptions Exception handling.
(c) University of Washington10-1 CSC 143 Java Errors and Exceptions Reading: Ch. 15.
And other languages…. must remember to check return value OR, must pass label/exception handler to every function Caller Function return status Caller.
CHAPTER 18 C – C++ Section 1: Exceptions. Error Handling with Exceptions Forces you to defend yourself Separates error handling code from the source.
Windows Programming Lecture 06. Data Types Classification Data types are classified in two categories that is, – those data types which stores decimal.
COMP7330/7336 Advanced Parallel and Distributed Computing OpenMP: Programming Model Dr. Xiao Qin Auburn University
CSCI 383 Object-Oriented Programming & Design Lecture 15 Martin van Bommel.
The Object-Oriented Thought Process Chapter 03
Java Exceptions a quick review….
SHARED MEMORY PROGRAMMING WITH OpenMP
Google Web Toolkit Tutorial
OpenMP Quiz B. Wilkinson January 22, 2016.
OpenMP 3.0 Feature: Error Detection Capability
Multi-core CPU Computing Straightforward with OpenMP
Exception Handling and Reading / Writing Files
Exception Handling In Text: Chapter 14.
Exceptions 1 CMSC 202.
Allen D. Malony Computer & Information Science Department
OpenMP Quiz.
Ninth step for Learning C++ Programming
Tenth step for Learning C++ Programming
Debugging and Handling Exceptions
Presentation transcript:

OpenMP 3.0 Feature: Error Detection Capability Kang Su Gatlin Visual C++ Program Manager

Why? OpenMP as it stands today is great for HPC OpenMP as it stands today is less appropriate for server side or enterprise applications There is simply no mechanism for error recovery – or even detection

Ideas We say “ideas” and not “proposals” Not even half-baked Exception based Call-back function based Error-code based

The Problem #pragma omp parallel // Code here #pragma omp barrier // Code here #pragma omp critical // Code here

Idea 1: An Exception Based Approach Define an OpenMP Exception Class: class OMPException {…}; Use try/catch around select constructs int foo() { try { #pragma omp parallel // Code here } catch (OMPException *e) { // Code here }

Idea 1: Exception Based Approach Pros Seems easy to implement Extensible The exception can have info about what happened Cons Only C++, not supported in C Can have large perf degredation

Idea 2: Error Code Based Approach Add a new clause to directives This one sets an error code in a passed address of type OMPError when error occurs OMPError *ompErr = new OMPError; #pragma omp parallel for error(ompErr)

Idea 2: Error Code Based Approach Pros Also seems easy to implement Supports all languages Very general Cons Maybe violates the “even works as expected compiled serially” Code to handle error is added directly to computational portion of code

Idea 3: Callback-Based Approach Add a new clause to directives: #pragma omp parallel error_callback(error, flag) void error(int *flag) { // User code here }

Idea 3: Callback-Based Approach Pros Little performance impact if no error Code is kept away from site of the computation Cons Less extensible Not really clear if it really does anything useful, but I like callbacks

IW O MP