Software implemented method for automatically validating the correctness of parallel computer programs
Uloženo v:
| Název: | Software implemented method for automatically validating the correctness of parallel computer programs |
|---|---|
| Patent Number: | 6,286,130 |
| Datum vydání: | September 04, 2001 |
| Appl. No: | 08/906,281 |
| Application Filed: | August 05, 1997 |
| Abstrakt: | A software-implemented method for validating the correctness of parallel computer programs, written in various programming languages, with respect to these programs' corresponding sequential computer programs. Validation detects errors that could cause parallel computer programs to behave incorrectly or to produce incorrect results, and is accomplished by transforming these parallel computer programs under the control of a general purpose computer and sequentially executing the resulting transformed programs. The validation method is system-independent and is portable across various computer architectures and platforms since validation is accomplished via program transformation; thus, the method does not depend on the features of a particular hardware architecture or configuration, operating system, compiler, linker, or thread environment. The input to the validation method is a parallel computer program. The parallel computer program results from annotating its corresponding sequential computer program with a parallelism specification; the annotations describe constraints in the sequential program to be relaxed to allow the exploitation of parallelism. Validation is accomplished by detecting semantic inconsistencies between the parallel computer program and its corresponding sequential computer program. The validation method translates the input parallel computer program into a second, sequential computer program such that the second sequential computer program, when executed, detects and reports the semantic inconsistencies between the parallel computer program and its corresponding sequential computer program. |
| Inventors: | Poulsen, David K. (Champaign, IL); Petersen, Paul M. (Champaign, IL); Shah, Sanjiv M. (Champaign, IL) |
| Assignees: | Intel Corporation (Santa Clara, CA) |
| Claim: | We claim |
| Claim: | 1. A method for detecting individual errors in a parallel computer program by translating a parallel computer program into a sequential computer program, said method comprising the steps of |
| Claim: | identifying a parallel computer program having at least one parallelism specification; |
| Claim: | generating a corresponding sequential computer program to the parallel computer program by ignoring said at least one parallelism specification contained in the parallel computer program; |
| Claim: | adding to said corresponding sequential computer program at least one first instruction, to generate at least one first trace event, said at least one first instruction relating to said corresponding sequential computer program, and at least one second instruction, to generate at least one second trace event, said at least one second instruction based upon the ignored at least one parallelism specification |
| Claim: | logically partitioning the sequential computer program into at least one disjoint group based upon the at least one second trace event, said at least one disjoint group comprising at least one of the at least one first trace events; and |
| Claim: | executing only said sequential computer program a single time, and analyzing said at least one disjoint group of said at least one first trace event based on types of second trace events used to partition said at least one first trace event to detect and report each precise semantic inconsistency between said parallel computer program and said corresponding sequential computer program, thereby detecting one or more semantic inconsistencies associated with a plurality of different executions of the parallel computer program. |
| Claim: | 2. The method of claim 1 further comprising the step of inserting, in said sequential computer program, event trace generating machine instructions, said generating instructions for generating said event trace to identify said semantic inconsistencies. |
| Claim: | 3. The method of claim 1 further comprising the step of inserting, in said sequential computer program, event trace analyzing machine instructions, said analyzing instructions for analyzing said event trace and detecting and reporting said semantic inconsistencies. |
| Claim: | 4. The method of claim 2 further comprising the steps of |
| Claim: | selecting one or more instrumentation intervals in said sequential computer program, each of said instrumentation intervals comprising one or more machine instructions in said sequential computer program; and |
| Claim: | inserting, within each one of said instrumentation intervals, event trace generating machine instructions for generating said event trace to identify said semantic inconsistencies, said generating instructions, when executed, collecting, in a computer storage medium, the portions of said event trace corresponding to said instrumentation intervals. |
| Claim: | 5. The method of claim 3 further comprising the steps of |
| Claim: | selecting one or more instrumentation intervals in said sequential computer program, each of said instrumentation intervals comprising at least one machine instruction in said sequential computer program, each of said instrumentation intervals being delimited by a start point and an end point; and |
| Claim: | inserting, at said end point of each of said instrumentation intervals, event trace analyzing machine instructions, said analyzing instructions for analyzing said event trace and detecting and reporting said semantic inconsistencies. |
| Claim: | 6. The method of claim 4 further comprising the steps of |
| Claim: | declaring a buffer object, said buffer object being addressable within said instrumentation intervals and being stored in said computer storage medium; and |
| Claim: | inserting, within each one of said instrumentation intervals, event trace generating machine instructions for generating said event trace to identify said semantic inconsistencies, said generating instructions comprising machine instructions that, when executed, store buffer object values into said buffer object, each one of said buffer object values corresponding to an event in said event trace for one of said instrumentation intervals. |
| Claim: | 7. The method of claim 5 further comprising, for each event in said event trace, the steps of |
| Claim: | determining, based on a current state of said sequential computer program, a new state of said sequential computer program, said new state reflecting the effect of said event in said event trace on said current state; |
| Claim: | determining if said new state is semantically inconsistent with said current state given said event in said event trace; |
| Claim: | detecting and reporting said semantic inconsistencies; and |
| Claim: | updating said current state to coincide with said new state. |
| Claim: | 8. The method of claim 7 wherein said state of said sequential computer program is stored in a computer storage medium and comprises |
| Claim: | a synchronization context comprising a list of at least one synchronization construct that are active at a given point in the execution of said sequential computer program; |
| Claim: | a shadow address space comprising, for each of at least one address in the computer storage medium accessed during the execution of said sequential computer and for each synchronization context under which each address was accessed, at least one timestamp; and |
| Claim: | an event activation stack, the activation stack comprising entries for the events in said event trace corresponding to the procedures and the parallel programming constructs that are active at a given point in the execution of said sequential computer program. |
| Claim: | 9. The method of claim 8 wherein said at least one timestamp in said shadow address space further comprises a read timestamp and a write timestamp. |
| Claim: | 10. A system for detecting errors in a parallel computer program by translating a parallel computer program into a sequential computer program, comprising |
| Claim: | a computer storage medium, the computer storage medium for storing a parallel computer program having at least one parallelism specification; |
| Claim: | means for generating a corresponding sequential computer program to the parallel computer program by ignoring said at least one parallelism specification contained in the parallel computer program, the corresponding sequential computer program being stored in the computer storage medium; |
| Claim: | means for adding to said corresponding sequential computer program at least one instruction to generate at least one trace event based upon the at least one parallelism specification and the corresponding sequential computer program to produce said sequential computer program, the sequential computer program being stored in the computer storage medium; and |
| Claim: | means for analyzing said at least one trace event when said sequential computer program is executed once to detect and report semantic inconsistencies between said parallel computer program and said corresponding sequential computer program and associated with two or more executions of the parallel computer program. |
| Claim: | 11. The system of claim 10 further comprising means for inserting, in said sequential computer program, event trace generating machine instructions, said generating instructions for generating said event trace to identify said semantic inconsistencies. |
| Claim: | 12. The system of claim 10 further comprising means for inserting, in said sequential computer program, event trace analyzing machine instructions, said analyzing instructions for analyzing said event trace and detecting and reporting said semantic inconsistencies. |
| Claim: | 13. The system of claim 11 further comprising |
| Claim: | means for selecting one or more instrumentation intervals in said sequential computer program, each of said instrumentation intervals comprising one or more machine instructions in said sequential computer program; and |
| Claim: | means for inserting, within each one of said instrumentation intervals, event trace generating machine instructions for generating said event trace to identify said semantic inconsistencies, said generating instructions, when executed, collecting, in the computer storage medium, the portions of said event trace corresponding to said instrumentation intervals. |
| Claim: | 14. The method of claim 12 further comprising |
| Claim: | means for selecting one or more instrumentation intervals in said sequential computer program, each of said instrumentation intervals comprising at least one machine instruction in said sequential computer program, each of said instrumentation intervals being delimited by a start point and an end point; and |
| Claim: | means for inserting, at said end point of each of said instrumentation intervals, event trace analyzing machine instructions, said analyzing instructions for analyzing said event trace and detecting and reporting said semantic inconsistencies. |
| Claim: | 15. The system of claim 13 further comprising |
| Claim: | means for declaring a buffer object, said buffer object being addressable within said instrumentation intervals and being stored in said computer storage medium; and |
| Claim: | means for inserting, within each one of said instrumentation intervals, event trace generating machine instructions for generating said event trace to identify said semantic inconsistencies, said generating instructions comprising machine instructions that, when executed, store buffer object values into said buffer object, each one of said buffer object values corresponding to an event in said event trace for one of said instrumentation intervals. |
| Claim: | 16. The system of claim 14 further comprising, for each event in said event trace |
| Claim: | means for determining, based on a current state of said sequential computer program, a new state of said sequential computer program, said new state reflecting the effect of said event in said event trace on said current state; |
| Claim: | means for determining if said new state is semantically inconsistent with said current state given said event in said event trace; |
| Claim: | means for detecting and reporting said semantic inconsistencies; and |
| Claim: | means for updating said current state to coincide with said new state. |
| Claim: | 17. The system of claim 16 wherein said state of said sequential computer program is stored in the computer storage medium and comprises |
| Claim: | 18. The system of claim 17 wherein said at least one timestamp in said shadow address space further comprises a read timestamp and a write timestamp. |
| Claim: | 19. The method defined in claim 1, wherein only one trace event is generated for each at least one added instruction. |
| Claim: | 20. The method defined in claim 1, wherein the step of executing said sequential computer program detects semantic inconsistencies between one or more different parallel executions of said parallel computer program and said corresponding sequential computer program. |
| Claim: | 21. The method defined in claim 1, wherein the step of executing the sequential computer program is performed only once. |
| Claim: | 22. The method defined in claim 1, further comprising the step of providing a computer storage medium for storing the sequential computer program and the parallel computer program. |
| Claim: | 23. The system defined in claim 10, wherein only one trace event is generated for each at least one added instruction. |
| Claim: | 24. The system defined in claim 10, wherein the means for analyzing detects semantic inconsistencies between one or more different parallel executions of said parallel computer program and said corresponding sequential computer program. |
| Claim: | 25. The system defined in claim 10, wherein the sequential computer program is executed only once. |
| Current U.S. Class: | 717/4 |
| Current International Class: | G06F 944 |
| Patent References Cited: | 3707725 December 1972 Dellheim 5048018 September 1991 Berstein et al. 5168554 December 1992 Luke 5193180 March 1993 Hastings 5241675 August 1993 Sheth et al. 5335344 August 1994 Hastings 5371747 December 1994 Books et al. 5535329 July 1996 Hastings 5583988 December 1996 Crank et al. 5689712 November 1997 Heisch 5790858 August 1998 Vogel 5860009 January 1999 Uchihira et al. |
| Other References: | Helmbold, D.P., and McDowell, C.E., "A Taxonomy of Race Detection Algorithms", Department of Computer and Information Sciences, University of California, Santa Cruz, techincal report No. UCSC-CRL-94-35, Sep. 28, 1994. Helmbold, D.P., McDowell, C.E., and Wang, J.-Z., "Analyzing Traces with Anonymous Synchronization", Proceedings of the 1990 International Conference on Parallel Processing, Aug., 1990, pp. II-70-77. Helmbold, D.P., McDowell, C.E., and Wang, J.-Z., "Detecting Data Races from Sequential Traces", Proceedings of the 1991 Hawaii International Conference on System Sciences, pp. 408-417. Mellor-Crummey, J., "On-the-fly Detection of Data Races for Programs with Nested Fork-Join Parallelism", Proceedings of Supercomputing 1991, Albuquerque, NM, Nov., 1991, pp. 24-33. Mellor-Crummey, J., "Compile-time Support for Efficienct Data Race Detection in Shared-Memory Parallel Programs", Center for Research on Parallel Computation, Rice University, technical report No. CRPC-TR92232, Sep., 1992. Hood, R., Kennedy, K, and Mellor-Crummey, J., "Parallel Program Debugging with On-the-fly Anomaly Detection", Proceedings of Supercomputing 1990, New York, NY, Nov., 1990, pp. 74-81. Petersen, P.M., and Padua, D.A., "Dynamic Dependence Analysis: A Novel Method for Data Dependence Evaluation", Proceedings of the 5th Workshop on Languages and Compilers for Parallel Computing, New Haven, CT, Aug. 3-5, 1993, Lecture Notes in Computer Science, vol. 757, 1993, pp. 64-81. Abramson. D., Foster, I., Michalakes, J., and Sosic, R., "Relative Debugging and its Application to the Development of Large Numerical Models", Proceedings of Supercomputing 1995, San Diego, CA, Nov., 1995. Parallel Computing Forum, "The Parallel Computing Forum presents: PCF Fortran." B. Leisure, ed. (Aug. 1, 1990), pp. 45-50. Guide Reference Manual, Version 2.1, Document No. 9607001. Champaign, IL, Kuck and Associates, Inc. Sep. 1996, pp. 5-22. Aho, A.V., Sethi, R., and Ullman, J.D., "Compilers: Principles, Techniques, and Tools." Reading, Mass. Addison-Wesley, 1988. pp. 528-530. |
| Primary Examiner: | Oberley, Alvin E. |
| Assistant Examiner: | Opie, George |
| Attorney, Agent or Firm: | Blakely, Sokoloff, Taylor & Zafman LLP |
| Přístupové číslo: | edspgr.06286130 |
| Databáze: | USPTO Patent Grants |
| Abstrakt: | A software-implemented method for validating the correctness of parallel computer programs, written in various programming languages, with respect to these programs' corresponding sequential computer programs. Validation detects errors that could cause parallel computer programs to behave incorrectly or to produce incorrect results, and is accomplished by transforming these parallel computer programs under the control of a general purpose computer and sequentially executing the resulting transformed programs. The validation method is system-independent and is portable across various computer architectures and platforms since validation is accomplished via program transformation; thus, the method does not depend on the features of a particular hardware architecture or configuration, operating system, compiler, linker, or thread environment. The input to the validation method is a parallel computer program. The parallel computer program results from annotating its corresponding sequential computer program with a parallelism specification; the annotations describe constraints in the sequential program to be relaxed to allow the exploitation of parallelism. Validation is accomplished by detecting semantic inconsistencies between the parallel computer program and its corresponding sequential computer program. The validation method translates the input parallel computer program into a second, sequential computer program such that the second sequential computer program, when executed, detects and reports the semantic inconsistencies between the parallel computer program and its corresponding sequential computer program. |
|---|