A tale of two codes: CUDA vs OpenACC for mass-zero constrained dynamics
- Author(s)
- Alessia Vignolo, Taylor James Baird, Filippo Spiga, Claudia Canevari, Alessandro Coretti, Rodolphe Vuilleumier, Andrea Cavalli, Sara Bonella, Sergio Decherchi
- Abstract
Speed and efficiency of codes for atomistic simulations can be improved through refactoring and tailoring for GPU architectures. This activity, however, comes with associated, often overlooked, costs, namely a reduced readability and flexibility upon optimization and a non-negligible development time. The first element becomes particularly cogent when who carries out the code GPU porting task is not the creator of the algorithm. In this manuscript we investigate these issues by developing and comparing a CUDA (Compute Unified Device Architecture) and an OpenACC version of the MaZe simulative engine, a recently proposed tool for first principles molecular dynamics with interactions computed at the Orbital Free Density Functional level. We developed in approximately the same amount of time the two code bases. Given that this code bears several computational bottlenecks, and given the development time restraints, we ultimately found that OpenACC leads to a code that is not only simpler to maintain, but also faster, as in the OpenACC code base more routines were optimized compared to CUDA.
- Organisation(s)
- Computational and Soft Matter Physics
- External organisation(s)
- Liguria Digitale S.p.A., Italian Institute of Technology, École polytechnique fédérale de Lausanne, NVIDIA Corporation, École Normale Supérieure, Paris
- Journal
- International Journal of High Performance Computing Applications
- Pages
- 1-17
- No. of pages
- 17
- ISSN
- 1094-3420
- DOI
- https://doi.org/10.1177/10943420251331673
- Publication date
- 04-2025
- Peer reviewed
- Yes
- Austrian Fields of Science 2012
- 102022 Software development, 103043 Computational physics, 102031 Theoretical computer science
- Keywords
- ASJC Scopus subject areas
- Software, Theoretical Computer Science, Hardware and Architecture
- Portal url
- https://ucrisportal.univie.ac.at/en/publications/290dd734-e790-4f7c-b1bf-286c20f36afc