On the Efficiency of OpenACC-aided GPU-Based FDTD Approach: Application to Lightning Electromagnetic Fields
Abstract
:1. Introduction
2. OpenACC Implementation
2.1. FDTD Algorithm
2.2. Hardware and Software Used
2.3. OpenACC Programming
2.3.1. OpenACC Data Clause
2.3.2. OpenACC Parallelize Loops
- Structure of kernels: The structure of kernels determines a code region that can contain parallelism. However, the automatic parallelization capabilities of the compiler, identification of the loops that are secure enough for parallelization, and acceleration of these loops influence the analysis of the region. The compiler is free to select the best way of mapping the parallelism in the loops onto the hardware [38,45];
- Structure of parallel: If this directive is put in a loop, the programmer claims that the affected parallelization loop is secured and enables the compiler to choose how to schedule the loop iterations on the target accelerator. In this case, the programmer determines the availability of parallelism per se, whereas the decision regarding mapping parallelism onto the accelerator depends on the compiler’s knowledge of the device [38,45].
2.3.3. Save Variable
2.3.4. Optimization by Tuning Number of Vectors
3. Application: Models and Hypotheses Considered for Analysis
4. Performance Analysis
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Balevic, A.; Rockstroh, L.; Tausendfreund, A.; Patzelt, S.; Goch, G.; Simon, S. Accelerating simulations of light scattering based on finite-difference time-domain method with general purpose GPUs. In Proceedings of the 2008 11th IEEE International Conference on Computational Science and Engineering, Sao Paulo, Brazil, 16–18 July 2008; IEEE: Piscataway, NJ, USA; pp. 327–334. [Google Scholar]
- Bracken, E.; Polstyanko, S.; Lambert, N.; Suda, R.; Giannacopulos, D.D. Power aware parallel 3-D finite element mesh refinement performance modeling and analysis with CUDA/MPI on GPU and multi-core architecture. IEEE Trans. Magn. 2012, 48, 335–338. [Google Scholar] [CrossRef] [Green Version]
- Cannon, P.D.; Honary, F. A GPU-accelerated finite-difference time-domain scheme for electromagnetic wave interaction with plasma. IEEE Trans. Antennas Propag. 2015, 63, 3042–3054. [Google Scholar] [CrossRef] [Green Version]
- Chen, Y.; Zuo, S.; Zhang, Y.; Zhao, X.; Zhang, H. Large-scale parallel method of moments on CPU/MIC heterogeneous clusters. IEEE Trans. Antennas Propag. 2017, 65, 3782–3787. [Google Scholar] [CrossRef]
- Fan, T.-Q.; Guo, L.-X.; Liu, W. A novel OpenGL-based MoM/SBR hybrid method for radiation pattern analysis of an antenna above an electrically large complicated platform. IEEE Trans. Antennas Propag. 2015, 64, 201–209. [Google Scholar] [CrossRef]
- Guan, J.; Yan, S.; Jin, J.-M. An accurate and efficient finite element-boundary integral method with GPU acceleration for 3-D electromagnetic analysis. IEEE Trans. Antennas Propag. 2014, 62, 6325–6336. [Google Scholar] [CrossRef]
- Ikuno, S.; Fujita, Y.; Hirokawa, Y.; Itoh, T.; Nakata, S.; Kamitani, A. Large-scale simulation of electromagnetic wave propagation using meshless time domain method with parallel processing. IEEE Trans. Magn. 2013, 49, 1613–1616. [Google Scholar] [CrossRef]
- Kaburcuk, F.; Demir, V.; Elsherbeni, A.Z.; Arvas, E.; Mautz, J.R. Time-Domain Iterative Multiregion Technique for 3-D Scattering and Radiation Problems. IEEE Trans. Antennas Propag. 2016, 64, 1807–1817. [Google Scholar] [CrossRef]
- Masumnia-Bisheh, K.; Forooraghi, K.; Ghaffari-Miab, M.; Furse, C.M. Geometrically Stochastic FDTD Method for Uncertainty Quantification of EM Fields and SAR in Biological Tissues. IEEE Trans. Antennas Propag. 2019, 67, 7466–7475. [Google Scholar] [CrossRef]
- Park, S.-M.; Kim, E.-K.; Park, Y.B.; Ju, S.; Jung, K.-Y. Parallel dispersive FDTD method based on the quadratic complex rational function. IEEE Antennas Wirel. Propag. Lett. 2015, 15, 425–428. [Google Scholar] [CrossRef]
- Sypek, P.; Dziekonski, A.; Mrozowski, M. How to render FDTD computations more effective using a graphics accelerator. IEEE Trans. Magn. 2009, 45, 1324–1327. [Google Scholar] [CrossRef]
- Unno, M.; Aono, S.; Asai, H. GPU-based massively parallel 3-D HIE-FDTD method for high-speed electromagnetic field simulation. IEEE Trans. Electromagn. Compat. 2012, 54, 912–921. [Google Scholar] [CrossRef]
- Wan, J.; Lei, J.; Liang, C.-H. An efficient analysis of large-scale periodic microstrip antenna arrays using the characteristic basis function method. Prog. Electromagn. Res. 2005, 50, 61–81. [Google Scholar] [CrossRef] [Green Version]
- Xu, K.; Fan, Z.; Ding, D.-Z.; Chen, R.-S. GPU accelerated unconditionally stable Crank-Nicolson FDTD method for the analysis of three-dimensional microwave circuits. Prog. Electromagn. Res. 2010, 102, 381–395. [Google Scholar] [CrossRef] [Green Version]
- Zainud-Deen, S.H.; Hassan, E.; Ibrahim, M.S.; Awadalla, K.H.; Botros, A.Z. Electromagnetic scattering using GPU-based finite difference frequency domain method. Prog. Electromagn. Res. 2009, 16, 351–369. [Google Scholar] [CrossRef] [Green Version]
- Micikevicius, P. 3D finite difference computation on GPUs using CUDA. In Proceedings of the 2nd Workshop on General Purpose Processing on Graphics Processing Units, Washington, DC, USA, 8 March 2009; pp. 79–84. [Google Scholar]
- Karami, H.; Rachidi, F.; Rubinstein, M. On practical implementation of electromagnetic models of lightning return-strokes. Atmosphere 2016, 7, 135. [Google Scholar] [CrossRef] [Green Version]
- Li, D.; Azadifar, M.; Rachidi, F.; Rubinstein, M.; Paolone, M.; Pavanello, D.; Metz, S.; Zhang, Q.; Wang, Z. On lightning electromagnetic field propagation along an irregular terrain. IEEE Trans. Electromagn. Compat. 2015, 58, 161–171. [Google Scholar] [CrossRef]
- Li, D.; Luque, A.; Rachidi, F.; Rubinstein, M. Evaluation of Ionospheric D region Parameter Using Simultaneously Measured Lightning Current and 380-km Distant Electric Field. In Proceedings of the AGU Fall Meeting Abstracts, Washington, DC, USA, 10–14 December 2018. [Google Scholar]
- Li, D.; Rachidi, F.; Rubinstein, M. FDTD Modeling of lightning electromagnetic field propagation over mountainous terrain. In Proceedings of the 2019 International Applied Computational Electromagnetics Society Symposium (ACES), Miami, FL, USA, 14–19 April 2019; pp. 1–2. [Google Scholar]
- Li, D.; Rubinstein, M.; Rachidi, F.; Diendorfer, G.; Schulz, W.; Lu, G. Location accuracy evaluation of ToA-based lightning location systems over mountainous terrain. J. Geophys. Res. Atmos. 2017, 122, 11760–11775. [Google Scholar] [CrossRef] [Green Version]
- Mostajabi, A.; Li, D.; Azadifar, M.; Rachidi, F.; Rubinstein, M.; Diendorfer, G.; Schulz, W.; Pichler, H.; Rakov, V.A.; Pavanello, D. Analysis of a bipolar upward lightning flash based on simultaneous records of currents and 380-km distant electric fields. Electr. Power Syst. Res. 2019, 174, 105845. [Google Scholar] [CrossRef]
- Oikawa, T.; Sonoda, J.; Sato, M.; Honma, N.; Ikegawa, Y. Analysis of lightning electromagnetic field on large-scale terrain model using three-dimensional MW-FDTD parallel computation. IJTFM 2012, 132, 44–50. [Google Scholar] [CrossRef]
- Oikawa, T.; Sonoda, J.; Honma, N.; Sato, M. Analysis of Lighting Electromagnetic Field on Numerical Terrain and Urban Model using Three-Dimensional MW-FDTD Parallel Computation. Electronics and Communications in Japan 2017, 100, 76–82. [Google Scholar] [CrossRef]
- Paknahad, J.; Sheshyekani, K.; Rachidi, F. Lightning electromagnetic fields and their induced currents on buried cables. Part I: The effect of an ocean–land mixed propagation path. IEEE Trans. Electromagn. Compat. 2014, 56, 1137–1145. [Google Scholar] [CrossRef]
- Paknahad, J.; Sheshyekani, K.; Rachidi, F.; Paolone, M. Lightning electromagnetic fields and their induced currents on buried 999bles. Part II: The effect of a horizontally stratified ground. IEEE Trans. Electromagn. Compat. 2014, 56, 1146–1154. [Google Scholar] [CrossRef]
- Paknahad, J.; Sheshyekani, K.; Rachidi, F.; Paolone, M.; Mimouni, A. Evaluation of lightning-induced currents on cables buried in a lossy dispersive ground. IEEE Trans. Electromagn. Compat. 2014, 56, 1522–1529. [Google Scholar] [CrossRef]
- Tatematsu, A.; Rachidi, F.; Rubinstein, M. Analysis of electromagnetic fields inside a reinforced concrete building with layered reinforcing bar due to direct and indirect lightning strikes using the FDTD method. IEEE Trans. Electromagn. Compat. 2015, 57, 405–417. [Google Scholar] [CrossRef]
- Tatematsu, A.; Rachidi, F.; Rubinstein, M. A technique for calculating voltages induced on twisted-wire pairs using the FDTD method. IEEE Trans. Electromagn. Compat. 2016, 59, 301–304. [Google Scholar] [CrossRef]
- Karami, H.; Sheshyekani, K.; Rachidi, F. Mixed-potential integral equation for full-wave modeling of grounding systems buried in a lossy multilayer stratified ground. IEEE Trans. Electromagn. Compat. 2017, 59, 1505–1513. [Google Scholar] [CrossRef]
- Šunjerga, A.; Gazzana, D.S.; Poljak, D.; Karami, H.; Sheshyekani, K.; Rubinstein, M.; Rachidi, F. Tower and path-dependent voltage effects on the measurement of grounding impedance for lightning studies. IEEE Trans. Electromagn. Compat. 2018, 61, 409–418. [Google Scholar] [CrossRef]
- Tatematsu, A.; Noda, T. Three-dimensional FDTD calculation of lightning-induced voltages on a multiphase distribution line with the lightning arresters and an overhead shielding wire. IEEE Trans. Electromagn. Compat. 2013, 56, 159–167. [Google Scholar] [CrossRef]
- Pyrialakos, G.; Zygiridis, T.; Kantartzis, N.; Tsiboukis, T. FDTD analysis of 3D lightning problems with material uncertainties on GPU architecture. In Proceedings of the 2014 International Symposium on Electromagnetic Compatibility, Gothenburg, Sweden, 1–4 September 2014; pp. 577–582. [Google Scholar]
- Pyrialakos, G.; Zygiridis, T.; Kantartzis, N.; Tsiboukis, T. GPU-based three-dimensional calculation of lightning-generated electromagnetic fields. In Proceedings of the 2014 International Conference on Numerical Electromagnetic Modeling and Optimization for RF, Microwave, and Terahertz Applications (NEMO), Pavia, Italy, 14–16 May 2014; pp. 1–4. [Google Scholar]
- Pyrialakos, G.G.; Zygiridis, T.T.; Kantartzis, N.V.; Tsiboukis, T.D. GPU-based calculation of lightning-generated electromagnetic fields in 3-D problems with statistically defined uncertainties. IEEE Trans. Electromagn. Compat. 2015, 57, 1556–1567. [Google Scholar] [CrossRef]
- Tatematsu, A. Overview of the three-dimensional FDTD-based surge simulation code VSTL REV. In Proceedings of the 2016 Asia-Pacific International Symposium on Electromagnetic Compatibility (APEMC), Shenzhen, China, 17–21 May 2016; pp. 670–672. [Google Scholar]
- Al-Jarro, A.; Clo, A.; Bagci, H. Implementation of an explicit time domain volume integral equation solver on gpus using openacc. In Proceedings of the 29th International Review of Progress in Applied Computational Electromagnetics, Monterey, CA, USA, 24–28 March 2013. [Google Scholar]
- OpenACC Programming and Best Practices Guide. OpenACC.org, June 2015. Available online: https://www.openacc.org/sites/default/files/inline-files/OpenACC_Programming_Guide_0.pdf (accessed on 8 November 2019).
- Rostami, S.R.M.; Ghaffari-Miab, M. Fast computation of finite difference generated time-domain green’s functions of layered media using OpenAcc on graphics processors. In Proceedings of the 2017 Iranian Conference on Electrical Engineering (ICEE), Tehran, Iran, 2–4 May 2017; pp. 1596–1599. [Google Scholar]
- Rostami, S.R.M.; Ghaffari-Miab, M. Finite difference generated transient potentials of open-layered media by parallel computing using OPENMP, MPI, OPENACC, and CUDA. IEEE Trans. Antennas Propag. 2019, 67, 6541–6550. [Google Scholar] [CrossRef]
- Gedney, S.D. Introduction to the finite-difference time-domain (FDTD) method for electromagnetics. Synth. Lect. Comput. Electromagn. 2011, 6, 1–250. [Google Scholar] [CrossRef]
- Kunz, K.S.; Luebbers, R.J. The Finite Difference Time Domain Method for Electromagnetics; CRC press: Boca Raton, FL, USA, 1993. [Google Scholar]
- The Portland Group—PGI. Available online: https://www.pgroup.com/about/ (accessed on 25 May 2018).
- PGI Community Edition. Available online: https://www.pgroup.com/products/community.htm (accessed on 25 May 2018).
- Chandrasekaran, S.; Juckeland, G. OpenACC for Programmers: Concepts and Strategies; Addison-Wesley Professional: Boston, MA, USA, 2017. [Google Scholar]
- Li, D.; Zhang, Q.; Wang, Z.; Liu, T. Computation of lightning horizontal field over the two-dimensional rough ground by using the three-dimensional FDTD. IEEE Trans. Electromagn. Compat. 2013, 56, 143–148. [Google Scholar] [CrossRef]
- Nucci, C.A. On lightning return stroke models for LEMP calculations. In Proceedings of the 19th International Conference Lightning Protection, Graz, Austria, 25–29 April 1988. [Google Scholar]
- Rachidi, F.; Nucci, C. On the Master, Uman, Lin, Standler and the modified transmission line lightning return stroke current models. J. Geophys. Res. Atmos. 1990, 95, 20389–20393. [Google Scholar] [CrossRef]
- Rachidi, F.; Janischewskyj, W.; Hussein, A.M.; Nucci, C.A.; Guerrieri, S.; Kordi, B.; Chang, J.-S. Current and electromagnetic field associated with lightning-return strokes to tall towers. IEEE Trans. Electromagn. Compat. 2001, 43, 356–367. [Google Scholar] [CrossRef]
- Baba, Y.; Rakov, V.A. Electromagnetic Computation Methods for Lightning Surge Protection Studies; John Wiley & Sons: Hoboken, NJ, USA, 2016. [Google Scholar] [CrossRef]
- Li, D.; Paknahad, J.; Rachidi, F.; Rubinstein, M.; Sheshyekani, K.; Zhang, Q.; Wang, Z. Propagation effects on lightning magnetic fields over hilly and mountainous terrain. In Proceedings of the 2015 IEEE International Symposium on Electromagnetic Compatibility (EMC), Dresden, Germany, 16–22 August 2015; pp. 1436–1440. [Google Scholar]
Name | GeForce GTX 1050 Ti |
---|---|
GPU Architecture | Pascal |
NVIDIA CUDA® Cores | 760 |
Standard Memory | 4 GB GDDR5 |
Memory Speed | 7 Gbps |
Graphics Clock (MHz) | 1290 |
Processor Clock (MHz) | 1392 |
Programming Language | Directive | Runtime(s) | Speed-Up |
---|---|---|---|
C (without optimization) | - | 2231.59 | 1 X |
C (with optimization) | - | 914.98 | 2.43 X |
OpenACC | #pragma ACC parallel loop | 212.55 | 10.49 X |
#pragma ACC kernels loop | 200.21 |
Programming Language | Variable Precision | Runtime(s) | Speed-Up |
---|---|---|---|
C (without optimization) | double | 2231.59 | 1 X |
float | 2269.56 | 0.98 X | |
OpenACC | double | 200.51 | 11.01 X |
float | 111.47 | 20.02 X |
Programming Language | Processing Time(s) | Speed-Up |
---|---|---|
CPU serial C | 2231.59 | 1 X |
OpenAcc | 105.15 | 21.22 X |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mohammadi, S.; Karami, H.; Azadifar, M.; Rachidi, F. On the Efficiency of OpenACC-aided GPU-Based FDTD Approach: Application to Lightning Electromagnetic Fields. Appl. Sci. 2020, 10, 2359. https://doi.org/10.3390/app10072359
Mohammadi S, Karami H, Azadifar M, Rachidi F. On the Efficiency of OpenACC-aided GPU-Based FDTD Approach: Application to Lightning Electromagnetic Fields. Applied Sciences. 2020; 10(7):2359. https://doi.org/10.3390/app10072359
Chicago/Turabian StyleMohammadi, Sajad, Hamidreza Karami, Mohammad Azadifar, and Farhad Rachidi. 2020. "On the Efficiency of OpenACC-aided GPU-Based FDTD Approach: Application to Lightning Electromagnetic Fields" Applied Sciences 10, no. 7: 2359. https://doi.org/10.3390/app10072359
APA StyleMohammadi, S., Karami, H., Azadifar, M., & Rachidi, F. (2020). On the Efficiency of OpenACC-aided GPU-Based FDTD Approach: Application to Lightning Electromagnetic Fields. Applied Sciences, 10(7), 2359. https://doi.org/10.3390/app10072359