This thesis aims to determine the advantages and limitations of using GPU acceleration in Computational Fluid Dynamics (CFD), more specifically in a High-Performance Computing (HPC) environment. Several libraries for scientific applications were developed in CUDA, a programming language and an API developed by Nvidia for the utilization of their GPUs in scientific computing, such as AmgX, a library optimized for the usage of multigrid methods for the solving of sparse linear systems. AmgX can be used in OpenFOAM, usually to accelerate the solving of the pressure equation, which is the most time-consuming part of a simulation. So far, the capabilities of AmgX in OpenFOAM have been mostly tested in benchmark scenarios for a limited number of iterations, so its performance in non-optimized problems is still under investigation. One such problem regards the aerodynamics of the Strait of Messina Bridge’s deck, particularly the determination of the aerodynamic coefficients, which have a strong impact on the aeroelastic behavior of the structure. This work starts with a brief introduction to High-Performance Computing, focusing particularly on the concept of parallelization and the architecture of the Leonardo supercomputer, whose resources were assigned by CINECA; then, the basic concepts of GPU programming and CUDA are outlined, followed by a description of PISO/SIMPLE algorithms and Poisson’s equation in OpenFOAM, and how AmgX can be used to solve it. Finally, benchmark tests on the motorBike tutorial case were carried out, followed by full simulations of the bridge’s deck, to determine the speedup brought by GPU acceleration and eventual discrepancies in the results. Thanks to these tests, it was determined that using AmgX might be beneficial if the mesh is particularly large and non-orthogonal, if the simulation is unsteady, and if the correct solver configuration is used. Moreover, the results of the deck’s simulations proved to be in line with the wind tunnel testing data. However, one major flaw has been noted: if the simulation runs for a large number of iterations, it might eventually run out of virtual memory and crash midway, possibly because AmgX does not allocate enough memory. To prevent this, more GPUs and cores than intended need to be used, implying a noticeable increase in CPU hours.

Lo scopo di questa tesi consiste nel determinare i vantaggi e i limiti nell’utilizzo dell’accelerazione GPU nella fluidodinamica computazionale (CFD), più specificatamente in un contesto di calcolo ad alte prestazioni (HPC). Alcune librerie per applicazioni scientifiche sono state sviluppate in CUDA, un linguaggio di programmazione ed un’API sviluppato da Nvidia per l’utilizzo delle loro GPU nel calcolo scientifico, come ad esempio AmgX, una libreria ottimizzata per l’utilizzo dei metodi multigrid per la risoluzione di sistemi lineari sparsi. AmgX può essere utilizzato in OpenFOAM, solitamente per accelerare la risoluzione dell’equazione della pressione, che è la fase di una simulazione più dispendiosa in termini di tempo. Finora, le capacità di AmgX in OpenFOAM sono state testate principalmente su casi standard per un numero limitato di iterazioni, quindi le sue prestazioni in problemi non ottimizzati sono ancora oggetto di studio. Uno di questi problemi riguarda l’aerodinamica dell’impalcato del Ponte sullo Stretto di Messina, che ha un forte impatto sul comportamento aeroelastico della struttura. La tesi inizia con una breve introduzione al calcolo ad alte prestazioni, facendo enfasi sul concetto di parallelizzazione e sull’architettura del supercomputer Leonardo, le cui risorse sono state assegnate dal CINECA; successivamente, sono stati delineati i concetti base di programmazione su GPU e CUDA, seguiti da una descrizione degli algoritmi PISO/SIMPLE e dell’equazione di Poisson in OpenFOAM, e come AmgX può essere utilizzato per risolverla. Infinte, sono stati effettuati test benchmark sul tutorial motorBike, seguiti da simulazioni complete dell’impalcato del ponte, per determinare l’entità dell’accelerazione con GPU ed eventuali discrepanze nei risultati. Grazie a questi test, è stato possibile confermare che l'utilizzo di AmgX può essere vantaggioso nel caso in cui la mesh sia particolarmente grande e non ortogonale, la simulazione sia instazionaria, e sia utilizzata la corretta configurazione di solver. Inoltre, i risultati delle simulazioni dell’impalcato sono in accordo con i test effettuati in galleria del vento. Tuttavia, è stato notato un importante difetto: se la simulazione venisse eseguita per un numero elevato di iterazioni, la memoria virtuale potrebbe esaurirsi e causarne l’interruzione, poiché probabilmente AmgX non alloca abbastanza memoria. Per ovviare a ciò, devono essere utilizzati più core e GPU del previsto, il che porta ad un consumo maggiore di ore CPU.

CFD analysis of the strait of Messina bridge aided by HPC and GPU acceleration

VRENNA, ANTONIO
2022/2023

Abstract

This thesis aims to determine the advantages and limitations of using GPU acceleration in Computational Fluid Dynamics (CFD), more specifically in a High-Performance Computing (HPC) environment. Several libraries for scientific applications were developed in CUDA, a programming language and an API developed by Nvidia for the utilization of their GPUs in scientific computing, such as AmgX, a library optimized for the usage of multigrid methods for the solving of sparse linear systems. AmgX can be used in OpenFOAM, usually to accelerate the solving of the pressure equation, which is the most time-consuming part of a simulation. So far, the capabilities of AmgX in OpenFOAM have been mostly tested in benchmark scenarios for a limited number of iterations, so its performance in non-optimized problems is still under investigation. One such problem regards the aerodynamics of the Strait of Messina Bridge’s deck, particularly the determination of the aerodynamic coefficients, which have a strong impact on the aeroelastic behavior of the structure. This work starts with a brief introduction to High-Performance Computing, focusing particularly on the concept of parallelization and the architecture of the Leonardo supercomputer, whose resources were assigned by CINECA; then, the basic concepts of GPU programming and CUDA are outlined, followed by a description of PISO/SIMPLE algorithms and Poisson’s equation in OpenFOAM, and how AmgX can be used to solve it. Finally, benchmark tests on the motorBike tutorial case were carried out, followed by full simulations of the bridge’s deck, to determine the speedup brought by GPU acceleration and eventual discrepancies in the results. Thanks to these tests, it was determined that using AmgX might be beneficial if the mesh is particularly large and non-orthogonal, if the simulation is unsteady, and if the correct solver configuration is used. Moreover, the results of the deck’s simulations proved to be in line with the wind tunnel testing data. However, one major flaw has been noted: if the simulation runs for a large number of iterations, it might eventually run out of virtual memory and crash midway, possibly because AmgX does not allocate enough memory. To prevent this, more GPUs and cores than intended need to be used, implying a noticeable increase in CPU hours.
ING - Scuola di Ingegneria Industriale e dell'Informazione
9-apr-2024
2022/2023
Lo scopo di questa tesi consiste nel determinare i vantaggi e i limiti nell’utilizzo dell’accelerazione GPU nella fluidodinamica computazionale (CFD), più specificatamente in un contesto di calcolo ad alte prestazioni (HPC). Alcune librerie per applicazioni scientifiche sono state sviluppate in CUDA, un linguaggio di programmazione ed un’API sviluppato da Nvidia per l’utilizzo delle loro GPU nel calcolo scientifico, come ad esempio AmgX, una libreria ottimizzata per l’utilizzo dei metodi multigrid per la risoluzione di sistemi lineari sparsi. AmgX può essere utilizzato in OpenFOAM, solitamente per accelerare la risoluzione dell’equazione della pressione, che è la fase di una simulazione più dispendiosa in termini di tempo. Finora, le capacità di AmgX in OpenFOAM sono state testate principalmente su casi standard per un numero limitato di iterazioni, quindi le sue prestazioni in problemi non ottimizzati sono ancora oggetto di studio. Uno di questi problemi riguarda l’aerodinamica dell’impalcato del Ponte sullo Stretto di Messina, che ha un forte impatto sul comportamento aeroelastico della struttura. La tesi inizia con una breve introduzione al calcolo ad alte prestazioni, facendo enfasi sul concetto di parallelizzazione e sull’architettura del supercomputer Leonardo, le cui risorse sono state assegnate dal CINECA; successivamente, sono stati delineati i concetti base di programmazione su GPU e CUDA, seguiti da una descrizione degli algoritmi PISO/SIMPLE e dell’equazione di Poisson in OpenFOAM, e come AmgX può essere utilizzato per risolverla. Infinte, sono stati effettuati test benchmark sul tutorial motorBike, seguiti da simulazioni complete dell’impalcato del ponte, per determinare l’entità dell’accelerazione con GPU ed eventuali discrepanze nei risultati. Grazie a questi test, è stato possibile confermare che l'utilizzo di AmgX può essere vantaggioso nel caso in cui la mesh sia particolarmente grande e non ortogonale, la simulazione sia instazionaria, e sia utilizzata la corretta configurazione di solver. Inoltre, i risultati delle simulazioni dell’impalcato sono in accordo con i test effettuati in galleria del vento. Tuttavia, è stato notato un importante difetto: se la simulazione venisse eseguita per un numero elevato di iterazioni, la memoria virtuale potrebbe esaurirsi e causarne l’interruzione, poiché probabilmente AmgX non alloca abbastanza memoria. Per ovviare a ciò, devono essere utilizzati più core e GPU del previsto, il che porta ad un consumo maggiore di ore CPU.
File allegati
File Dimensione Formato  
2024_04_Vrenna.pdf

accessibile in internet solo dagli utenti autorizzati

Descrizione: testo tesi
Dimensione 4.49 MB
Formato Adobe PDF
4.49 MB Adobe PDF   Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/219217