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+.
Keywords
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
Commit-id be6c54f11564b8cfa185c0e1c5390be57d78a8f1.
- 4.
Estimated results are those not audited by SpecACCEL.
- 5.
Commit-id d957cef81c5e5765a2e9045432845eada980cc79 from https://github.com/UK-MAC/CloverLeaf_OpenACC.
- 6.
advec_cell_kernel.f90 and advec_mom_kernel.f90.
- 7.
- 8.
Commit-id 42984a8ce428d54036d6b8a0732f05a046e8f840 (3.1.0r) from https://github.com/predsci/POT3D.
References
ACC2OMP. https://github.com/naromero77/ACC2OMP. Accessed 27 Apr 2022
EPCC OpenACC benchmarks. https://github.com/EPCCed/epcc-openacc-benchmarks. Accessed 11 May 2020
GPUFORT. https://github.com/ROCmSoftwarePlatform/gpufort. Accessed 27 Apr 2022
NAS Parallel Benchmarks. https://www.nas.nasa.gov/software/npb.html. Accessed 11 May 2022
OpenACC specification (2012). https://www.openacc.org/specification. Accessed 16 May 2022
HIP Programming Guide (2022). https://rocmdocs.amd.com/en/latest/Programming_Guides/HIP-GUIDE.html. Accessed 16 May 2022
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
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
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
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
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
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
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
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
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
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)
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
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
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
Corresponding author
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
1.2 A.2 Downloading POT3D
1.3 A.3 Applying the Migration Tool to POT3D
1.4 A.4 Makefile Example Using Intel Compiler
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
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)