全部 标题 作者
关键词 摘要

OALib Journal期刊
ISSN: 2333-9721
费用:99美元

查看量下载量

相关文章

更多...

SPOT: A DSL for Extending Fortran Programs with Metaprogramming

DOI: 10.1155/2014/917327

Full-Text   Cite this paper   Add to My Lib

Abstract:

Metaprogramming has shown much promise for improving the quality of software by offering programming language techniques to address issues of modularity, reusability, maintainability, and extensibility. Thus far, the power of metaprogramming has not been explored deeply in the area of high performance computing (HPC). There is a vast body of legacy code written in Fortran running throughout the HPC community. In order to facilitate software maintenance and evolution in HPC systems, we introduce a DSL that can be used to perform source-to-source translation of Fortran programs by providing a higher level of abstraction for specifying program transformations. The underlying transformations are actually carried out through a metaobject protocol (MOP) and a code generator is responsible for translating a SPOT program to the corresponding MOP code. The design focus of the framework is to automate program transformations through techniques of code generation, so that developers only need to specify desired transformations while being oblivious to the details about how the transformations are performed. The paper provides a general motivation for the approach and explains its design and implementation. In addition, this paper presents case studies that illustrate the potential of our approach to improve code modularity, maintainability, and productivity. 1. Introduction High performance computing (HPC) provides solutions to problems that demand significant computational power or problems that require fast access and processing of a large amount of data. HPC programs are usually run on systems such as supercomputers, computer clusters, or grids, which can offer excellent computational power by decomposing a large problem into pieces, where ideally all of these pieces can be processed concurrently. In the past decades, the hardware architectures used in HPC have evolved significantly from supercomputers to clusters and grids, while the progress in software development has not progressed at the same rate [1]. In fact, HPC was once the primary domain of scientific computing, but the recent advances in multicore processors as a commodity in most new personal computers are forcing traditional software developers to also develop skills in parallel programming in order to harness the newfound power. The recent advances in hardware capabilities impose higher demands on the software in HPC. In this work, we have investigated a number of challenges in developing HPC software, some of which might be improved with approaches and practices that have long existed in the area

References

[1]  J. Dongarra, “Trends in high-performance computing: a historical overview and examination of future developments,” IEEE Circuits and Devices Magazine, vol. 22, no. 1, pp. 22–27, 2006.
[2]  F. Jacob, S. Yue, J. Gray, and N. Kraft, “Modulo-F: a modularization language for FORTRAN programs,” Journal of Convergence Information Technology, vol. 7, no. 12, pp. 256–263, 2012.
[3]  W. Gropp, E. Lusk, and A. Skjellum, Using MPI: Portable Parallel Programming with the Message Passing Interface, MIT Press, Cambridge, Mass, USA, 1999.
[4]  OpenMP Architecture Review Board, “OpenMP Fortran Application Program Interface Version 2.0,” November 2000, http://www.openmp.org.
[5]  R. Arora, P. Bangalore, and M. Mernik, “Tools and techniques for non-invasive explicit parallelization,” The Journal of Supercomputing, vol. 62, no. 3, pp. 1583–1608, 2012.
[6]  D. Spinellis, “Rational metaprogramming,” IEEE Software, vol. 25, no. 1, pp. 78–79, 2008.
[7]  “Dynamic Code Generation,” http://java.sys-con.com/node/36843.
[8]  I. D. Baxter, C. Pidgeon, and M. Mehlich, “DMS: program transformations for practical scalable software evolution,” in Proceedings of the 26th International Conference on Software Engineering (ICSE '04), pp. 625–634, May 2004.
[9]  J. R. Cordy, “The TXL source transformation language,” Science of Computer Programming, vol. 61, no. 3, pp. 190–210, 2006.
[10]  S. Yue and J. Gray, “OpenFortran: extending Fortran with meta-programming,” in Proceedings of the International Conference for High Performance Computing, Networking, Storage, and Analysis (SC '13), WolfHPC, Denver, Colo, USA, 2013.
[11]  M. Mernik, J. Heering, and A. M. Sloane, “When and how to develop domain-specific languages,” ACM Computing Surveys, vol. 37, no. 4, pp. 316–344, 2005.
[12]  M. Fowler, Domain-Specific languages, Pearson Education, Upper Saddle River, NJ, USA, 2010.
[13]  D. Ghosh, DSLs in Action, Manning Publications, 2010.
[14]  ROSE, http://rosecompiler.org/.
[15]  E. Visser, “Program transformation with Stratego/XT,” in Domain-Specific Program Generation, pp. 216–238, Springer, Berlin, Germany, 2004.
[16]  M. G. van den Brand, A. van Deursen, J. Heering, et al., “The ASF+ SDF meta-environment: a component-based language development environment,” in Compiler Construction, pp. 365–370, Springer, Berlin, Germany, 2001.
[17]  E. Visser, “A survey of strategies in rule-based program transformation systems,” Journal of Symbolic Computation, vol. 40, no. 1, pp. 831–873, 2005.
[18]  S. Burson, G. B. Kotik, and L. Z. Markosian, “A program transformation approach to automating software re-engineering,” in Proceedings of the 14th Annual International Computer Software and Applications Conference (COMPSAC '90), pp. 314–322, Chicago, Ill, USA, November 1990.
[19]  R. M. Fuhrer, A. Kiezun, and M. Keller, “Refactoring in the eclipse JDT: past, present, and future,” in Proceedings of the 2007 1st Workshop on Refactoring Tools, 2007.
[20]  J. Overbey, S. Xanthos, R. Johnson, and B. Foote, “Refactorings for Fortran and high-performance computing,” in Proceedings of the 2nd International Workshop on Software Engineering for High Performance Computing System Applications, pp. 37–39, ACM, 2005.
[21]  A. Pellegrini, “Hijacker: efficient static software instrumentation with applications in high performance computing: poster paper,” in Proceedings of the IEEE International Conference on High Performance Computing and Simulation (HPCS '13), pp. 650–655, Helsinki, Finland, July 2013.
[22]  G. Kiczales, J. Rivieres, and D. Bobrow, The Art of the Metaobject Protocol, MIT Press, 1991.
[23]  G. Kiczales, J. Ashley, L. Rodriguez, A. Vahdat, and D. Bobrow, “Metaobject protocols: why we want them and what else they can do,” in Object-Oriented Programming: The CLOS Perspective, A. Paepcke, Ed., MIT Press, Cambridge, Mass, USA, 1993.
[24]  P. Maes, “Concepts and experiments in computational reflection,” in Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 147–155, Orlando, Fla, USA, December 1987.
[25]  L. DeMichiel and R. Gabriel, “The common Lisp object system an overview,” in European Conference on Object-Oriented Programming, pp. 151–170, Paris, France, 1987.
[26]  S. Chiba, “A metaobject protocol for C++,” in Proceedings of the 10th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA '95), pp. 285–299, Austin, Tex, USA, 1995.
[27]  M. Tatsubori, S. Chiba, M. Killijian, and K. Itano, “OpenJava: a class-based macro system for Java,” in Reflection and Software Engineering, pp. 117–133, Springer, Denver, Colo, USA, 1999.
[28]  E. Loh, “The ideal HPC programming language,” Communications of the ACM, vol. 53, no. 7, pp. 42–47, 2010.
[29]  K. H. Bennett and V. T. Rajlich, “Software maintenance and evolution: a roadmap,” in Proceedings of the Conference on the Future of Software Engineering, pp. 73–87, ACM, 2000.
[30]  G. Kiczales, J. Lamping, A. Mendhekar et al., Aspect-Oriented Programming, Springer, Berlin, Germany, 1997.
[31]  B. Harbulot and J. Gurd, “Using AspectJ to separate concerns in parallel scientific Java code,” in Proceedings of the 3rd International Conference on Aspect-Oriented Software Development (AOSD '04), pp. 122–131, 2004.
[32]  J. Irwin, J. M. Loingtier, J. R. Gilbert et al., “Aspect-oriented programming of sparse matrix code,” in Scientific Computing in Object-Oriented Parallel Environments, pp. 249–256, Springer, Berlin, Germany, 1997.
[33]  P. Kang, E. Tilevich, S. Varadarajan, and N. Ramakrishnan, “Maintainable and reusable scientific software adaptation: democratizing scientific software adaptation,” in Proceedings of the 10th International Conference on Aspect-Oriented Software Development (AOSD '11), pp. 165–176, Pernambuco, Brazil, March 2011.
[34]  S. Roychoudhury, J. Gray, and F. Jouault, “A model-driven framework for aspect weaver construction,” in Transactions on Aspect-Oriented Software Development VIII, vol. 6580 of Lecture Notes in Computer Science, pp. 1–45, Springer, Berlin, Germany, 2011.
[35]  A. Deursen, P. Klint, and J. Visser, “Domain-specific languages,” ACM SIGPLAN Notices, vol. 35, no. 6, pp. 26–36, 2000.
[36]  J. Gray and G. Karsai, “An examination of DSLs for concisely representing model traversals and transformations,” in Proceedings of the 36th Annual Hawaii International Conference on System Sciences, p. 10, IEEE, 2003.
[37]  R. M. Herndon Jr. and V. A. Berzins, “The realizable benefits of a language prototyping language,” IEEE Transactions on Software Engineering, vol. 14, no. 6, pp. 803–809, 1988.
[38]  Z. Devito, N. Joubert, F. Palacios et al., “Liszt: a domain specific language for building portable mesh-based PDE solvers,” in Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC11 '11), ACM, November 2011.
[39]  M. Püschel, J. M. F. Moura, J. R. Johnson et al., “SPIRAL: code generation for DSP transforms,” Proceedings of the IEEE, vol. 93, no. 2, pp. 232–273, 2005.
[40]  Q. Yi, “POET: a scripting language for applying parameterized source-to-source program transformations,” Software: Practice and Experience, vol. 42, no. 6, pp. 675–706, 2012.
[41]  F. N. Demers and J. Malenfant, “Reflection in logic, functional and object-oriented programming: a short comparative study,” in Proceedings of the Workshop on Reflection and Metalevel Architectures and their Applications in AI (IJCAI '95), vol. 95, pp. 29–38, August 1995.
[42]  Open Fortran Parser, http://fortran-parser.sourceforge.net/.
[43]  S. Hanenberg, C. Oberschulte, and R. Unland, “Refactoring of aspect-oriented software,” in Proceedings of the 4th Annual International Conference on Object-Oriented and Internet-Based Technologies, Concepts, and Applications for a Networked World (Net. ObjectDays), pp. 19–35, 2003.
[44]  T. J. Parr and R. W. Quong, “ANTLR: a predicated-LL(k) parser generator,” Software: Practice and Experience, vol. 25, no. 7, pp. 789–810, 1995.
[45]  T. J. Parr, “StringTemplate template engine,” 2004, http://www.stringtemplate.org/.
[46]  M. Eysholdt and H. Behrens, “Xtext: implement your language faster than the quick and dirty way tutorial summary,” in Proceedings of the ACM International Conference Companion on Object Oriented Programming Systems Languages and Applications Companion (SPLASH '10), pp. 307–309, ACM, October 2010.
[47]  K. Furlinger, M. Gerndt, and T. U. Munchen, “ompP: a profiling tool for OpenMP,” in Proceedings of the International Workshop on OpenMP (IWOMP '05), Eugene, Ore, USA, 2005.
[48]  M. Gong, Z. Zhang, and H. A. Jacobsen, “AspeCt-oriented C for systems programming with C,” in Proceedings of the 6th International Conference on Aspect-Oriented Software Development (AOSD '07), March 2007.
[49]  http://people.sc.fsu.edu/~jburkardt/c_src/dijkstra_openmp/dijkstra_openmp.html.
[50]  J. Nickolls, I. Buck, M. Garland, and K. Skadron, “Scalable parallel programming with CUDA,” Queue, vol. 6, no. 2, pp. 40–53, 2008.
[51]  S. Wienke, P. Springer, C. Terboven, and D. Mey, “OpenACC—first experiences with real-world applications,” in Euro-Par 2012 Parallel Processing, pp. 859–870, Springer, Berlin, Germany, 2012.
[52]  R. Koo and S. Toueg, “Checkpointing and rollback-recovery for distributed systems,” IEEE Transactions on Software Engineering, vol. SE-13, no. 1, pp. 23–31, 1987.
[53]  G. Bronevetsky, D. Marques, K. Pingali, and P. Stodghill, “Automated application-level checkpointing of MPI programs,” ACM SIGPLAN Notices, vol. 38, no. 10, pp. 84–94, 2003.
[54]  S. Kalaiselvi and V. Rajaraman, “A survey of checkpointing algorithms for parallel and distributed computers,” Sadhana, vol. 25, no. 5, pp. 489–510, 2000.
[55]  P. Czarnul and M. Fr?czak, “New user-guided and ckpt-based checkpointing libraries for parallel MPI applications,” in Recent Advances in Parallel Virtual Machine and Message Passing Interface, pp. 351–358, Springer, Berlin, Germany, 2005.
[56]  R. Arora, P. Bangalore, and M. Mernik, “A technique for non-invasive application-level checkpointing,” The Journal of Supercomputing, vol. 57, no. 3, pp. 227–255, 2011.
[57]  D. Dice and N. Shavit, “Understanding tradeoffs in software transactional memory,” in Proceedings of the International Symposium on Code Generation and Optimization (CGO '07), pp. 21–33, IEEE, March 2007.
[58]  M. Olszewski, J. Cutler, and J. G. Steffan, “JudoSTM: a dynamic binary-rewriting approach to software transactional memory,” in Proceedings of the 16th International Conference on Parallel Architecture and Compilation Techniques (PACT '07), pp. 365–375, Bra?ov, Romania, September 2007.

Full-Text

comments powered by Disqus

Contact Us

service@oalib.com

QQ:3279437679

WhatsApp +8615387084133

WeChat 1538708413