Static Detection of Unspecified Behaviors and Deadlocks in OpenMP Programs

Author
WangZhaoFei
Advisor
ZhaoKeJia , HuangChun
School
National University of Defense Science and Technology
Major
Computer Science and Technology
Classification
TP311.11 Programming method
Degree
Master's thesis
Year
2005
Downloads
161
Citations
1

Request the full text

Abstract

Because of good flexibility and portability, OpenMP has become the industry standard for shared memory programming. However, it is so difficult to develop correct parallel programs that OpenMP programs are apt to malfunction. Unspecified behaviors and the deadlocks related to barriers are two potential factors that cause OpenMP programs to err at runtime. Static analysis is used to detect these hazards in OpenMP programs without running these programs.To begin with, the above two hazards in OpenMP programs are investigated and summarized. Unspecified behaviors are classified into four categories,.and the deadlocks related to barriers are classified into two categories. Then, three key techniques for static analysis of OpenMP programs are introduced. Firstly, traditional control flow graph is extended. Parallel basic blocks are introduced to represent OpenMP API, and structure edges are added to determine the scope of directives and control structures. Secondly, indeterminate program behaviors caused by control structures are analyzed conservatively. Thirdly, meaningful interpretations are reported for each detected hazard, which make it convenient for users to not only confirm the found hazards, but also give priority to the hazards that are more likely to occur. Searching is used to record the paths in control flow graph that lead to the detected hazards, and static branch prediction is employed to estimate the execution probability of a path.Next, the procedures to detect the above two hazards are presented. To detect unspecified behaviors, a structured region is divided into different levels according to the nesting relations of the control structures in it and analyzed with level as a unit, while an unstructured region is checked through the identification of live private variables. Existence rule and nonuniformity rule are adopted to detect the first and the second category of the deadlocks related to barriers respectively. The identification of reaching definitions to lock variables is used to detect the first category of deadlocks in the mutual exclusion regions determined by lock variables. Nestable locks introduced by OpenMP can also be analyzed. Furthermore, the identification of reaching definitions to virtual variable is used to detect the second category of deadlocks. Moreover, the searching techniques to record the paths leading to these hazards are discussed.At last, a static correctness checking tool for OpenMP programs, called C-Checker, is described. C-Checker is tested using several customized OpenMP programs and SPEComp2001 benchmark suite. Experiments show that, C-Checker can effectively detect unspecified behaviors and the deadlocks related to barriers in actual OpenMP programs, and help programmers eliminate these hazards.

Table of contents

List of Figures 6-8 table directory 8-9 summary for 9-10 Abstract 10-11 The first chapter 11-17 § 1.1 research background 11-12 § 1.2 the significance of the research 12 § 1.3 program Research correctness protection 12-15 1.3.1 debugging 12-13 1.3.2 Dynamic Analysis 13 1.3.3 Static analysis the the 13-14 1.3.4 three methods compare 14-15 § 1.4 research content and results 15-16 <br / > 1.4.1 research 15 1.4.2 research 15-16 the § 1.5 thesis structure 16-17 the OpenMP program hidden Analysis 17-20 § 2.1 is not specified acts 17-18 § 2.2 fence synchronization related deadlock 18-20 Chapter OpenMP static analysis of the program's key technologies of 20-26 the § 3.1 OpenMP program indicates 20-22 3.1.1 extended control flow graph 20-21 3.1.2 call Figure 21-22 § 3.2 uncertainty analysis of program behavior 22-24 3.2.1 the area stratification layer analysis thought 22-23 3.2.2 data stream analysis 23-24 to § 3.3 program hidden explained 24 -26 description of the ins and outs of the 3.3.1 program hidden 24 the 3.3.2 program hidden severity quantify 24-26 Chapter OpenMP program in unspecified behavior the static detection 26-29 § 4.1 structured parallel zone is not specified behavior detection 26-28 4.1.1 parallel district needs check of the basic block to determine 27 4.1.2 defined range is not specified in the behavior detection 27-28 § 4.2 unstructured in the parallel section is not specified behavior The first category of sync with the fence deadlock detection 28-29 of fifth chapter OpenMP program static detection 29-32 § 5.1 and fence synchronization related the deadlock detection 29-31 5.1.1 four kinds of regions in the first class of deadlock detection 29-30 5.1.2 by the lock variable determines mutually exclusive in the first class deadlock detection 30-31 to § 5.2 second fence synchronization deadlock detection 31-32 sixth Chapter C-Checker realization and evaluation 32-63 § 6.1 CCRG OpenMP parallel compiler 32-33 § 6.2 C-Checker data structure 33 -38 6.2.1 basic block data structure the 33-36 6.2.2 process-related data structures 36 6.2.3 Search data structure 36-37 6.2.4 C-Checker used data structure associated 37-38 § 6.3 C-Checker main algorithm described 38-57 6.3.1 structured parallel in behavior detection algorithm is not specified 39-45 the the 6.3.2 unstructured parallelism District is not specified behavior detection algorithm 45-48 6.3.3 parallel in deadlock detection algorithm 48-56 6.3.4 C-Checker program structure 56 - 57 § 6.4 Experimental 57-63 6.4.1 is not specified behavior detection in OpenMP programs customized 57-58 6.4.2 detect custom OpenMP the program synchronization-related fence deadlock 58-60 6.4.3 C-Checker SPEComp2001 evaluation 60-63 Chapter VII Conclusion 63 -64 Acknowledgements 64-65 studying for a master's degree during the published papers the 65-66 Reference 66-67

Related dissertations

  1. Design and Development of a High-speed Heavy-load Palletizing Robot
    CaoJiaZuo ·Tianjin University ·2012 ·Master's thesis
  2. The Design and Analysis of Octahedral Module Deployable Mast
    LiCheng ·Harbin Engineering University ·2013 ·Master's thesis
  3. Research on Mechanical Properties Of the Elastic Body of a Six-Axis Force Sensor Based on Strain Gauge
    WangZhiHong ·Anhui University of Engineering ·2013 ·Master's thesis
  4. Parallel Hybrid PVS Algorithm Based on OpenMP and its Application
    ZouJing ·Hunan University ·2012 ·Master's thesis
  5. Compiler-directed Static Analysis and Code Transformation
  6. Static Security Detection of C Applications
  7. The Research of Exploiting Software Security Vulnerabilities Based on Android Platforms
    TangYuJing ·Hebei University of Engineering ·2013 ·Master's thesis
  8. Study of Multicore-based Parallel Algorithm for Constructing Extremal Graphs
    ZhengRuiJun ·Beijing Jiaotong University ·2014 ·Master's thesis
  9. The Research of Shared CMP Cache Management
    XuZuo ·Hunan University ·2013 ·Master's thesis
  10. Parallelizing Research and Implementation of Speech Recognition
    SongGuangJie ·Northeastern University ·2010 ·Master's thesis
  11. Research on Key Technology of On-chip Multicasting Communication Based on2D Mesh Network
  12. Single Parent Family High School Students Interpersonal Disorder and Psychological Intervention of a Case Study of
    ZhengZuo ·Sichuan Normal University ·2012 ·Master's thesis
  13. Report on Interpretation Practice of Long-distance Conversations under the Context of Instant Messaging Software
    QinZuo ·Shandong Normal University ·2014 ·Master's thesis
  14. Influences of Language Fusion on International Trade
    TanLi ·Wuhan University of Technology ·2013 ·Master's thesis
  15. Research on Barriers to Pain Management Encountered by Pediatric Nurses
  16. The Finite Element Analysis and Optimization of the Key Components of FP2500A Type Stack-Turning Machine for Organic Fertilizer
    WangZeMin ·Nanjing Agricultural College ·2013 ·Master's thesis
  17. Design and Analysis of PF1In-cryostat-feeder Support for ITER Poloidal Field
    ZhangJunLong ·Hefei University of Technology ·2013 ·Master's thesis
  18. Research on Steel Structure Optimization and Dynamic Characteristics of HZS240Concrete Mixing Station
  19. Mechanical Performance Analysis of Semi-rigid Steel Frames Filled Profild Steel Plate Wall
    LiuYing ·Harbin Institute of Technology ·2012 ·Master's thesis
  20. Large Steel Structure Natural Draft Cooling Tower of Force Analysis
    WangJin ·East China Jiaotong University ·2013 ·Master's thesis