Skip to main content

On the Migration of OpenACC-Based Applications into OpenMP 5+

  • Conference paper
  • First Online:
OpenMP in a Modern World: From Multi-device Support to Meta Programming (IWOMP 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13527))

Included in the following conference series:

Abstract

OpenACC* and OpenMP* have been supporting offloading to accelerators for almost a decade now, with OpenACC leading the adoption rate for the usage in the context of accelerated computing. However, as OpenACC only supports limited device vendors, there has been a growing interest in adopting OpenMP for offloading to accelerators, especially now with an increasing number of accelerator vendors supporting OpenMP offload.

Motivated by the recent additions into the OpenMP 5+ specifications and the wider compiler adoption of these versions, we have developed and open-sourced the Intel® Application Migration Tool for OpenACC to OpenMP API. We present the tool in this paper and discuss the singularities and commonalities of both programming models, and then we present the migration tool, discuss its implementation and its limitations, and present successful stories when migrating applications from OpenACC to OpenMP 5+.

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

Notes

  1. 1.

    https://github.com/intel/intel-application-migration-tool-for-openacc-to-openmp.

  2. 2.

    https://www.openmp.org/resources/openmp-compilers-tools.

  3. 3.

    Commit-id be6c54f11564b8cfa185c0e1c5390be57d78a8f1.

  4. 4.

    Estimated results are those not audited by SpecACCEL.

  5. 5.

    Commit-id d957cef81c5e5765a2e9045432845eada980cc79 from https://github.com/UK-MAC/CloverLeaf_OpenACC.

  6. 6.

    advec_cell_kernel.f90 and advec_mom_kernel.f90.

  7. 7.

    https://github.com/UK-MAC/CloverLeaf_OpenMP4.

  8. 8.

    Commit-id 42984a8ce428d54036d6b8a0732f05a046e8f840 (3.1.0r) from https://github.com/predsci/POT3D.

References

  1. ACC2OMP. https://github.com/naromero77/ACC2OMP. Accessed 27 Apr 2022

  2. EPCC OpenACC benchmarks. https://github.com/EPCCed/epcc-openacc-benchmarks. Accessed 11 May 2020

  3. GPUFORT. https://github.com/ROCmSoftwarePlatform/gpufort. Accessed 27 Apr 2022

  4. NAS Parallel Benchmarks. https://www.nas.nasa.gov/software/npb.html. Accessed 11 May 2022

  5. OpenACC specification (2012). https://www.openacc.org/specification. Accessed 16 May 2022

  6. HIP Programming Guide (2022). https://rocmdocs.amd.com/en/latest/Programming_Guides/HIP-GUIDE.html. Accessed 16 May 2022

  7. Beyer, J.C., Stotzer, E.J., Hart, A., de Supinski, B.R.: OpenMP for accelerators. In: Chapman, B.M., Gropp, W.D., Kumaran, K., Müller, M.S. (eds.) IWOMP 2011. LNCS, vol. 6665, pp. 108–121. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21487-5_9

    Chapter  Google Scholar 

  8. Caplan, R.M., Mikic, Z., Linker, J.A.: From MPI to mpi+openacc: Conversion of a legacy FORTRAN PCG solver for the spherical laplace equation. CoRR abs/1709.01126 (2017). http://arxiv.org/abs/1709.01126

  9. Clement, V., Vetter, J.S.: Flacc: Towards OpenACC support for Fortran in the LLVM Ecosystem. In: 2021 IEEE/ACM 7th Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC), pp. 12–19 (2021). https://doi.org/10.1109/LLVMHPC54804.2021.00007

  10. Denny, J.E., Lee, S., Vetter, J.S.: CLACC: translating OpenACC to OpenMP in clang. In: 2018 IEEE/ACM 5th Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC), pp. 18–29 (2018). https://doi.org/10.1109/LLVM-HPC.2018.8639349

  11. Hernandez, O., Ding, W., Joubert, W., Bernholdt, D., Eisenbach, M., Kartsaklis, C.: Porting OpenACC 2.0 to OpenMP 4.0: key similarities and differences (2016). https://openmpcon.org/wp-content/uploads/openmpcon2015-oscar-hernandez-portingacc.pdf. Accessed 27 Apr 2017

  12. Juckeland, G., et al.: SPEC ACCEL: a standard application suite for measuring hardware accelerator performance. In: Jarvis, S.A., Wright, S.A., Hammond, S.D. (eds.) PMBS 2014. LNCS, vol. 8966, pp. 46–67. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-17248-4_3

    Chapter  Google Scholar 

  13. Juckeland, G., et al.: From describing to prescribing parallelism: translating the SPEC ACCEL OpenACC suite to openMP target directives. In: Taufer, M., Mohr, B., Kunkel, J.M. (eds.) ISC High Performance 2016. LNCS, vol. 9945, pp. 470–488. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-46079-6_33

    Chapter  Google Scholar 

  14. Lambert, J., Lee, S., Malony, A., Vetter, J.S.: CCAMP: OpenMP and OpenACC Interoperable Framework. In: Schwardmann, U., et al. (eds.) Euro-Par 2019. LNCS, vol. 11997, pp. 357–369. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-48340-1_28

    Chapter  Google Scholar 

  15. Lee, S., Vetter, J.S.: OpenARC: open accelerator research compiler for directive-based, efficient heterogeneous computing, In: HPDC 2014, Association for Computing Machinery, New York, NY, USA, pp. 115–120 (2014). https://doi.org/10.1145/2600212.2600704

  16. Mallinson, A., Beckingsale, D.A., Gaudin, W., Herdman, J., Levesque, J., Jarvis, S.A.: Cloverleaf: Preparing hydrodynamics codes for exascale. In: Proceedings of the Cray User Group 2013 (2013)

    Google Scholar 

  17. Stotzer, E., et al. OpenMP Technical Report 1 on Directives for Attached Accelerators (2012). https://www.openmp.org/wp-content/uploads/TR1_167.pdf. Accessed 16 May 2022

  18. Sultana, N., Calvert, A., Overbey, J.L., Arnold, G.: From OpenACC to OpenMP 4: toward automatic translation. In: Proceedings of the XSEDE16 Conference on Diversity, Big Data, and Science at Scale. XSEDE16, Association for Computing Machinery, New York, NY, USA (2016). https://doi.org/10.1145/2949550.2949654

Download references

Acknowledgments

We would like to thank Mikko Byckling, Jeongnim Kim, Rakesh Krishnaiyer, Geoff Lowney and Christopher Dahnken for the fruitful discussions while developing this tool.

Notices & Disclaimers. Performance varies by use, configuration and other factors.

Performance results are based on testing as of dates shown in configurations and may not reflect all publicly available updates. See appendix for configuration details. No product or component can be absolutely secure.

Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.

Your costs and results may vary.

Intel does not control or audit third-party data. You should consult other sources to evaluate accuracy.

Intel technologies may require enabled hardware, software or service activation.

© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries.

* Other names and brands may be claimed as the property of others.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Harald Servat .

Editor information

Editors and Affiliations

A Using the Migration Tool on POT3D

A Using the Migration Tool on POT3D

1.1 A.1 Downloading the Migration Tool

figure e

1.2 A.2 Downloading POT3D

figure f

1.3 A.3 Applying the Migration Tool to POT3D

figure g

1.4 A.4 Makefile Example Using Intel Compiler

figure h

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Servat, H., Rossi, G., Duran, A., Narayanaswamy, R. (2022). On the Migration of OpenACC-Based Applications into OpenMP 5+. In: Klemm, M., de Supinski, B.R., Klinkenberg, J., Neth, B. (eds) OpenMP in a Modern World: From Multi-device Support to Meta Programming. IWOMP 2022. Lecture Notes in Computer Science, vol 13527. Springer, Cham. https://doi.org/10.1007/978-3-031-15922-0_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-15922-0_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-15921-3

  • Online ISBN: 978-3-031-15922-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics