OpenMP 3.0 Feature: Error Detection Capability - PowerPoint PPT Presentation

About This Presentation
Title:

OpenMP 3.0 Feature: Error Detection Capability

Description:

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 ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 12
Provided by: micro145
Category:

less

Transcript and Presenter's Notes

Title: OpenMP 3.0 Feature: Error Detection Capability


1
OpenMP 3.0 FeatureError Detection Capability
  • Kang Su Gatlin
  • Visual C
  • Program Manager

2
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

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

4
The Problem
pragma omp parallel // Code here pragma omp
barrier // Code here pragma omp critical //
Code here
5
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

6
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

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

8
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

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

11
I
W
O
M
P
Write a Comment
User Comments (0)
About PowerShow.com