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.














Similar content being viewed by others
Notes
Compute Unified Device Architecture (CUDA), http://www.nvidia.com/cuda.
Message Passing Interface (MPI), http://www.mpi-forum.org/.
Open Multi-Processing (OpenMP), http://www.openmp.org.
NASA Advanced SuperComputing (NAS), http://www.nas.nasa.gov/publications/npb.html.
Classes used to define size in NAS Parallel Benchmarks (NPB): S-216, W-220, A-223, B-225, and C-227.
Open Computing Language (OpenCL), http://www.kronos.org/opencl.
Eclipse, http://www.eclipse.org.
Graphical Modelling Framework (GMF), http://www.eclipse.org/gmf.
Parallel Tools Platform (PTP), http://www.eclipse.org/ptp.
C/C++ Development Tooling (CDT), http://www.eclipse.org/cdt.
Another tool for Language Recognition (ANTLR), http://www.antlr.org.
StringTemplate, http://www.stringtemplate.org.
NAS Parallel Benchmark (NPB), http://www.nas.nasa.gov/Resources/Software/npb.html.
Molecular dynamics simulation using CUDA, http://www-old.amolf.nl/~vanmeel/mdgpu/download2.html.
References
Allen R, Kennedy K (1984) Automatic loop interchange. In: Proceedings of the symposium on compiler construction, Montreal, Canada, pp 233–246
Antoniol G, Villano U, Merlo E, Penta M (2002) Analyzing cloning evolution in the Linux kernel. Inf Softw Technol 44(13):755–765
Appelbe WF, Smith K, McDowell CE (1989) Start/Pat: A parallel-programming toolkit. IEEE Softw 6(4):29–38
Arora R, Bangalore P, Mernik M (2012) Raising the level of abstraction for developing message passing applications. J Supercomput 59(2):1079–1100
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
Atkinson C, Kuhne T (2003) Model-driven development: a metamodeling foundation. IEEE Softw 20(5):36–41
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
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
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
Browne J, Azam M, Sobek S (1989) CODE: a unified approach to parallel programming. IEEE Softw 6(4):10–18
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
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
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
Chandra R, Dagum L, Kohr D, Maydan D, McDonald J, Menon R (2001) Parallel programming in OpenMP. Morgan Kaufmann, San Mateo
Dean J, Ghemawat S (2008) Mapreduce: Simplified data processing on large clusters. Commun ACM 51(1):107–113
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
Di Martino B, Keßler CW (2000) Two program comprehension tools for automatic parallelization. IEEE Concurr 8(1):37–47
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
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
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
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
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
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
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
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
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
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
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
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
Kelly DF (2007) A Software chasm: software engineering and scientific computing. IEEE Softw 24(6):119–120
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
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
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
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
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
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
Mernik M, Heering J, Sloane AM (2005) When and how to develop domain-specific languages. ACM Comput Surv 37(4):316–344
Meyer B (1988) Object-oriented software construction. Prentice-Hall, New York
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
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
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
Pike R, Dorward S, Griesemer R, Quinlan S (2005) Interpreting the data: parallel analysis with Sawzall. Sci Program 13(4):277–298
tPPModel Project Site (2011) http://sites.google.com/site/tppmodel. [Online]
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
Sanders R, Kelly D (2008) Dealing with risk in scientific software development. IEEE Softw 25(4):18–20
Schmidt D (2006) Model-driven engineering. Computer 39(2):25–32
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
Segal J, Morris C (2008) Developing scientific software. IEEE Softw 25(4):18–20
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
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
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
Wilson G (2006) Where’s the real bottleneck in scientific computing? Am Sci 94(1):4
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
Corresponding author
Rights 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
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-012-0821-7