parallelization techniques for lbm free surface …...5 free surface flows with lbm • similar to...

29
1 Nils Thürey , Thomas Pohl , Ulrich Rüde Institute for System-Simulation University of Erlangen-Nürnberg Parallelization Techniques for LBM Free Surface Flows using MPI and OpenMP

Upload: others

Post on 20-Apr-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

1

Nils Thürey , Thomas Pohl , Ulrich RüdeInstitute for System-Simulation

University of Erlangen-Nürnberg

Parallelization Techniques for LBM Free Surface Flows using MPI and OpenMP

Page 2: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

2

Overview

• Introduction

• OpenMP Parallelization

• MPI Parallelization

• Validation Experiment

• Conclusions

Page 3: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

3

Overview

• Introduction

• OpenMP Parallelization

• MPI Parallelization

• Validation Experiment

• Conclusions

Page 4: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

4

Introduction

Simulations with Free Surface Flows

• Applications, e.g.:– Computer graphics: special effects– Engineering: metal foam simulations

• Lattice Boltzmann method:– D3Q19 lattice– BGK collision with Smagorinsky

turbulence model– Grid compression to reduce memory

requirements

Page 5: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

5

Free Surface Flows with LBM

• Similar to Volume-of-Fluid:– Track fill fraction for each cell– Compute mass transfer– Interface with a closed layer of cells

• Extension for adaptive Grids:– Coarse grids for large fluid volumes – Adapt to movement of surface

Details in, e.g.: Lattice Boltzmann Model for Free Surface Flow for Modeling Foaming; C. Körner, M. Thies, T. Hofmann, N. Thürey and U. Rüde; J. Stat. Phys. 121, 2005

Page 6: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

6

Free Surface Flow Example

Page 7: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

7

Example with Moving Objects

Page 8: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

8

Overview

• Introduction

• OpenMP Parallelization

• MPI Parallelization

• Validation Experiment

• Conclusions

Page 9: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

9

OpenMP Parallelization• OpenMP for shared memory architectures

• Partition along y-axis, synchronize layers

Page 10: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

10

OpenMP and Grid-Compression• Problem: dependency of updates

• Use boundary layer: offset to (0,0,+2) instead of (+1,+1,+1)

• Slightly increased memory requirements

Page 11: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

11

OpenMP Performance

• Measurements with 2/4-way Opterons:

Page 12: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

12

Overview

• Introduction

• OpenMP Parallelization

• MPI Parallelization

• Validation Experiment

• Conclusions

Page 13: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

13

MPI Parallelization

• MPI for distributed memory architectures• Partition along x-axis• Transfer boundary layer over the network• No coarsening of boundary layer allowed

Page 14: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

14

MPI Performance• Measurements on 4-way Opterons with

Infiniband interconnect:

Page 15: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

15

MPI Performance with adaptive Grids:• Same Opteron-cluster, with and without adaptive coarsening:

Page 16: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

16

Example Simulation

• Resolution: 880*880*336; 260M cells, 6.5M active on average

Page 17: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

17

Overview

• Introduction

• OpenMP Parallelization

• MPI Parallelization

• Validation Experiment

• Conclusions

Page 18: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

18

Numerical Experiment: Single Rising Bubble

• Implementation only using MPI

• Validation for Metal Forms or e.g. Bubble Reactors

• Comparison to 2D Level-Set Volume of Fluid method

• Modified Parameter of Animation: Surface Tension

Page 19: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

19

Numerical Experiment: Single Rising Bubble

Page 20: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

20

Parallel MPI Performance

Page 21: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

21

Overview

• Introduction

• OpenMP Parallelization

• MPI Parallelization

• Validation Experiment

• Conclusions

Page 22: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

22

Conclusions

• High performance by combining OpenMP and MPI

• Grid compression requires modifications

• Adaptive coarsening is problematic

Page 23: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

23

Page 24: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

24

• Unused slides:

Page 25: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

25

Cell LBM Simulations

• Goal: …

• Available cell systems: – Blades– Playstation 3

Page 26: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

26

Cell Architecture

Page 27: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

27

Cell Performance Measurements

• Implementation issues:• as much as possible work on SPUs• SIMD vectorization, also of bounce-back• memory layout must support alignment

restrictions for DMAs and SIMD

MLSUPS: 1 node full blade PS31 SPU/CPU 40 64 41

2 SPUs/CPU 78 111 783 SPUs/CPU 97 143 854 SPUs/CPU 98 164 85

Page 28: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

28

PerformanceFree surface LBM-Code

Standard LBM-Code

Performance lousy on a single node! Conditionals: 2,9 SLBM 51 free surface LBM

Pentium 4: almost no degradation ~ 10%SR 8000: enormous degradation (pseudo-vector, predictable jumps)

Page 29: Parallelization Techniques for LBM Free Surface …...5 Free Surface Flows with LBM • Similar to Volume-of-Fluid: – Track fill fraction for each cell – Compute mass transfer

29

Numerical Experiment: Single Rising BubbleUNUSED