TY - JOUR
T1 - Efficient magnetohydrodynamic simulations on graphics processing units with CUDA
AU - Wong, Hon Cheng
AU - Wong, Un Hong
AU - Feng, Xueshang
AU - Tang, Zesheng
N1 - Funding Information:
This work is supported by the Science and Technology Development Fund of Macao SAR ( 03/2008/A1 ) and the National High-Technology Research and Development Program of China ( 2010AA122205 ). Xueshang Feng is supported by the National Natural Science Foundation of China ( 40874091 and 40890162 ). The authors would like to thank Dr. Ue-Li Pen and Bijia Pang at the Canadian Institute for Theoretical Astrophysics, University of Toronto for providing the FORTRAN MHD code. Thanks also to Professor Ah Chung Tsoi and Dr. Yuet Ming Lam for their suggestions on the revision of the paper. Special thanks to anonymous reviewers for their constructive and valuable comments that helped us to improve the paper.
PY - 2011/10
Y1 - 2011/10
N2 - Magnetohydrodynamic (MHD) simulations based on the ideal MHD equations have become a powerful tool for modeling phenomena in a wide range of applications including laboratory, astrophysical, and space plasmas. In general, high-resolution methods for solving the ideal MHD equations are computationally expensive and Beowulf clusters or even supercomputers are often used to run the codes that implemented these methods. With the advent of the Compute Unified Device Architecture (CUDA), modern graphics processing units (GPUs) provide an alternative approach to parallel computing for scientific simulations. In this paper we present, to the best of the authors knowledge, the first implementation of MHD simulations entirely on GPUs with CUDA, named GPU-MHD, to accelerate the simulation process. GPU-MHD supports both single and double precision computations. A series of numerical tests have been performed to validate the correctness of our code. Accuracy evaluation by comparing single and double precision computation results is also given. Performance measurements of both single and double precision are conducted on both the NVIDIA GeForce GTX 295 (GT200 architecture) and GTX 480 (Fermi architecture) graphics cards. These measurements show that our GPU-based implementation achieves between one and two orders of magnitude of improvement depending on the graphics card used, the problem size, and the precision when comparing to the original serial CPU MHD implementation. In addition, we extend GPU-MHD to support the visualization of the simulation results and thus the whole MHD simulation and visualization process can be performed entirely on GPUs.
AB - Magnetohydrodynamic (MHD) simulations based on the ideal MHD equations have become a powerful tool for modeling phenomena in a wide range of applications including laboratory, astrophysical, and space plasmas. In general, high-resolution methods for solving the ideal MHD equations are computationally expensive and Beowulf clusters or even supercomputers are often used to run the codes that implemented these methods. With the advent of the Compute Unified Device Architecture (CUDA), modern graphics processing units (GPUs) provide an alternative approach to parallel computing for scientific simulations. In this paper we present, to the best of the authors knowledge, the first implementation of MHD simulations entirely on GPUs with CUDA, named GPU-MHD, to accelerate the simulation process. GPU-MHD supports both single and double precision computations. A series of numerical tests have been performed to validate the correctness of our code. Accuracy evaluation by comparing single and double precision computation results is also given. Performance measurements of both single and double precision are conducted on both the NVIDIA GeForce GTX 295 (GT200 architecture) and GTX 480 (Fermi architecture) graphics cards. These measurements show that our GPU-based implementation achieves between one and two orders of magnitude of improvement depending on the graphics card used, the problem size, and the precision when comparing to the original serial CPU MHD implementation. In addition, we extend GPU-MHD to support the visualization of the simulation results and thus the whole MHD simulation and visualization process can be performed entirely on GPUs.
KW - CUDA
KW - GPUs
KW - MHD simulations
KW - Parallel computing
UR - http://www.scopus.com/inward/record.url?scp=79960053483&partnerID=8YFLogxK
U2 - 10.1016/j.cpc.2011.05.011
DO - 10.1016/j.cpc.2011.05.011
M3 - Article
AN - SCOPUS:79960053483
SN - 0010-4655
VL - 182
SP - 2132
EP - 2160
JO - Computer Physics Communications
JF - Computer Physics Communications
IS - 10
ER -