A tale of two codes: CUDA vs OpenACC for mass-zero constrained dynamics
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.
Authors
- Sergio Decherchi (ORCID: https://orcid.org/0000-0001-8371-2270)
- Alessia Vignolo (ORCID: https://orcid.org/0000-0002-9594-5159)
- Andrea Cavalli (ORCID: https://orcid.org/0000-0002-6370-1176)
- Rodolphe Vuilleumier (ORCID: https://orcid.org/0000-0001-5386-699X)
- Filippo Spiga (ORCID: https://orcid.org/0000-0003-1448-5304)
- Claudia Canevari
- Alessandro Coretti (ORCID: https://orcid.org/0000-0002-7131-3210)
- Sara Bonella (ORCID: https://orcid.org/0000-0003-4131-2513)
- Taylor J. Baird (ORCID: https://orcid.org/0000-0001-8658-8527)
Institutions
- Centre National de la Recherche Scientifique (FR)
- University of Vienna (AT)
- Nvidia (United Kingdom) (GB)
- Université Paris Sciences et Lettres (FR)
- École Normale Supérieure - PSL (FR)
- Italian Institute of Technology (IT)
- Sorbonne Université (FR)
- Azienda Mobilità e Trasporti (IT)
- École Polytechnique Fédérale de Lausanne (CH)
Publication Details
- Journal
- The International Journal of High Performance Computing Applications
- Published
- 2025-04-18
- DOI
- https://doi.org/10.1177/10943420251331673
- Primary Topic
- Parallel Computing and Optimization Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung