Skip to main content

An Example of Porting PETSc Applications to Heterogeneous Platforms with OpenACC

  • Conference paper
  • First Online:
Book cover Accelerator Programming Using Directives (WACCPD 2017)

Abstract

In this paper, we document the workflow of our practice to port a PETSc application with OpenACC to a supercomputer, Titan, at Oak Ridge National Laboratory. Our experience shows a few lines of code modifications with OpenACC directives can give us a speedup of 1.34x in a PETSc-based Poisson solver (conjugate gradient method with algebraic multigrid preconditioner). This demonstrates the feasibility of enabling GPU capability in PETSc with OpenACC. We hope our work can serve as a reference to those who are interested in porting their legacy PETSc applications to modern heterogeneous platforms.

This manuscript has been co-authored by UT-Battelle, LLC, under contract DE-AC05-00OR22725 with the US Department of Energy (DOE). The US government retains and the publisher, by accepting the article for publication, acknowledges that the US government retains a nonexclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for US government purposes. DOE will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan (http://energy.gov/downloads/doe-public-access-plan).

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 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 60.00
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. Balay, S., Abhyankar, S., Adams, M.F., Brown, J., Brune, P., Buschelman, K., Dalcin, L., Eijkhout, V., Gropp, W.D., Kaushik, D., Knepley, M.G., McInnes, L.C., Rupp, K., Smith, B.F., Zampini, S., Zhang, H., Zhang, H.: PETSc Web page (2016). http://www.mcs.anl.gov/petsc

  2. PETSc, Applications and Publications. https://www.mcs.anl.gov/petsc/publications/index.html. Accessed 31 Aug 2017

  3. Minden, V., Smith, B.F., Knepley, M.G.: Preliminary implementation of PETSc using GPUs. In: Proceedings of the 2010 International Workshop of GPU Solutions to Multiscale Problems in Science and Engineering (2010)

    Google Scholar 

  4. PETSc. https://bitbucket.org/petsc/petsc. Accessed 31 Aug 2017

  5. OLCF, Titan Cray XK7. https://www.olcf.ornl.gov/computing-resources/titan-cray-xk7/. Accessed 31 Aug 2017

  6. Chuang, P.-Y., Barba, L.A.: Using AmgX to Accelerate PETSc-Based CFD Codes, figshare (2017). https://doi.org/10.6084/m9.figshare.5018774.v1

  7. Chuang, P.-Y., Barba, L.A.: AmgXWrapper: An interface between PETSc and the NVIDIA AmgX library. J. Open Source Softw. 2(16), 280 (2017)

    Article  Google Scholar 

  8. Larkin, J.: Chapter 2: Profile-guided development with OpenACC. In: Farber, R. (ed.) Parallel Programing with OpenACC. Elsevier (2017)

    Google Scholar 

  9. Kraus, J.: Multi-GPU Programming with MPI. In: GTC 2017, San Jose (2017)

    Google Scholar 

  10. OLCF, PETSc-OpenACC. https://github.com/olcf/PETSC-OpenACC. Accessed 31 Aug 2017

  11. Knüpfer, A., et al.: Score-P: a joint performance measurement run-time infrastructure for periscope, scalasca, TAU, and vampir. In: Brunst, H., Müller, M., Nagel, W., Resch, M. (eds.) Tools for High Performance Computing 2011. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31476-6_7

    Google Scholar 

  12. NVIDIA, Profiler User’s Guide. http://docs.nvidia.com/cuda/profiler-users-guide. Accessed 24 Aug 2017

  13. Mesnard, O., Barba, L.A.: Reproducible and replicable computational fluid dynamics: it’s harder than you think. Comput. Sci. Eng. 19(4), 44–55 (2017)

    Article  Google Scholar 

Download references

Acknowledgement

This research used resources of the Oak Ridge Leadership Computing Facility at Oak Ridge National Laboratory, which is supported by the Office of Science of the Department of Energy under Contract DE-AC05-00OR22725.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pi-Yueh Chuang .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Chuang, PY., Foertter, F.S. (2018). An Example of Porting PETSc Applications to Heterogeneous Platforms with OpenACC. In: Chandrasekaran, S., Juckeland, G. (eds) Accelerator Programming Using Directives. WACCPD 2017. Lecture Notes in Computer Science(), vol 10732. Springer, Cham. https://doi.org/10.1007/978-3-319-74896-2_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-74896-2_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-74895-5

  • Online ISBN: 978-3-319-74896-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics