Skip to main content
Log in

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

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

Notes

  1. Compute Unified Device Architecture (CUDA), http://www.nvidia.com/cuda.

  2. Message Passing Interface (MPI), http://www.mpi-forum.org/.

  3. Open Multi-Processing (OpenMP), http://www.openmp.org.

  4. NASA Advanced SuperComputing (NAS), http://www.nas.nasa.gov/publications/npb.html.

  5. Classes used to define size in NAS Parallel Benchmarks (NPB): S-216, W-220, A-223, B-225, and C-227.

  6. Open Computing Language (OpenCL), http://www.kronos.org/opencl.

  7. Eclipse, http://www.eclipse.org.

  8. Graphical Modelling Framework (GMF), http://www.eclipse.org/gmf.

  9. Parallel Tools Platform (PTP), http://www.eclipse.org/ptp.

  10. C/C++ Development Tooling (CDT), http://www.eclipse.org/cdt.

  11. Another tool for Language Recognition (ANTLR), http://www.antlr.org.

  12. StringTemplate, http://www.stringtemplate.org.

  13. NAS Parallel Benchmark (NPB), http://www.nas.nasa.gov/Resources/Software/npb.html.

  14. Molecular dynamics simulation using CUDA, http://www-old.amolf.nl/~vanmeel/mdgpu/download2.html.

References

  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. Antoniol G, Villano U, Merlo E, Penta M (2002) Analyzing cloning evolution in the Linux kernel. Inf Softw Technol 44(13):755–765

    Article  Google Scholar 

  3. Appelbe WF, Smith K, McDowell CE (1989) Start/Pat: A parallel-programming toolkit. IEEE Softw 6(4):29–38

    Article  Google Scholar 

  4. Arora R, Bangalore P, Mernik M (2012) Raising the level of abstraction for developing message passing applications. J Supercomput 59(2):1079–1100

    Article  Google Scholar 

  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

    Chapter  Google Scholar 

  6. Atkinson C, Kuhne T (2003) Model-driven development: a metamodeling foundation. IEEE Softw 20(5):36–41

    Article  Google Scholar 

  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. 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. 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. Browne J, Azam M, Sobek S (1989) CODE: a unified approach to parallel programming. IEEE Softw 6(4):10–18

    Article  Google Scholar 

  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

    Article  Google Scholar 

  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

    Article  Google Scholar 

  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. Chandra R, Dagum L, Kohr D, Maydan D, McDonald J, Menon R (2001) Parallel programming in OpenMP. Morgan Kaufmann, San Mateo

    Google Scholar 

  15. Dean J, Ghemawat S (2008) Mapreduce: Simplified data processing on large clusters. Commun ACM 51(1):107–113

    Article  Google Scholar 

  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

    Chapter  Google Scholar 

  17. Di Martino B, Keßler CW (2000) Two program comprehension tools for automatic parallelization. IEEE Concurr 8(1):37–47

    Article  Google Scholar 

  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. 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. 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

    Chapter  Google Scholar 

  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. 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. 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

    Chapter  Google Scholar 

  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. 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. 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. 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

    Chapter  Google Scholar 

  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. 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

    Article  Google Scholar 

  30. Kelly DF (2007) A Software chasm: software engineering and scientific computing. IEEE Softw 24(6):119–120

    Article  Google Scholar 

  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

    Article  Google Scholar 

  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. 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

    Article  Google Scholar 

  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. 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. 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

    Article  Google Scholar 

  37. Mernik M, Heering J, Sloane AM (2005) When and how to develop domain-specific languages. ACM Comput Surv 37(4):316–344

    Article  Google Scholar 

  38. Meyer B (1988) Object-oriented software construction. Prentice-Hall, New York

    Google Scholar 

  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

    Article  Google Scholar 

  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. 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

    Article  Google Scholar 

  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. tPPModel Project Site (2011) http://sites.google.com/site/tppmodel. [Online]

  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

    Article  MATH  Google Scholar 

  45. Sanders R, Kelly D (2008) Dealing with risk in scientific software development. IEEE Softw 25(4):18–20

    Article  Google Scholar 

  46. Schmidt D (2006) Model-driven engineering. Computer 39(2):25–32

    Article  Google Scholar 

  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

    Chapter  Google Scholar 

  48. Segal J, Morris C (2008) Developing scientific software. IEEE Softw 25(4):18–20

    Article  Google Scholar 

  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

    Article  Google Scholar 

  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. 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

    Chapter  Google Scholar 

  52. Wilson G (2006) Where’s the real bottleneck in scientific computing? Am Sci 94(1):4

    Article  Google Scholar 

Download references

Acknowledgements

This work was made possible in part by a grant of high performance computing resources and technical support from the Alabama Supercomputer Authority.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ferosh Jacob.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Jacob, F., Gray, J., Carver, J.C. et al. PPModel: a modeling tool for source code maintenance and optimization of parallel programs. J Supercomput 62, 1560–1582 (2012). https://doi.org/10.1007/s11227-012-0821-7

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-012-0821-7

Keywords

Navigation