Skip to main content

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

  • Conference paper

Part of the book series: Communications in Computer and Information Science ((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.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Allen, E., et al.: The Fortress language specification version 1.0. Sun Microsystems (2006)

    Google Scholar 

  2. Anderson, E., et al.: LAPACK Users’ guide, 3rd edn. Society for Industrial and Applied Mathematics, Philadelphia (1999)

    Book  Google Scholar 

  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)

    Article  Google Scholar 

  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. Asanovic, K., et al.: A view of the parallel computing landscape. Communications of the ACM 52(10), 56–67 (2009)

    Article  Google Scholar 

  6. Backus, J.: The history of FORTRAN I, II, and III. SIGPLAN Not. 13(8), 165–180 (1978)

    Article  MathSciNet  Google Scholar 

  7. Blair-Chappell, S., Stokes, A.: Parallel Programming with Intel Parallel Studio XE. John Wiley & Sons, Hoboken (2012)

    Google Scholar 

  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)

    Article  MATH  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Article  Google Scholar 

  11. Chapman, B., Jost, G., Van Der Pas, R.: Using OpenMP: portable shared memory parallel programming. The MIT Press, Cambridge (2007)

    Google Scholar 

  12. Chapman, B., Mehrotra, P., Zima, H.: Programming in Vienna Fortran. Sci. Program. 1(1), 31–50 (1992)

    Google Scholar 

  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. Dolbeau, R., Bihan, S., Bodin, F.: HMPP: A hybrid multi-core parallel programming environment. Technical report, CAPS Enterprise (2007)

    Google Scholar 

  15. Doroshenko, A., Shevchenko, R.: A Rewriting Framework for Rule-Based Programming Dynamic Applications. Fundamenta Informaticae 72(1), 95–108 (2006)

    MATH  Google Scholar 

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

    Chapter  Google Scholar 

  19. Hiranandani, S., Kennedy, K., Tseng, C.-W.: Compiling Fortran D for MIMD distributed-memory machines. Commun. ACM. 35(8), 66–80 (1992)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Article  Google Scholar 

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

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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. Kennedy, K., Allen, J.R.: Optimizing compilers for modern architectures: a dependence-based approach. Morgan Kaufmann, San Francisco (2002)

    Google Scholar 

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

    Article  Google Scholar 

  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)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  34. Liu, X., et al.: Automatic performance debugging of SPMD-style parallel programs. Journal of Parallel and Distributed Computing 71(7), 925–937 (2011)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  36. Numrich, R.W., Reid, J.: Co-array Fortran for parallel programming. ACM SIGPLAN Fortran Forum 17(2), 1–31 (1998)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Article  Google Scholar 

  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)

    Article  Google Scholar 

  41. Portland Group PGI Compiler, http://www.pgroup.com/

  42. Preissl, R., et al.: Transforming MPI source code based on communication patterns. Future Gener. Comput. Syst. 26(1), 147–154 (2010)

    Article  Google Scholar 

  43. Quinlan, D.J.: ROSE compiler infrastructure, http://rosecompiler.org/

  44. Reinders, J.: Intel Threading Building Blocks: outfitting C++ for multi-core processor parallelism. O’Reilly Media, Inc., Sebastopol (2007)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  47. Snir, M., et al.: MPI: The complete reference. MIT Press, Cambridge (1995)

    Google Scholar 

  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)

    Article  Google Scholar 

  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)

    Article  Google Scholar 

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

    Chapter  Google Scholar 

  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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Doroshenko, A., Zhereb, K. (2013). Parallelizing Legacy Fortran Programs Using Rewriting Rules Technique and Algebraic Program Models. In: Ermolayev, V., Mayr, H.C., Nikitchenko, M., Spivakovsky, A., Zholtkevych, G. (eds) ICT in Education, Research, and Industrial Applications. ICTERI 2012. Communications in Computer and Information Science, vol 347. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35737-4_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-35737-4_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-35736-7

  • Online ISBN: 978-3-642-35737-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics