Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pkestene/euler2d_cudafortran
2nd order Godunov solver for 2d Euler equations written in CUDA Fortran and stdpar (standard paralelism)
https://github.com/pkestene/euler2d_cudafortran
cea conservation-laws cuda cuda-fortran euler-equations fortran gpu gpu-computing hydrodynamics nvfortran nvhpc stdpar
Last synced: 4 days ago
JSON representation
2nd order Godunov solver for 2d Euler equations written in CUDA Fortran and stdpar (standard paralelism)
- Host: GitHub
- URL: https://github.com/pkestene/euler2d_cudafortran
- Owner: pkestene
- License: other
- Created: 2015-02-22T19:42:23.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-11-23T13:22:23.000Z (about 1 year ago)
- Last Synced: 2024-01-27T11:04:53.248Z (11 months ago)
- Topics: cea, conservation-laws, cuda, cuda-fortran, euler-equations, fortran, gpu, gpu-computing, hydrodynamics, nvfortran, nvhpc, stdpar
- Language: Fortran
- Homepage:
- Size: 250 KB
- Stars: 31
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![euler2d 350x350](https://github.com/pkestene/euler2d_cudaFortran/blob/master/euler2d.png?raw=true)
# euler2d_cudaFortran
2nd order Godunov solver for 2d Euler equations written in CUDA Fortran
Note: If your more interested into c++ for GPUs, have a look at version using C++/kokkos for performance portability:
https://github.com/pkestene/euler2d_kokkos## Short description
This code solves the 2D Euler equations in a regular cartesian mesh
using a 2nd order godunov-based finite volume scheme.There are actually two version, one is using the so called [cuda fortran](https://developer.nvidia.com/cuda-fortran) programming model, and the other is designed with the newer [fortran standard parallelism](https://developer.nvidia.com/blog/accelerating-fortran-do-concurrent-with-gpus-and-the-nvidia-hpc-sdk/) (stdpar).
## Nvhpc compiler for Cuda Fortran and stdpar
You need to have installed [nvhpc] to build this application. then, e.g
```shell
module load nvhpc/23.11
```By default, nvfortran will detect visible GPU available on the system, and generate code for it.
```shell
# for the cuda fortran version
cd cuf
make
# for the stdpar version
cd stdpar
make
```## Parameter file
Parameters:
edit file test.nmlIn the cuf version, there are two differents variants of the numerical scheme which are different in term of allocated memory. Use parameter implementationVersion = 0 or 1 to change.
Initial condition: a discontinuity along the domain diagonal
## Example of use
./euler2d_gpu ./test.nml
Output:
VTK ascii file using VTK Image Data formatVisualization:
paraview --data=euler2d_..vtiThe cuf version was written in 2013 (with the PGI compiler), and the stdpar version in 2022.
In terms of performance,
- stdpar version is able to run at more than 500 Mcell-updates per seconds on A100, using large domain (2048x2048).
- cuda-fortran version has roughly the same performance (maybe slightly less performant).