Skip to main content

Refactoring for Performance with Semantic Patching: Case Study with Recipes

  • Conference paper
  • First Online:
High Performance Computing (ISC High Performance 2021)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 12761))

Included in the following conference series:

Abstract

Development of an HPC simulation code may take years of a domain scientists’ work. Over that timespan, the computing landscape evolves, efficient programming best practices change, APIs of performance libraries change, etc. A moment then comes when the entire codebase requires a thorough performance lift. In the luckiest case, the required intervention is limited to a few hot loops. In practice, much more is needed. This paper describes an activity of programmatic refactoring of \(\approx \)200k lines of C code by means of source-to-source translation. The context is that of a so-called high level support provided to the domain scientist community by a HPC service center. The motivation of this short paper is the immediate reuse potential of these techniques.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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

Institutional subscriptions

References

  1. Anzt, H., et al.: An environment for sustainable research software in Germany and beyond: current state, open challenges, and call for action. F1000Research 9, 295 (2020). https://doi.org/10.12688/f1000research.23224.1

  2. Baruffa, F., Iapichino, L., Hammer, N.J., Karakasis, V.: Performance optimisation of smoothed particle hydrodynamics algorithms for multi/many-core architectures. CoRR ArXiv:abs/1612.06090 (2016). http://arxiv.org/abs/1612.06090

  3. Coccinelle: https://archive.softwareheritage.org/browse/snapshot/207d182d085fcff85a70deb765336ffe63db5c2a/directory/?origin_url=https://github.com/coccinelle/coccinelle

  4. Lawall, J., Muller, G.: Coccinelle: 10 years of automated evolution in the Linux kernel. In: 2018 USENIX Annual Technical Conference, USENIX ATC, pp. 601–614 (2018)

    Google Scholar 

  5. Pennycook, S.J., Hughes, C.J., Smelyanskiy, M.: Optimizing gather/scatter patterns. In: Reinders, J., Jeffers, J. (eds.) High Performance Parallelism Pearls, pp. 143–157. Morgan Kaufmann, Boston (2015). https://doi.org/10.1016/B978-0-12-802118-7.00008-X

  6. Ragagnin, A., et al.: Gadget-3 on GPUs with OpenACC. In: Parallel Computing: Technology Trends, Proceedings of the International Conference on Parallel Computing (ParCo). Advances in Parallel Computing, vol. 36, pp. 209–218. IOS Press (2019). https://doi.org/10.3233/APC200043

  7. Ragagnin, A., Tchipev, N., Bader, M., Dolag, K., Hammer, N.: Exploiting the space filling curve ordering of particles in the neighbour search of Gadget-3. In: Parallel Computing: On the Road to Exascale, Proceedings of the International Conference on Parallel Computing (ParCo). Advances in Parallel Computing, vol. 27, pp. 411–420. IOS Press (2015). https://doi.org/10.3233/978-1-61499-621-7-411

  8. Springel, V.: The cosmological simulation code GADGET-2. MNRAS 364, 1105–1134 (2005). https://doi.org/10.1111/j.1365-2966.2005.09655.x

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Michele Martone .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Martone, M., Lawall, J. (2021). Refactoring for Performance with Semantic Patching: Case Study with Recipes. In: Jagode, H., Anzt, H., Ltaief, H., Luszczek, P. (eds) High Performance Computing. ISC High Performance 2021. Lecture Notes in Computer Science(), vol 12761. Springer, Cham. https://doi.org/10.1007/978-3-030-90539-2_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-90539-2_15

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-90538-5

  • Online ISBN: 978-3-030-90539-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics