Software implemented method for thread-privatizing user-specified global storage objects in parallel computer programs via program transformation
Uloženo v:
| Název: | Software implemented method for thread-privatizing user-specified global storage objects in parallel computer programs via program transformation |
|---|---|
| Patent Number: | 5,812,852 |
| Datum vydání: | September 22, 1998 |
| Appl. No: | 08/749,038 |
| Application Filed: | November 14, 1996 |
| Abstrakt: | A software-implemented method for dynamically and statically privatizing global storage objects in parallel computer programs written in various programming languages. Privatization is accomplished via transformation of these parallel computer programs under the control of a general purpose computer. The privatization method is system-independent and is portable across various computer architectures and platforms since privatization 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 inputs to the method are a parallel computer program, comprising parallel regions of execution and global storage objects, and a privatization specification describing the global storage objects to be privatized and the particular parallel regions, and manner, in which each of these objects is to be privatized. The privatization method itself translates the input parallel computer program into a second parallel computer program, according to the privatization specification, such that the second parallel computer program, when executed, accesses the specified global storage objects in a privatized manner, without requiring any explicit programmer modifications to the input parallel computer program. |
| Inventors: | Poulsen, David K. (Urbana, IL); Petersen, Paul M. (Champaign, IL); Shah, Sanjiv M. (Champaign, IL) |
| Assignees: | Kuck & Associates, Inc. (Champaign, IL) |
| Claim: | What is claimed is |
| Claim: | 1. A method for translating, in a computer storage medium, a parallel computer program into a second parallel computer program according to a privatization specification, said parallel computer program comprising one or more parallel regions and one or more global storage objects to be privatized according to said privatization specification, said second parallel computer program comprising said parallel regions and having the ability, when executed, to access privatized copies of said global storage objects according to said privatization specification, said privatization specification indicating the said global storage objects to be privatized and the said parallel regions of said parallel computer program in which the privatization of said global storage objects is to occur, each of said global storage objects being stored in a computer storage medium and having the ability to be accessed in a shared manner by multiple threads of execution, each of said privatized global storage objects being stored in a computer storage medium and having the ability to be accessed in a private manner by each of said threads as opposed to each processor, said method comprising the steps of |
| Claim: | a. providing, in said second parallel computer program, for a particular said global storage object, a means for addressing privatized copies of said particular global storage object; |
| Claim: | b. addressing, in said second parallel computer program, said privatized copies of said particular global storage object, rather than said particular global storage object, by using said addressing means; |
| Claim: | c. providing a means for instantiating, when said second parallel computer program is executed, said privatized copies of said particular global storage object according to said privatization specification, said privatized copies being addressable by using said addressing means; and |
| Claim: | d. repeating steps (a), (b), and (c) for each of said global storage objects to be privatized. |
| Claim: | 2. The method of claim 1 wherein said method comprises the steps of |
| Claim: | a. inserting, in said second parallel computer program, for a particular said global storage object, a declaration of a privatizable storage object corresponding to said particular global storage object; |
| Claim: | b. translating, in said second parallel computer program, each of the references to said particular global storage object into references to said privatizable storage object; |
| Claim: | c. inserting, in said second parallel computer program, setup machine instructions, said setup machine instructions providing a means for instantiating, when said second parallel computer program is executed, said privatizable storage object according to said privatization specification; and |
| Claim: | 3. The method of claim 2 wherein said instantiating means comprises, for each of said threads executed in said second parallel computer program, the steps of |
| Claim: | a. determining the current thread id, said current thread id being that of the particular one of said threads that is currently executing said instantiating means; |
| Claim: | b. determining whether one of said privatized copies of said particular global storage object was previously allocated, said one of said privatized copies corresponding to said current thread id; |
| Claim: | c. if said one of said privatized copies was not previously allocated, allocating and initializing said one of said privatized copies, said one of said privatized copies being allocated in a computer storage medium; |
| Claim: | d. if said privatization specification specifies that copy-in initialization is to be performed for said particular global storage object, copying from said particular global storage object to said one of said privatized copies; |
| Claim: | e. if said privatization specification specifies dynamic privatization for said particular global storage object and said privatization specification specifies that privatization of said particular global storage object is to occur in a particular one of said parallel regions, performing, in said one of said parallel regions, said references to said privatizable storage object by using, as the base address of said privatizable storage object in said one of said parallel regions, the address of said one of said privatized copies; |
| Claim: | f. if said privatization specification specifies dynamic privatization for said particular global storage object and said privatization specification does not specify that privatization of said particular global storage object is to occur in a particular one of said parallel regions, performing, in said one of said parallel regions, said references to said privatizable storage object by using, as the base address of said privatizable storage object in said one of said parallel regions, the address of said particular global storage object; |
| Claim: | g. if said privatization specification specifies static privatization for said particular global storage object and said current thread id is the thread id of the particular one of said threads that is used to execute serial code between said parallel regions, performing said references to said privatizable storage object by using, as the base address of said privatizable storage object, the address of said particular global storage object; and |
| Claim: | h. if said privatization specification specifies static privatization for said particular global storage object and said current thread id is not the thread id of the particular one of said threads that is used to execute serial code between said parallel regions, performing said references to said privatizable storage object by using, as the base address of said privatizable storage object, the address of said one of said privatized copies. |
| Claim: | 4. The method of claim 3 wherein said allocating and initializing said one of said privatized copies comprises copying from said particular global storage object to said one of said privatized copies. |
| Claim: | 5. The method of claim 3 wherein said determining whether one of said privatized copies of said particular global storage object was previously allocated comprises determining the existence of a private object descriptor, said private object descriptor being stored in a computer storage medium, said private object descriptor corresponding both to said particular global storage object and to said current thread id, said private object descriptor uniquely identifying said one of said privatized copies. |
| Claim: | 6. The method of claim 5 wherein said allocating and initializing said one of said privatized copies further comprises allocating and initializing said private object descriptor, said private object descriptor being allocated in a computer storage medium. |
| Claim: | 7. The method of claim 6 wherein said allocating and initializing said one of said privatized copies comprises copying from said particular global storage object to said one of said privatized copies. |
| Claim: | 8. The method of claim 3 wherein said instantiating means is provided by a library procedure, said library procedure comprising library machine instructions, said steps of said instantiating means being implemented by said library machine instructions, said library procedure being linked for execution with said second parallel computer program, said setup machine instructions comprising calls to said library procedure, said calls to said library procedure causing, when said second parallel computer program is executed, said library machine instructions to be executed, each of said calls to said library procedure comprising arguments and a return values, said arguments comprising the address of said particular global storage object, said return values comprising the address of said privatizable storage object, said address of said privatizable storage object being used to implement said references to said privatizable storage object. |
| Claim: | 9. The method of claim 8 wherein said allocating and initializing said one of said privatized copies comprises copying from said particular global storage object to said one of said privatized copies. |
| Claim: | 10. The method of claim 8 wherein said determining whether one of said privatized copies of said particular global storage object was previously allocated comprises determining the existence of a private object descriptor, said private object descriptor being stored in a computer storage medium, said private object descriptor corresponding both to said particular global storage object and to said current thread id, said private object descriptor uniquely identifying said one of said privatized copies. |
| Claim: | 11. The method of claim 10 wherein said allocating and initializing said one of said privatized copies further comprises allocating and initializing said private object descriptor, said private object descriptor being allocated in a computer storage medium. |
| Claim: | 12. The method of claim 11 wherein said allocating and initializing said one of said privatized copies comprises copying from said particular global storage object to said one of said privatized copies. |
| Current U.S. Class: | 395/706; 395/705; 395/707; 395/709; 395/500; 395/685; 3958/001; 39580/028 |
| Current International Class: | G06F 945; G06F 700 |
| Patent References Cited: | 5088034 February 1992 Ihara et al. 5093916 March 1992 Karp et al. 5278986 January 1994 Jourdenais et al. 5381550 January 1995 Jourdenais et al. 5721928 February 1998 Umehara et al. |
| Other References: | "Compiler Support For Privatization ON Distributed-Memory Machines" By Palermo et al., Proceedings of the 1996 International Conference on Parallel Processing, vol. 3, pp. 17-24, 1996. Padue, D.A., and Wolfe, M.J., "Advanced Compiler Optimizations for Supercomputers." Communications of the ACM, vol. 29, No. 12 (Dec. 1986), pp. 1148-1201. Eigenmann, R., and Blume, W., "An Effectiveness Study of Parallelizing Compiler Techniques." Proceedings of the 1991 International Conference on Parallel Processing (Aug. 1991), pp. II-17-25. Tu, P., and Padua, D., "Automatic Array Privatization." Proceedings of the Sixth Workshop on Languages and Compilers for Parallel Computing, U. Banerjee, D. Gelernter, A Nicolau, and D. Padua, eds., Portland, OR, Lecture Notes in Computer Science, vol. 768 (Aug. 12-14, 1993), pp. 500-521. CF77 Commands and Directives, Document Number SR-37716.0. Mendota Heights, MN, City Research, Inc. 1993. p. 135. Fortran 77 Programmer's Guide, Document Number 007-0711-050. Mountain View, CA, Silicon Graphics, Inc. Aug. 1993. p. 56. LD(1) man page, Release 1.2. Mountain View, CA, Silicon Graphics, Inc. 1994. p. 13. prctl (2) man page, Release 5.2. Mountain View, CA, Silicon Graphics, Inc. 1994. pp. 1-2. ANSI X3H5 subcommittee, "X3H5 Parallel Extension for Fortran." pp. 10, 22-24, 29, 54-56. Parallel Computing Forum, "The Parallel Computing Forum presents: PCF Fortran." B. Leisure, ed. (Aug. 1, 1990), pp. 45-50. Eigenmann, R. et al., "Restructing Fortran Programs for Cedar." Proceedings of the 1991 International Conference on Parallel Processing (Aug. 1991), pp. I-57-66. Guzzi, M.D. et al., "Cedar Fortran and Other Vector and Parallel Fortran Dialects." Journal of Supercomputing, vol. 4, No. 1 (Mar. 1990), pp. 37-62. Toomey, L.J. et al., "IBM Parallel Fortran." IBM Systems Journal, vol. 27, No. 4 (1988), pp. 416-435. KSR Fortran Programming Manual. Waltham, MA Kendall Square Research. Dec. 1993. pp. 6-31. Guide to DECthreads. Maynard, MA, Digital Equipment Corp., Jul. 1994. pp. pthread-74-75, 113-114. Pfister, G.F. et al. "The IBM Research Parallel Processor Prototype (RP3): Introduction and Architecture." Proceedings of the 1985 International Conference on Parallel Processing (Aug. 1985), pp. 764-771. Konicek, J. et al., "The Organization of the Cedar System." Proceedings of the 1991 International Conference on Parallel Processing (Aug. 1991), p. I-49-56. Hwang, K., and Briggs, F. A., Computer Architecture and Parallel Processing. New York, McGraw-Hill, 1984. pp. 264-271, 714-717. VAX Fortran Language Reference Manual, Order No. AA-D034E-TE. Maynard, MA, Digital Equipment Corp. Jun. 1988. pp. 4-29-41. CF77 Fortran Language Reference Manual, Document No. SR-37726.0. Mendota Heights, MN Cray Research, Inc. 1993. p. 76-81, 136, 292. Guide Reference Manual, Version 2.1, Document No. 9607001. Champaign, IL, Kuck and Associates, Inc. Sep. 1996, pp. 5-22. |
| Primary Examiner: | Voeltz, Emanuel Todd |
| Assistant Examiner: | Dam, Than Q. |
| Attorney, Agent or Firm: | Brinks Hofer Gilson & Lione |
| Přístupové číslo: | edspgr.05812852 |
| Databáze: | USPTO Patent Grants |
| Abstrakt: | A software-implemented method for dynamically and statically privatizing global storage objects in parallel computer programs written in various programming languages. Privatization is accomplished via transformation of these parallel computer programs under the control of a general purpose computer. The privatization method is system-independent and is portable across various computer architectures and platforms since privatization 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 inputs to the method are a parallel computer program, comprising parallel regions of execution and global storage objects, and a privatization specification describing the global storage objects to be privatized and the particular parallel regions, and manner, in which each of these objects is to be privatized. The privatization method itself translates the input parallel computer program into a second parallel computer program, according to the privatization specification, such that the second parallel computer program, when executed, accesses the specified global storage objects in a privatized manner, without requiring any explicit programmer modifications to the input parallel computer program. |
|---|