10.1145/781498.781532acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedings
Article

Using generative design patterns to generate parallel code for a distributed memory environment

ABSTRACT

A design pattern is a mechanism for encapsulating the knowledge of experienced designers into a re-usable artifact. Parallel design patterns reflect commonly occurring parallel communication and synchronization structures. Our tools, CO2P3S (Correct Object-Oriented Pattern-based Parallel Programming System) and MetaCO2P3S, use generative design patterns. A programmer selects the parallel design patterns that are appropriate for an application, and then adapts the patterns for that specific application by selecting from a small set of code-configuration options. CO2P3S then generates a custom framework for the application that includes all of the structural code necessary for the application to run in parallel. The programmer is only required to write simple code that launches the application and to fill in some application-specific sequential hook routines. We use generative design patterns to take an application specification (parallel design patterns + sequential user code) and use it to generate parallel application code that achieves good performance in shared memory and distributed memory environments. Although our implementations are for Java, the approach we describe is tool and language independent. This paper describes generalizing CO2P3S to generate distributed-memory parallel solutions.

References

  1. J. Anvik, S. MacDonald, D. Szafron, J. Schaeffer, S. Bromling, and K. Tan. Generating parallel programs from the wavefront design pattern. In Proceedings of 7th International Workshop on High-Level Parallel Programming Models and Supportive Environments, CD-ROM 1--8, 2002.]]Google ScholarGoogle ScholarCross RefCross Ref
  2. H. Bal, F. Kaashoek, and A. Tanenbaum. Orca: A language for parallel programming of distributed systems, IEEE Trans. on Software Engineering, 18(3):190--205, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. Beck and R. Johnson. Patterns generate architecture. In Proceedings of the 8th European Conference on Object-Oriented Programming, volume 821 of Lecture Notes in Computer Science, pp. 139--149. Springer-Verlag, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R. F. Boisvert, J. J. Dongarra, R. Pozo, K. A. Remington, and G. W. Stewart. Developing numerical libraries in Java. In ACM 1998 Workshop on Java for High-Performance Network Computing. ACM SIGPLAN, 1998.]]Google ScholarGoogle ScholarCross RefCross Ref
  5. J. Bosch. Design patterns as language constructs. Journal of Object-Oriented Programming, 11(2):18--32, 1998.]]Google ScholarGoogle Scholar
  6. S. Bromling. Meta-programming with parallel design patterns. Master's thesis, Dept. of Computing Science, University of Alberta, 2001.]]Google ScholarGoogle Scholar
  7. S. Bromling, S. MacDonald, J. Anvik, J. Schaefer, D. Szafron, K. Tan, Pattern-based parallel programming, Proceedings of the International Conference on Parallel Programming (ICPP'2002), August 2002, Vancouver Canada, pp. 257--265.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. F. Budinsky, M. Finnie, J. Vlissides, and P. Yu. Automatic code generation from design patterns. IBM Systems Journal, 35(2):151--171, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. N. Carriero and D. Gelernter. Linda in context. Commun. of the ACM, 32(4):444--458, October 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. X. Chen and V. H. Allan. MultiJav: a distributed shared memory system based on multiple Java virtual machines. Proceedings of the International Conference on Parallel and Distributed Processing Techniques and Applications (PDPTA'98), pp. 91--98, 1998.]]Google ScholarGoogle Scholar
  11. M. Cole. Algorithmic Skeletons: Structured Management of Parallel Computation, Pitman/MIT Press, 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. Dagum and R. Menon. OpenMP: An industry-standard API for shared-memory programming. IEEE Computational Science & Engineering, 5(1):46--55, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Eden, Y. Hirshfeld, and A. Yehudai. Towards a mathematical foundation for design patterns. Technical Report Technical Report 1999-004, Dept. of Information Technology, University of Uppsala, 1999.]]Google ScholarGoogle Scholar
  14. R. Finkel and U. Manber, DIB - A Distributed Implementation of Backtracking. ACM TOPLAS, April 1987, pp. 235--256.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. G. Florijn, M. Meijers, and P. van Winsen. Tool support for object-oriented patterns. In Proceedings of the 11th European Conference on Object-Oriented Programming, volume 1241 of Lecture Notes in Computer Science, pages 472--495. Springer-Verlag, 1997.]]Google ScholarGoogle ScholarCross RefCross Ref
  16. E. Freeman and S. Hupfer, Make room for JavaSpaces, Part 1: Ease the development of distributed apps with JavaSpaces, http://www.javaworld.com/javaworld/jw-11-1999/jw-11-jiniology.html]]Google ScholarGoogle Scholar
  17. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. GigaSpaces Technologies. GigaSpaces cluster white paper, http://www.gigaspaces.com/download/GSClusterWhitePaper.pdf, 2002.]]Google ScholarGoogle Scholar
  19. A. Grimshaw. Easy to use object-oriented parallel programming with Mentat, IEEE Computer, pp. 39--51, May, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Johnson and B. Foote. Designing reusable classes. Journal of Object-Oriented Programming, 1(2):22--35, 1988.]]Google ScholarGoogle Scholar
  21. J. Maassen, R. van Nieuwpoort, R. Veldema, H. Bal, T. Kielmann, C. Jacobs, and R. Hofman. Efficient Java RMI for parallel programming, Programming Languages and Systems, 23(6):747--775, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. MacDonald. From patterns to frameworks to parallel programs. Ph.D. thesis, Dept. of Computing Science, University of Alberta, 2002.]]Google ScholarGoogle Scholar
  23. S. MacDonald, J. Anvik, S. Bromling, D. Szafron, J. Schaeffer and K. Tan. From patterns to frameworks to parallel programs, Parallel Computing, 28(12);1663--1683, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. MacDonald, D. Szafron, and J. Schaeffer. Object-oriented pattern-based parallel programming with automatically generated frameworks. In Proceedings of the 5th USENIX Conference on Object-Oriented Technology and Systems, pp. 29--43, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. MacDonald, D. Szafron, J. Schaeffer, J. Anvik, S. Bromling, and K. Tan. Generative design patterns, 17th IEEE International Conference on Automated Software Engineering (ASE), pp. 23--34, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. MacDonald, D. Szafron, J. Schaeffer, and S. Bromling. Generating parallel program frameworks from parallel design patterns. In Proceedings of the 6th International Euro-Par Conference, volume 1900 of Lecture Notes in Computer Science, pp. 95--104. Springer-Verlag, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Massingill, T. Mattson, and B. Sanders. A pattern language for parallel application programs. Technical Report CISE TR 99-022, University of Florida, 1999.]]Google ScholarGoogle Scholar
  28. ModelMaker Tools. Design patterns in ModelMaker. http://www.modelmakertools.com/mm_design_patterns.htm.]]Google ScholarGoogle Scholar
  29. J. E. Moreira, S.P. Midkiff, M. Gupta, P. V. Artigas, M. Snir, and R. D. Lawrence, Java programming for high-performance numerical computing. IBM Systems Journal 39, 2000, pp. 21--56.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J. Newmarch. A Programmer's Guide to Jini Technology. Apress, November 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. Philippsen, B. Haumacher, and C. Nester. More efficient serialization and RMI for Java. Concurrency: Practice and Experience, 12(7):495--518, May 2000.]]Google ScholarGoogle ScholarCross RefCross Ref
  32. J. Reynders, et al. POOMA: A framework for scientific simulations of parallel architectures, Parallel Programming in C++, G. Wilson and P. Lu (editors), pp. 547--588, MIT Press, 1996.]]Google ScholarGoogle Scholar
  33. J. Schaeffer, D. Szafron, G. Lobe, and I. Parsons. The Enterprise model for developing distributed applications. IEEE Parallel & Distributed Technology, 1(3):85--96, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. D. Schmidt, M. Stal, H. Rohnert, and F. Buschmann. Pattern-Oriented Software Architecture: Patterns for Concurrent and Networked Objects, volume 2. Wiley & Sons, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. H. Shi and J. Schaeffer. Parallel Sorting by Regular Sampling. Journal of Parallel and Distributed Computing, 14(4):361--372, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. A. Singh, J. Schaeffer and M. Green. A template-based approach to the generation of distributed applications using a network of workstations, IEEE Trans. on Parallel and Distributed Computing, 2(1):52--67, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. A. Singh, J. Schaeffer, and D. Szafron. Experience with parallel programming using code templates. Concurrency: Practice & Experience, 10(2):91--120, 1998.]]Google ScholarGoogle ScholarCross RefCross Ref
  38. S. Siu, M. De Simone, D. Goswami, and A. Singh. Design patterns for parallel programming. Proceedings of the 1996 International Conference on Parallel and Distributed Processing Techniques and Applications (PDPTA'96), pp. 230--240, 1996.]]Google ScholarGoogle Scholar
  39. M. Snir, S. Otto, S. Hess-Lederman, D. Walker, and J. Dongarra. MPI: The Complete Reference. MIT Press, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. F. Sommers. Activatable Jini Services, Part 1: Implement RMI Activation, http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jinirmi.html]]Google ScholarGoogle Scholar
  41. Sun Microsystems. Java Remote Method Invocation Specification, JDK 1.1, http://java.sun.com/products/jdk/rmi_ed, 1997.]]Google ScholarGoogle Scholar
  42. Sun Microsystems. Jini Architectural Overview, 2001. http://wwws.sun.com/software/jini/whitepapers/architecture.pdf.]]Google ScholarGoogle Scholar
  43. Sun Microsystems. JNI Specification, 2000. http://java.sun.com/products/jdk/1.2/docs/guide/jni/spec/jniTOC.doc.html]]Google ScholarGoogle Scholar
  44. K. Tan, Pattern-based parallel programming in a distributed memory environment. Master's thesis, Dept. of Computing Science, University of Alberta, 2003.]]Google ScholarGoogle Scholar
  45. TogetherSoft Corporation. TogetherSoft ControlCenter tutorials: Using design patterns. http://www.togethersoft.com/services/tutorials/index.jsp.]]Google ScholarGoogle Scholar
  46. B. Venners. Inside the Java 2 Virtual Machine. McGraw Hill, 2nd edition, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. M. Welsh and D. Culler. Jaguar: Enabling efficient communication and I/O in Java. Concurrency: Practice and Experience, 12(7):519--538, 2000.]]Google ScholarGoogle ScholarCross RefCross Ref
  48. B. Wilkinson and M. Allen. Parallel Programming: Techniques and Applications Using Networked Workstations and Parallel Computers. Prentice Hall, 1st edition, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Using generative design patterns to generate parallel code for a distributed memory environment

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader
                  About Cookies On This Site

                  We use cookies to ensure that we give you the best experience on our website.

                  Learn more

                  Got it!