Ivan Tomanović, Srdjan Belošević, Aleksandar Milićević, Nenad Crnomarković, Andrijana Stojanović, Lei Deng, Defu Che
{"title":"CFD Code Parallelization on GPU and the Code Portability","authors":"Ivan Tomanović, Srdjan Belošević, Aleksandar Milićević, Nenad Crnomarković, Andrijana Stojanović, Lei Deng, Defu Che","doi":"10.1002/adts.202400629","DOIUrl":null,"url":null,"abstract":"Goal of this paper is to develop a fully functional parallel Computational Fluid Dynamics (CFD) code that is optimized to run on a single Graphics Processing Unit (GPU). This is achieved by writing the code in FORTRAN and OpenACC (Open Accelerators), providing them with an easily portable, platform independent code. Existing CFD code is significantly modified to allow for parallel asynchronous execution. Also, due to strong recursive dependencies in Tridiagonal Matrix Algorithm (TDMA) solver, it is replaced with Jacobi, which provides fast execution in environments with large number of parallel cores. In this research a computer code for simulation of 2D flow of water through the axisymmetric channel is used as a base for development. The parallel code is executed on GPU, single, and multicore Central Processing Unit (CPU), and the execution times are compared between platforms. Even though that Jacobi solver performs worse on single core computers, compared to its Gauss-seidel counterpart, it is used to provide a baseline for comparison. In this work, it is shown that computation on finer grids takes less time on GPU than on CPU. The computation time increase with the number of cells in grid on GPU should follow the observed linear trend until the GPUs physical limitations are reached depending on memory size and core count.","PeriodicalId":7219,"journal":{"name":"Advanced Theory and Simulations","volume":"86 1","pages":""},"PeriodicalIF":2.9000,"publicationDate":"2024-12-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Advanced Theory and Simulations","FirstCategoryId":"5","ListUrlMain":"https://doi.org/10.1002/adts.202400629","RegionNum":4,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"MULTIDISCIPLINARY SCIENCES","Score":null,"Total":0}
引用次数: 0
Abstract
Goal of this paper is to develop a fully functional parallel Computational Fluid Dynamics (CFD) code that is optimized to run on a single Graphics Processing Unit (GPU). This is achieved by writing the code in FORTRAN and OpenACC (Open Accelerators), providing them with an easily portable, platform independent code. Existing CFD code is significantly modified to allow for parallel asynchronous execution. Also, due to strong recursive dependencies in Tridiagonal Matrix Algorithm (TDMA) solver, it is replaced with Jacobi, which provides fast execution in environments with large number of parallel cores. In this research a computer code for simulation of 2D flow of water through the axisymmetric channel is used as a base for development. The parallel code is executed on GPU, single, and multicore Central Processing Unit (CPU), and the execution times are compared between platforms. Even though that Jacobi solver performs worse on single core computers, compared to its Gauss-seidel counterpart, it is used to provide a baseline for comparison. In this work, it is shown that computation on finer grids takes less time on GPU than on CPU. The computation time increase with the number of cells in grid on GPU should follow the observed linear trend until the GPUs physical limitations are reached depending on memory size and core count.
期刊介绍:
Advanced Theory and Simulations is an interdisciplinary, international, English-language journal that publishes high-quality scientific results focusing on the development and application of theoretical methods, modeling and simulation approaches in all natural science and medicine areas, including:
materials, chemistry, condensed matter physics
engineering, energy
life science, biology, medicine
atmospheric/environmental science, climate science
planetary science, astronomy, cosmology
method development, numerical methods, statistics