Advertisement

Parallelizing Legacy Fortran Programs Using Rewriting Rules Technique and Algebraic Program Models

  • Anatoliy Doroshenko
  • Kostiantyn Zhereb
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 347)

Abstract

We present ongoing research in the area of transforming existing sequential Fortran programs into their parallel equivalents. We propose a semi-automated parallelization approach that uses rewriting rules technique to automate certain steps of the transformation process. A sequential source code is transformed into a parallel code for shared-memory systems, such as multicore processors. Parallelizing and optimizing transformations are formally described as rewriting rules which allows their automated application across the whole source code, and also facilitates their implementation and reuse. Using high-level algebraic models allows to describe program transformations in a more concise and stepwise manner. Performance measurements demonstrate the high efficiency of the obtained parallel programs, compared to the initial sequential programs and also to automated parallelization tools.

Keywords

rewriting rules technique algebraic program models multicore processors Fortran OpenMP 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Allen, E., et al.: The Fortress language specification version 1.0. Sun Microsystems (2006)Google Scholar
  2. 2.
    Anderson, E., et al.: LAPACK Users’ guide, 3rd edn. Society for Industrial and Applied Mathematics, Philadelphia (1999)CrossRefGoogle Scholar
  3. 3.
    Andon, P., Doroshenko, A., Zhereb, K.: Programming high-performance parallel computations: formal models and graphics processing units. Cybernetics and Systems Analysis 47(4), 659–668 (2011)CrossRefGoogle Scholar
  4. 4.
    Andon P.I., Doroshenko, A.Y., Tseitlin, G.O., Yatsenko O.A.: Algebra-algorithmic models and methods of parallel programming. Academperiodika, Kiev (2007) (in Russian)Google Scholar
  5. 5.
    Asanovic, K., et al.: A view of the parallel computing landscape. Communications of the ACM 52(10), 56–67 (2009)CrossRefGoogle Scholar
  6. 6.
    Backus, J.: The history of FORTRAN I, II, and III. SIGPLAN Not. 13(8), 165–180 (1978)MathSciNetCrossRefGoogle Scholar
  7. 7.
    Blair-Chappell, S., Stokes, A.: Parallel Programming with Intel Parallel Studio XE. John Wiley & Sons, Hoboken (2012)Google Scholar
  8. 8.
    Brandes, T., et al.: HPFIT: a set of integrated tools for the parallelization of applications using High Performance Fortran. PART I: HPFIT and the TransTOOL environment. Parallel Comput. 23(1-2), 71–87 (1997)zbMATHCrossRefGoogle Scholar
  9. 9.
    Buttari, A., Dongarra, J., Kurzak, J., Langou, J., Luszczek, P., Tomov, S.: The Impact of Multicore on Math Software. In: Kågström, B., Elmroth, E., Dongarra, J., Waśniewski, J. (eds.) PARA 2006. LNCS, vol. 4699, pp. 1–10. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  10. 10.
    Chamberlain, B.L., Callahan, D., Zima, H.P.: Parallel programmability and the chapel language. International Journal of High Performance Computing Applications 21(3), 291–312 (2007)CrossRefGoogle Scholar
  11. 11.
    Chapman, B., Jost, G., Van Der Pas, R.: Using OpenMP: portable shared memory parallel programming. The MIT Press, Cambridge (2007)Google Scholar
  12. 12.
    Chapman, B., Mehrotra, P., Zima, H.: Programming in Vienna Fortran. Sci. Program. 1(1), 31–50 (1992)Google Scholar
  13. 13.
    Datta, K., et al.: Stencil computation optimization and auto-tuning on state-of-the-art multicore architectures. In: ACM/IEEE Conference on Supercomputing, SC 2008, pp. 1–12. IEEE Press, Piscataway (2008)Google Scholar
  14. 14.
    Dolbeau, R., Bihan, S., Bodin, F.: HMPP: A hybrid multi-core parallel programming environment. Technical report, CAPS Enterprise (2007)Google Scholar
  15. 15.
    Doroshenko, A., Shevchenko, R.: A Rewriting Framework for Rule-Based Programming Dynamic Applications. Fundamenta Informaticae 72(1), 95–108 (2006)zbMATHGoogle Scholar
  16. 16.
    Doroshenko, A., Zhereb, K., Yatsenko, O.: Formal Facilities for Designing Efficient GPU Programs. In: International Conference on Concurrency Specification and Programming (CS&P 2010), Bornicke, pp. 142–153 (2010)Google Scholar
  17. 17.
    Doroshenko, A.Y., Zhereb, K.A., Tyrchak, Y.M., Khatniuk, A.O.: Creating Efficient Parallel Programs in Fortran Using Rewriting Rules Technique. In: International Conference on High-Performance Computations (HPC-UA 2011), Kyiv, pp. 76–83 (2011) (in Russian)Google Scholar
  18. 18.
    Henderson, T., et al.: Experience Applying Fortran GPU Compilers to Numerical Weather Prediction. In: 2011 Symposium on Application Accelerators in High-Performance Computing, pp. 34–41. IEEE Computer Society, Washington (2011)CrossRefGoogle Scholar
  19. 19.
    Hiranandani, S., Kennedy, K., Tseng, C.-W.: Compiling Fortran D for MIMD distributed-memory machines. Commun. ACM. 35(8), 66–80 (1992)CrossRefGoogle Scholar
  20. 20.
    Hoefler, T., Schneider, T.: Communication-centric optimizations by dynamically detecting collective operations. In: 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 305–306. ACM, New York (2012)CrossRefGoogle Scholar
  21. 21.
    Huang, L., Eachempati, D., Hervey, M.W., Chapman, B.: Exploiting global optimizations for OpenMP programs in the OpenUH compiler. SIGPLAN Not. 44(4), 289–290 (2009)CrossRefGoogle Scholar
  22. 22.
    Irigoin, F., Jouvelot, P., Triolet, R.: Semantical interprocedural parallelization: an overview of the PIPS project. In: 5th International Conference on Supercomputing, pp. 244–251. ACM, New York (1991)Google Scholar
  23. 23.
    Ishihara, M., Honda, H.: Development and implementation of an interactive parallelization assistance tool for OpenMP: iPat/OMP. IEICE Transactions on Information and Systems 89(2), 399–407 (2006)CrossRefGoogle Scholar
  24. 24.
    Keir, P., Cockshott, P.W., Richards, A.: Mainstream Parallel Array Programming on Cell. In: Alexander, M., D’Ambra, P., Belloum, A., Bosilca, G., Cannataro, M., Danelutto, M., Di Martino, B., Gerndt, M., Jeannot, E., Namyst, R., Roman, J., Scott, S.L., Traff, J.L., Vallée, G., Weidendorfer, J. (eds.) Euro-Par 2011, Part I. LNCS, vol. 7155, pp. 260–269. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  25. 25.
    Kejariwal, A., et al.: Cache-aware partitioning of multi-dimensional iteration spaces. In: SYSTOR 2009: The Israeli Experimental Systems Conference, pp. 15:1–15:12. ACM, New York (2009)Google Scholar
  26. 26.
    Kennedy, K., Allen, J.R.: Optimizing compilers for modern architectures: a dependence-based approach. Morgan Kaufmann, San Francisco (2002)Google Scholar
  27. 27.
    Kennedy, K., Koelbel, C., Zima, H.: The rise and fall of High Performance Fortran. In: 3rd ACM SIGPLAN Conference on History of Programming Languages (HOPL III), pp. 7:1–7:22. ACM, New York (2007)Google Scholar
  28. 28.
    Kennedy, K., McKinley, K.S., Tseng, C.W.: Interactive parallel programming using the ParaScope Editor. IEEE Transactions on Parallel and Distributed Systems 2(3), 329–341 (1991)CrossRefGoogle Scholar
  29. 29.
    Khavryuchenko, V.D., et al.: Quantum chemical study of polyaromatic hydrocarbons in high multiplicity states. International Journal of Modern Physics B 21(26), 4507–4515 (2007)CrossRefGoogle Scholar
  30. 30.
    Kusano, K., Satoh, S., Sato, M.: Performance Evaluation of the Omni OpenMP Compiler. In: Valero, M., Joe, K., Kitsuregawa, M., Tanaka, H. (eds.) ISHPC 2000. LNCS, vol. 1940, pp. 403–414. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  31. 31.
    Leijen, D., Schulte, W., Burckhardt, S.: The design of a task parallel library. In: 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA 2009), pp. 227–242. ACM, New York (2009)CrossRefGoogle Scholar
  32. 32.
    Liao, C., Quinlan, D.J., Panas, T., de Supinski, B.R.: A ROSE-Based OpenMP 3.0 Research Compiler Supporting Multiple Runtime Libraries. In: Sato, M., Hanawa, T., Müller, M.S., Chapman, B.M., de Supinski, B.R. (eds.) IWOMP 2010. LNCS, vol. 6132, pp. 15–28. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  33. 33.
    Liao, S.-W., et al.: SUIF Explorer: an interactive and interprocedural parallelizer. In: 7th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 37–48. ACM, New York (1999)CrossRefGoogle Scholar
  34. 34.
    Liu, X., et al.: Automatic performance debugging of SPMD-style parallel programs. Journal of Parallel and Distributed Computing 71(7), 925–937 (2011)CrossRefGoogle Scholar
  35. 35.
    Nakao, M., Lee, J., Boku, T., Sato, M.: Productivity and Performance of Global-View Programming with XcalableMP PGAS Language. In: 2012 12th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGrid 2012), pp. 402–409. IEEE Computer Society, Washington (2012)CrossRefGoogle Scholar
  36. 36.
    Numrich, R.W., Reid, J.: Co-array Fortran for parallel programming. ACM SIGPLAN Fortran Forum 17(2), 1–31 (1998)CrossRefGoogle Scholar
  37. 37.
    Oancea, C.E., Rauchwerger, L.: Logical inference techniques for loop parallelization. In: 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 509–520. ACM, New York (2012)CrossRefGoogle Scholar
  38. 38.
    Overbey, J., Xanthos, S., Johnson, R., Foote, B.: Refactorings for Fortran and high-performance computing. In: Proceedings of the Second International Workshop on Software Engineering for High Performance Computing System Applications, pp. 37–39. ACM, New York (2005)CrossRefGoogle Scholar
  39. 39.
    Overbey, J.L., Fotzler, M.J., Kasza, A.J., Johnson, R.E.: A collection of refactoring specifications for Fortran 95. SIGPLAN Fortran Forum 29(3), 11–25 (2010)CrossRefGoogle Scholar
  40. 40.
    Paek, Y., Hoeflinger, J., Padua, D.: Efficient and precise array access analysis. ACM Transactions on Programming Languages and Systems (TOPLAS) 24(1), 65–109 (2002)CrossRefGoogle Scholar
  41. 41.
    Portland Group PGI Compiler, http://www.pgroup.com/
  42. 42.
    Preissl, R., et al.: Transforming MPI source code based on communication patterns. Future Gener. Comput. Syst. 26(1), 147–154 (2010)CrossRefGoogle Scholar
  43. 43.
    Quinlan, D.J.: ROSE compiler infrastructure, http://rosecompiler.org/
  44. 44.
    Reinders, J.: Intel Threading Building Blocks: outfitting C++ for multi-core processor parallelism. O’Reilly Media, Inc., Sebastopol (2007)Google Scholar
  45. 45.
    Rus, S., Pennings, M., Rauchwerger, L.: Sensitivity analysis for automatic parallelization on multi-cores. In: 21st Annual International Conference on Supercomputing (ICS 2007), pp. 263–273. ACM, New York (2007)CrossRefGoogle Scholar
  46. 46.
    Saraswat, V.A., Sarkar, V., von Praun, C.: X10: concurrent programming for modern architectures. In: 12th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, p. 271. ACM, New York (2007)CrossRefGoogle Scholar
  47. 47.
    Snir, M., et al.: MPI: The complete reference. MIT Press, Cambridge (1995)Google Scholar
  48. 48.
    Tinetti, F.G., Méndez, M.: Fortran Legacy software: source code update and possible parallelisation issues. SIGPLAN Fortran Forum 31(1), 5–22 (2012)CrossRefGoogle Scholar
  49. 49.
    Tournavitis, G., Wang, Z., Franke, B., O’Boyle, M.F.P.: Towards a holistic approach to auto-parallelization: integrating profile-driven parallelism detection and machine-learning based mapping. ACM SIGPLAN Notices 44(6), 177–187 (2009)CrossRefGoogle Scholar
  50. 50.
    Vandierendonck, H., Rul, S., De Bosschere, K.: The Paralax infrastructure: automatic parallelization with a helping hand. In: 19th International Conference on Parallel Architectures and Compilation Techniques, pp. 389–400. ACM, New York (2010)Google Scholar
  51. 51.
    Ventroux, N., et al.: SESAM/Par4All: a tool for joint exploration of MPSoC architectures and dynamic dataflow code generation. In: Proceedings of the 2012 Workshop on Rapid Simulation and Performance Evaluation: Methods and Tools, pp. 9–16. ACM, New York (2012)CrossRefGoogle Scholar
  52. 52.
    Whaley, R.C., Dongarra, J.J.: Automatically tuned linear algebra software. In: 1998 ACM/IEEE Conference on Supercomputing, pp. 1–27. IEEE Computer Society, Washington (1998)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Anatoliy Doroshenko
    • 1
  • Kostiantyn Zhereb
    • 1
  1. 1.Institute of Software Systems of National Academy of Sciences of UkraineKyivUkraine

Personalised recommendations