# A Fast MHD Code for Gravitationally Stratified Media using Graphical Processing Units: SMAUG

- 187 Downloads
- 4 Citations

## Abstract

Parallelization techniques have been exploited most successfully by the gaming/graphics industry with the adoption of graphical processing units (GPUs), possessing hundreds of processor cores. The opportunity has been recognized by the computational sciences and engineering communities, who have recently harnessed successfully the numerical performance of GPUs. For example, parallel magnetohydrodynamic (MHD) algorithms are important for numerical modelling of highly inhomogeneous solar, astrophysical and geophysical plasmas. Here, we describe the implementation of SMAUG, the Sheffield Magnetohydrodynamics Algorithm Using GPUs. SMAUG is a 1–3D MHD code capable of modelling magnetized and gravitationally stratified plasma.

The objective of this paper is to present the numerical methods and techniques used for porting the code to this novel and highly parallel compute architecture. The methods employed are justified by the performance benchmarks and validation results demonstrating that the code successfully simulates the physics for a range of test scenarios including a full 3D realistic model of wave propagation in the solar atmosphere.

## Key words

Numerical simulations magnetohydrodynamics computer unified device architecture graphical processing units NVIDIA Sheffield advanced code the Sheffield magnetohydrodynamics algorithm using GPUs versatile advection code## Notes

### Acknowledgements

MKG acknowledges support from the White Rose Grid e-Science Centre and funding from the EPSRC contract EP/F057644/1. MKG acknowledges the support of NVIDIA for allowing testing of the K20 GPU through its early access program and for the donation of a K20 GPU. RE acknowledges M. Kéray for patient encouragement and is also grateful to NSF, Hungary (OTKA, Ref. No. K83133). The authors thank the Science and Technology Facilities Council (STFC), UK, for the support they received. They also acknowledge Anthony Brookfield and Corporate Information and Computing Services at The University of Sheffield, for the provision of the High Performance Computing Service.

## References

- Chmielewski, P., Srivastava, A. K., Murawski, K., Musielak, Z. E. 2013,
*MNRAS*,**428**, 40–49.Google Scholar - Chmielewski, P., Murawski, K., Musielak, Z. E., Srivastava, A. K. 2014,
*AJ*,**793****(1)**, 43.Google Scholar - Cook, S. 2012,
*CUDA Programming: A Developer’s Guide to Parallel Computing with GPUs*(Applications of GPU Computing Series), Morgan Kaufmann.Google Scholar - Farber, R. 2011, CUDA Application Design and Development, Morgan Kaufmann.Google Scholar
- Fedun, V., Shelyag, S., Verth, G., Mathioudakis, M., Erdélyi, R. 2011b,
*Annales Geophysicae*, 29, 1029.Google Scholar - Fedun, V., Shelyag, S., Erdélyi, R. 2011a,
*AJ*, 727, 17.Google Scholar - Govett, M. 2009, The Fortran-to-CUDA compiler.Google Scholar
- Kestener, P., Fromang, S. 2012,
*Astronomical Society of the Pacific Conference Series*,**459**, 222.Google Scholar - Kirk, D. 2010,
*Programming Massively Parallel Processors: A Hands-on Approach*(Applications of GPU Computing Series), Morgan Kaufmann.Google Scholar - Kirk, D., Hwu,W. 2010,
*Programming Massively Parallel Processors: A Hands-on Approach*, Elsevier Direct.Google Scholar - Lin, L., Ng, C.-S., Bhattacharjee, A. 2011, GPU Accelerated Reduced MHD Simulations of Coronal Loops,
*Twenty Second International Conference on Numerical Simulations of Plasmas*.Google Scholar - Mumford, S., Fedun, V., Erdelyi, R. 2014,
*Generation of Magnetohydrodynamic Waves in Low Solar Atmospheric Flux Tubes by Photospheric Motions*, ArXiv e-prints.Google Scholar - Pang, Bijia, li Pen, Ue, Perrone, Michael 2010,
*Magnetohydrodynamics on Heterogeneous**Architectures*:*A Performance Comparison*.Google Scholar - Schive, H.-Y., Zhang, U.-H., Chiueh, T. 2011,
*Directionally Unsplit Hydrodynamic Schemes with Hybrid MPI/OpenMP/GPU Parallelization in AMR*, ArXiv e-prints.Google Scholar - Sødergaard, Peter, Hansen, Jan Vittrup 1999,
*Numerical Computation with Shocks*.Google Scholar - Taylor, G. 1950,
*Proceedings of the Royal Society: A Mathematical Physical and Engineering Sciences*,**201**, 159.Google Scholar - Vigeesh, G., Fedun, V., Hasan, S. S., Erdélyi, R. 2011, 3
*D**Simulations of Magnetohydrodynamic Waves in the Magnetized Solar Atmosphere*, ArXiv e-prints.Google Scholar - Whitehead, N., Fit-florea, A. 2011,
*Precision and Performance: Floating point and IEEE 754 compliance for NVIDIA GPUs. NVIDIA white paper*,**21****(10)**, 767.Google Scholar - Wienke, S., Springer, P., Terboven, C., an Mey, D. 2012,
*Lecture Notes in Computer Science*,**7484**, 859.Google Scholar - Wolfe, M. 2008,
*Compilers and More: A GPU and Accelerator Programming Model*.Google Scholar - Wong, H. C., Wong, U. H., Feng, X, Tang, Z. 2011,
*Computer Physics Communications*,**182**, 2132.Google Scholar - Zink, B. 2011,
*HORIZON: Accelerated general relativistic magnetohydrodynamics*, ArXiv e-prints.Google Scholar