Abstract:
The parallel algorithm of icoFoam, a typical incompressible solver of open-source Computational Fluid Dynamics software OpenFOAM, on heterogeneous platforms was studied. A multi-heterogeneous platforms compatible data storage structure was designed for OpenFOAM, and a scheme for porting icoFoam on two mainstream heterogeneous platforms was proposed in conjunction with the Heterogeneous-Computing Interface for Portability (HIP). Meanwhile, an efficient matrix format conversion algorithm was proposed when using the Krylov subspace linear solver in icoFoam, and the coupled hipSPARSE and hipBLAS libraries were implemented to solve the pressure and velocity equations efficiently. Experimental results showed that this unified porting scheme improved the computational efficiency of the icoFoam solver more substantially on both AMD and NVIDIA heterogeneous computing platforms, obtaining 20.5 and 38.4 times acceleration compared to the CPU, respectively.