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

Institutions

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

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A tale of two codes: CUDA vs OpenACC for mass-zero constrained dynamics

Sergio Decherchi, Alessia Vignolo, Andrea Cavalli, Rodolphe Vuilleumier et al.
The International Journal of High Performance Computing Applications
Parallel Computing and Optimization Techniques
article

A tale of two codes: CUDA vs OpenACC for mass-zero constrained dynamics

Sergio Decherchi, Alessia Vignolo, Andrea Cavalli, Rodolphe Vuilleumier, Filippo Spiga, Claudia Canevari, Alessandro Coretti, Sara Bonella, Taylor J. Baird
article en

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.

The International Journal of High Performance Computing ApplicationsVol. 39(4)
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)
Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung
Industry, innovation and infrastructure
Openalex Percentile: Top 93%
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.