The Journal of Supercomputing

, Volume 62, Issue 3, pp 1560–1582 | Cite as

PPModel: a modeling tool for source code maintenance and optimization of parallel programs

  • Ferosh Jacob
  • Jeff Gray
  • Jeffrey C. Carver
  • Marjan Mernik
  • Purushotham Bangalore
Article

Abstract

As the computation power in desktops advances, parallel programming has emerged as one of the essential skills needed by next generation software engineers. However, programs written in popular parallel programming paradigms have a substantial amount of sequential code mixed with the parallel code. Several such versions supporting different platforms are necessary to find the optimum version of the program for the available resources and problem size. As revealed by our study on benchmark programs, sequential code is often duplicated in these versions. This can affect code comprehensibility and re-usability of the software. In this paper, we discuss a framework named PPModel, which is designed and implemented to free programmers from these scenarios. Using PPModel, a programmer can separate parallel blocks in a program, map these blocks to various platforms, and re-execute the entire program. We provide a graphical modeling tool (PPModel) intended for Eclipse users and a Domain-Specific Language (tPPModel) for non-Eclipse users to facilitate the separation, the mapping, and the re-execution. This is illustrated with a case study from a benchmark program, which involves re-targeting a parallel block to CUDA and another parallel block to OpenMP. The modified program gave almost 5× performance gain compared to the sequential counterpart, and 1.5× gain compared to the existing OpenMP version.

Keywords

CUDA OpenMP PPModel tPPModel DSL 

References

  1. 1.
    Allen R, Kennedy K (1984) Automatic loop interchange. In: Proceedings of the symposium on compiler construction, Montreal, Canada, pp 233–246 Google Scholar
  2. 2.
    Antoniol G, Villano U, Merlo E, Penta M (2002) Analyzing cloning evolution in the Linux kernel. Inf Softw Technol 44(13):755–765 CrossRefGoogle Scholar
  3. 3.
    Appelbe WF, Smith K, McDowell CE (1989) Start/Pat: A parallel-programming toolkit. IEEE Softw 6(4):29–38 CrossRefGoogle Scholar
  4. 4.
    Arora R, Bangalore P, Mernik M (2012) Raising the level of abstraction for developing message passing applications. J Supercomput 59(2):1079–1100 CrossRefGoogle Scholar
  5. 5.
    Artigas PV, Gupta M, Midkiff SP, Moreira JE (2000) Automatic loop transformations and parallelization for Java. In: Proceedings of the international conference on supercomputing, Santa Fe, NM, pp 1–10 CrossRefGoogle Scholar
  6. 6.
    Atkinson C, Kuhne T (2003) Model-driven development: a metamodeling foundation. IEEE Softw 20(5):36–41 CrossRefGoogle Scholar
  7. 7.
    Basumallik A, Eigenmann R (2005) Towards automatic translation of OpenMP to MPI. In: Proceedings of the international conference on supercomputing, Cambridge, MA, pp 189–198 Google Scholar
  8. 8.
    Breitbart J (2009) CuPP—a framework for easy CUDA integration. In: Proceedings of the international parallel and distributed processing symposium, Rome, Italy, pp 1–8 Google Scholar
  9. 9.
    Brodtkorb AR, Hagen TR (2008) A comparison of three commodity-level parallel architectures: multi-core cpu, cell be and gpu. In: Proceedings of the international conference on mathematical methods for curves and surfaces, Tønsberg, Norway, pp 70–80 Google Scholar
  10. 10.
    Browne J, Azam M, Sobek S (1989) CODE: a unified approach to parallel programming. IEEE Softw 6(4):10–18 CrossRefGoogle Scholar
  11. 11.
    Buenda MJ, Rosique F, Sánchez P, lvarez B, Iborra A (2009) Habitation: a domain-specific language for home automation. IEEE Softw 26(4):30–38 CrossRefGoogle Scholar
  12. 12.
    Carver J (2011) Development of a mesh generation code with a graphical front-end: a case study. J Organ End-User Comput 23(4):1–16 CrossRefGoogle Scholar
  13. 13.
    Carver J, Kendall R, Squires S, Post D (2007) Software development environments for scientific and engineering software: a series of case studies. In: Proceeding of the international conference on software engineering, Minneapolis, MN, pp 550–559 Google Scholar
  14. 14.
    Chandra R, Dagum L, Kohr D, Maydan D, McDonald J, Menon R (2001) Parallel programming in OpenMP. Morgan Kaufmann, San Mateo Google Scholar
  15. 15.
    Dean J, Ghemawat S (2008) Mapreduce: Simplified data processing on large clusters. Commun ACM 51(1):107–113 CrossRefGoogle Scholar
  16. 16.
    Devin F, Boulet P, Dekeyser JL, Marquet P (2002) GASPARD: a visual parallel programming environment. In: Proceedings of the international conference on parallel computing in electrical engineering, Warsaw, Poland, p 145 CrossRefGoogle Scholar
  17. 17.
    Di Martino B, Keßler CW (2000) Two program comprehension tools for automatic parallelization. IEEE Concurr 8(1):37–47 CrossRefGoogle Scholar
  18. 18.
    Dig D, Marrero J, Ernst MD (2009) Refactoring sequential Java code for concurrency via concurrent libraries. In: Proceedings of the international conference on software engineering, Vancouver, Canada, pp 397–407 Google Scholar
  19. 19.
    Fritz N, Lucas P, Slusallek P (2004) CGiS, a new language for data-parallel gpu programming. In: Proceedings of the international workshop vision, modeling, and visualization, Stanford, CA, pp 241–248 Google Scholar
  20. 20.
    Garrido A, Johnson R (2002) Challenges of refactoring C programs. In: Proceedings of the international workshop on principles of software evolution, Orlando, FL, pp 6–14 CrossRefGoogle Scholar
  21. 21.
    Gray J, Tolvanen JP, Kelly S, Gokhale A, Neema S, Sprinkle J (2007) Domain-specific modelling: handbook of dynamic system modeling. CRC Press, Boca Raton Google Scholar
  22. 22.
    Han TD, Abdelrahman TS (2009) hiCUDA: A high-level directive-based language for GPU programming. In: Proceedings of the workshop on general purpose processing on graphics processing units, Washington, DC, pp 52–61 Google Scholar
  23. 23.
    Jablonski P, Hou D (2007) CReN: A tool for tracking copy-and-paste code clones and renaming identifiers consistently in the ide. In: Proceedings of the OOPSLA workshop on eclipse technology eXchange, Montreal, Canada, pp 16–20 CrossRefGoogle Scholar
  24. 24.
    Jacob F, Arora R, Bangalore P, Mernik M, Gray J (2010) Raising the level of abstraction of gpu-programming. In: Proceedings of the international conference on parallel and distributed processing techniques and applications, Las Vegas, NV, pp 339–345 Google Scholar
  25. 25.
    Jacob F, Sun Y, Gray J, Bangalore P (2011) A platform-independent tool for modeling parallel programs. In: Proceedings of the ACM southeast regional conference, Kennesaw, GA, pp 138–143 Google Scholar
  26. 26.
    Jacob F, Wagner A, Bahri P, Vrbsky S, Gray J (2011) Simplifying the development and deployment of MapReduce algorithms. J Next-Gener Comput 2(2):123–142 Google Scholar
  27. 27.
    Jacob F, Whittaker D, Thapaliya S, Bangalore P, Mernik M, Gray J (2010) CUDACL: a tool for CUDA and OpenCL programmers. In: Proceedings of the international conference of high performance computing, Goa, India, pp 1–11 CrossRefGoogle Scholar
  28. 28.
    Jouault F, Bézivin J, Consel C, Kurtev I, Latry F (2006) Building DSLs with AMMA/ATL, a case study on SPL and CPL telephony languages. In: Proceedings of the workshop on domain-specific program development, Nantes, France, p 4 Google Scholar
  29. 29.
    Kamiya T, Kusumoto S, Inoue K (2002) CCFinder: a multilinguistic token-based code clone detection system for large scale source code. IEEE Trans Softw Eng 28(7):654–670 CrossRefGoogle Scholar
  30. 30.
    Kelly DF (2007) A Software chasm: software engineering and scientific computing. IEEE Softw 24(6):119–120 CrossRefGoogle Scholar
  31. 31.
    Kendall R, Carver J, Fisher D, Henderson D, Mark A, Post D, Rhoades C, Squires S (2008) Development of a weather forecasting code: a case study. IEEE Softw 25(4):59–65 CrossRefGoogle Scholar
  32. 32.
    Kessler CW (1995) Pattern-driven automatic program transformation and parallelization. In: Proceedings of the workshop on parallel and distributed processing, San Remo, Italy, p 76 Google Scholar
  33. 33.
    Lédeczi A, Bakay A, Maróti M, Völgyesi P, Nordstrom G, Sprinkle J, Karsai G (2001) Composing domain-specific design environments. Computer 34(11):44–51 CrossRefGoogle Scholar
  34. 34.
    Lee S, Min SJ, Eigenmann R (2009) OpenMP to GPGPU: a compiler framework for automatic translation and optimization. In: Proceedings of the international symposium on principles and practice of parallel programming, Raleigh, NC, pp 101–110 Google Scholar
  35. 35.
    Martino BD, Iannello G (1996) PAP recognizer: a tool for automatic recognition of parallelizable patterns. In: Proceedings of the international workshop on program comprehension, Berlin, Germany, p 164 Google Scholar
  36. 36.
    Mathe JL, Martin J, Miller P, Lédeczi A, Weavind L, Nadas A, Miller A, Maron D, Sztipanovits J (2009) A model integrated guideline-driven, clinical decision-support system. IEEE Softw 26(4):54–61 CrossRefGoogle Scholar
  37. 37.
    Mernik M, Heering J, Sloane AM (2005) When and how to develop domain-specific languages. ACM Comput Surv 37(4):316–344 CrossRefGoogle Scholar
  38. 38.
    Meyer B (1988) Object-oriented software construction. Prentice-Hall, New York Google Scholar
  39. 39.
    Owens JD, Luebke D, Govindaraju N, Harris M, Krüger J, Lefohn AE, Purcell TJ (2007) A survey of general-purpose computation on graphics hardware. Comput Graph Forum 26(1):80–113 CrossRefGoogle Scholar
  40. 40.
    Parr TJ (2004) Enforcing strict model-view separation in template engines. In: Proceedings of the international conference on world wide web, New York, NY, pp 224–233 Google Scholar
  41. 41.
    Pennycook SJ, Hammond SD, Jarvis SA, Mudalige GR (2011) Performance analysis of a hybrid MPI/CUDA implementation of the NASLU benchmark. ACM SIGMETRICS Perform Eval Rev 38(4):23–29 CrossRefGoogle Scholar
  42. 42.
    Pike R, Dorward S, Griesemer R, Quinlan S (2005) Interpreting the data: parallel analysis with Sawzall. Sci Program 13(4):277–298 Google Scholar
  43. 43.
    tPPModel Project Site (2011) http://sites.google.com/site/tppmodel. [Online]
  44. 44.
    Rakić PS, Milašinović DD, Živanov Ž., Suvajdžin Z, Nikolić M, Hajduković M (2011) MPI-CUDA parallelization of a finite-strip program for geometric nonlinear analysis: a hybrid approach. Adv Eng Softw 42(5):273–285 MATHCrossRefGoogle Scholar
  45. 45.
    Sanders R, Kelly D (2008) Dealing with risk in scientific software development. IEEE Softw 25(4):18–20 CrossRefGoogle Scholar
  46. 46.
    Schmidt D (2006) Model-driven engineering. Computer 39(2):25–32 CrossRefGoogle Scholar
  47. 47.
    Segal J (2007) Some problems of professional end user developers. In: Proceedings of the IEEE symposium on visual languages and humancentric computing, Coeur d’Alene, ID, pp 111–118 CrossRefGoogle Scholar
  48. 48.
    Segal J, Morris C (2008) Developing scientific software. IEEE Softw 25(4):18–20 CrossRefGoogle Scholar
  49. 49.
    Sprinkle J, Mernik M, Tolvanen JP, Spinellis D (2009) Guest Editors’ introduction: what kinds of nails need a Domain-Specific hammer? IEEE Softw 26(4):15–18 CrossRefGoogle Scholar
  50. 50.
    Sun Y, Demirezen Z, Jouault F, Tairas R, Gray J (2008) A model engineering approach to tool interoperability. In: Proceedings of the international conference on software language engineering, tool demonstration, Toulouse, France, pp 178–187 Google Scholar
  51. 51.
    Ueng SZ, Lathara M, Baghsorkhi SS, Hwu WMW (2008) CUDA-Lite: reducing GPU programming complexity. In: Proceedings of the international workshop on languages and compilers for parallel computing, Edmonton, Canada, pp 1–15 CrossRefGoogle Scholar
  52. 52.
    Wilson G (2006) Where’s the real bottleneck in scientific computing? Am Sci 94(1):4 CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2012

Authors and Affiliations

  • Ferosh Jacob
    • 1
  • Jeff Gray
    • 1
  • Jeffrey C. Carver
    • 1
  • Marjan Mernik
    • 2
  • Purushotham Bangalore
    • 3
  1. 1.Department of Computer ScienceUniversity of AlabamaTuscaloosaUSA
  2. 2.Faculty of Electrical Engineering and Computer ScienceUniversity of MariborMariborSlovenia
  3. 3.Department of Information and Computer SciencesUniversity of Alabama at BirminghamBirminghamUSA

Personalised recommendations