IP Library Granted Patent US 7,673,295
Granted Patent B1
US 7,673,295 · App. 10/832,943 · Granted Mar 2, 2010

System and method for compile-time non-concurrency analysis

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,673,295
App. No.
10/832,943
Granted
Mar 2, 2010
Kind
B1
Abstract

Compile-time non-concurrency analysis of parallel programs improves execution efficiency by detecting possible data race conditions within program barriers. Subroutines are modeled with control flow graphs and region trees having plural nodes related by edges that represent the hierarchical loop structure and construct relationship of statements. Phase partitioning of the control flow graph allows analysis of statement relationships with programming semantics, such as those of the OpenMP language, that define permitted operations and execution orders.

Claims (59)

1. A method for compile-time detection of non-concurrency in a parallel program having a base language and a parallel programming language, the method comprising:

modeling a program control flow of a subroutine of the parallel program, utilizing at least one processing unit, in a control flow graph having plural phases, wherein each phase having plural nodes;

modeling a program hierarchical loop structure of the subroutine of the base language and a parallel programming language constructs in a region tree of the subroutine, utilizing the at least one processing unit, wherein the region tree comprises at least one construct edge defining a cycle between at least one end construct directive node and at least one begin construct directive node, wherein the at least one construct edge does not reflect control transfer of a the subroutine;

analyzing the control flow graph and the region tree, utilizing the at least one processing unit, to identify plural parallel regions;

analyzing a parallel region, utilizing the at least one processing unit, to identify plural static phases, each static phases having one or more nodes; and

comparing nodes of the control flow graph and nodes of the static phases, utilizing the at least one processing unit, to determine non-concurrency at compile time for nodes in the same phase.

2. The method of claim 1 wherein the parallel programming language comprises an OPENMP parallel programming language.

3. The method of claim 1 wherein analyzing a parallel region further comprises:

performing a forward depth-first-search of the parallel region from an each barrier node through subsequent nodes to a subsequent barrier node;

performing a backward depth-first-search of the parallel region from each barrier node through preceding nodes to a preceding barrier node; and

determining one or more phases associated with each non-barrier node of the parallel region.

4. The method of claim 1 wherein comparing nodes of the control flow graph and nodes of the static phases further comprises:

determining non-concurrency for nodes in master constructs of the same phase.

5. The method of claim 1 wherein comparing nodes of the control flow graph and nodes of the static phases further comprises:

determining non-concurrency for nodes in ordered constructs in the same phase that are bound to the same construct.

6. The method of claim 1 wherein comparing nodes of the control flow graph and nodes of the static phases further comprises:

determining that two nodes are in the same phase and same single construct; and

determining non-concurrency for the nodes if the single construct is not in any loop with the parallel region.

7. The method of claim 1 wherein comparing nodes of the control flow graph and nodes of the static phases further comprises:

determining that two nodes are in the same phase and same single construct; and

determining non-concurrency for the nodes if none barrier free path exists from the single construct end directive node to the header of the immediately enclosing loop.

8. The method of claim 1 wherein comparing nodes of the control flow graph and nodes of the static phases further comprises:

determining that two nodes are in the same phase and same single construct; and

determining non-concurrency for the nodes if none barrier free path exists from the header of the immediately enclosing loop to the node directive.

9. A method for compiling a parallel program having variables in parallel regions divided by barriers, wherein the parallel program having a base language and a parallel programming language, the method comprising:

automatically assigning scopes to variables, utilizing at least one processing unit, based on functions performed on the variables;

automatically identifying a variable in a parallel region that has one or more functions performed on the variable in the parallel region, utilizing the at least one processing unit, such that the variable in the parallel region has not been automatically assigned a scope;

automatically partitioning the parallel region into plural phases, utilizing the at least one processing unit, the variable in the parallel region associated with one or more of the phases;

automatically performing a non-concurrency analysis on the variable in the parallel region, utilizing the at least one processing unit, to confirm the variable in the parallel region is free of data race, wherein performing the non-concurrency analysis further comprises:

modeling a program control flow of the parallel program in a control flow graph having plural phases, wherein each phase having plural nodes;

modeling a program hierarchical loop structure of a subroutine of the base language and a parallel programming language constructs in a region tree of the subroutine, utilizing the at least one processing unit, wherein the region tree comprises at least one construct edge defining a cycle between at least one end construct directive node and at least one begin construct directive node, wherein the at least one construct edge does not reflect control transfer of the subroutine; and

automatically assigning a shared scope to the variable in the parallel region, utilizing the at least one processing unit, if the variable in the parallel region is free of data race.

10. The method of claim 9 further comprising:

determining that the non-concurrency analysis fails to confirm that the variable is free of data race; and

serializing the parallel region to assign a scope to the variable.

11. The method of claim 9 wherein the program comprises an OPENMP program.

12. The method of claim 11 , wherein performing the non-concurrency analysis further comprises:

analyzing the control flow graph and the region tree to identify plural parallel regions;

analyzing the parallel region associated with the variable to identify plural static phases, each static phases having one or more nodes; and

comparing nodes of the control flow graph associated with the variable and nodes of the static phases to determine non-concurrency at compile time for nodes in the same phase.

13. The method of claim 12 wherein analyzing the parallel region further comprises:

performing a forward depth-first-search of the parallel region from an each barrier node through subsequent nodes to a subsequent barrier node;

performing a backward depth-first-search of the parallel region from each barrier node through preceding nodes to a preceding barrier node; and

determining one or more phases associated with each non-barrier node of the parallel region.

14. The method of claim 12 wherein comparing nodes associated with the variable and static phases further comprises:

determining non-concurrency for nodes that do not belong in the same phase.

15. The method of claim 12 wherein comparing nodes associated with the variable and static phases further comprises:

determining non-concurrency for nodes in master constructs of the same phase.

16. The method of claim 12 wherein comparing nodes associated with the variable and static phases further comprises:

determining non-concurrency for nodes in ordered constructs in the same phase that are bound to the same construct.

17. The method of claim 12 wherein comparing nodes associated with the variable and static phases further comprises:

determining that two nodes are in the same phase and same single construct; and

determining non-concurrency for the nodes if the single construct is not in any loop with the parallel region.

18. The method of claim 12 wherein comparing nodes associated with the variable and static phases further comprises:

determining that two nodes are in the same phase and same single construct; and

determining non-concurrency for the nodes if none barrier free path exists from the single construct end directive node to the header of the immediately enclosing loop.

19. The method of claim 12 wherein comparing nodes associated with the variable and static phases further comprises:

determining that two nodes are in the same phase and same single construct; and

determining non-concurrency for the nodes if none barrier free path exists from the header of the immediately enclosing loop to the node directive.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037305/0238 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 27, 2004
From: LIN, YUAN
To: SUN MICROSYSTEMS, INC.
Reel/Frame 015280/0797 →