Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more...

55
Anisotropic elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 el` ene BARUCQ, Julien DIAZ – INRIA Magique3D, Pau Henri CALANDRA – TOTAL E&P, Houston Emmanuel AGULLO – INRIA Hiepacs, Bordeaux George BOSILCA – ICL, University of Tennessee Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 1 / 46

Transcript of Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more...

Page 1: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Anisotropic elastic waves orhow to model the subsurface more realistically

GdT INRIA Magique3D, 24 November 2014

Helene BARUCQ, Julien DIAZ – INRIA Magique3D, PauHenri CALANDRA – TOTAL E&P, HoustonEmmanuel AGULLO – INRIA Hiepacs, BordeauxGeorge BOSILCA – ICL, University of Tennessee

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 1 / 46

Page 2: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

1 DIP context

2 Math. contributionIntroductionABC for iso/VTIABC for TTIResults

3 HPC contributionIntroductionDIVA issue in MPITask-based programmingResults

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 2 / 46

Page 3: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

DIP context

Outline

1 DIP context

2 Math. contributionIntroductionABC for iso/VTIABC for TTIResults

3 HPC contributionIntroductionDIVA issue in MPITask-based programmingResults

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 3 / 46

Page 4: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

DIP context

Geophysics context

Upstream:

Searching for underground oil and gas (Seismic Imaging)

Drilling and operating the wells (Reservoir simulation)

Midstream: transportation, storage and wholesale marketing

Downstream: refining and purifying, marketing and distribution

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 4 / 46

Page 5: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

DIP context

Main SI techniques

Kirchhoff / Gaussian Beam

old techniques (pre-study, approximated)

depth migration algorithms

simplified: vertical propagation

Reverse Time Migration (RTM)

current widely used technique

depth migration algorithm

accurate: full wave equation

Full Waveform Inversion (FWI)

upcoming technique

Inverse problem -based

complete: nature of the layers

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 5 / 46

Page 6: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

DIP context

RTM result

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 6 / 46

Page 7: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

DIP context

From the simplest to the most realistic

θ

VTI TTIIso

type (pseudo-)acoustic elastic poor-elastic

waves P P,S1, S2(3D) . . .

isotropy ρ, c ρ,Vp,Vs ρ,Vp,Vs , κ, µVTI ε ε, δ, γ(3D) . . .TTI θ, φ(3D) . . . . . .

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 7 / 46

Page 8: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

DIP context

Equations and implementations

Space discretization

Finite Diff., Discontinuous Galerkin ⇒ (multi-, block-)diagonal matrix

Finite Element, Finite Volume ⇒ random sparse matrix

Time-dependent or harmonic

Time schemes: Leap-Frog, Runge-Kutta, . . .

Freq. solvers: MUMPS, multigrid. . .

1st or 2nd order (auxiliary variable)

source or initial condition (e.g. Ricker)

Hou10ni: DG, time & freq., Gar6more: analytic (Julien)Montjoie: FEM, time & freq. (Marc)DIVA-DG (TOTAL)

TMBM (Simon, Lionel): DG, timeTHBM (Marie, Theo., Flo.): DG, freq.

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 8 / 46

Page 9: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

DIP context

HPC context

From one-way to full-wave

more computations

more storage

From isotropy to TTI

more computations

more storage

Miscellaneous

big data issues (imaging)

uncertainty quantification

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 9 / 46

Page 10: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution

Outline

1 DIP context

2 Math. contributionIntroductionABC for iso/VTIABC for TTIResults

3 HPC contributionIntroductionDIVA issue in MPITask-based programmingResults

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 10 / 46

Page 11: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution Introduction

What TTI is?

Geophysics anisotropy

Earth’s crust (geological layers of rocks) is assumed to be locally polaranisotropic, also called transversely isotropic (TI).

type isotropy Vertical TI Tilted TI

tensor sparse ref. sparse modif. full densewavefronts circles non-circles non-circles3D S waves coupled decoupled decoupled

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 11 / 46

Page 12: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution Introduction

TTI example

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 12 / 46

Page 13: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution Introduction

The problem: PML

Perfectly Matched Layers

Add a surrounding zone

PML are instable in TI

Add a taper zone from TI to iso.

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 13 / 46

Page 14: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution Introduction

Idea: ABC

Absorbing Boundary Condition

No additional zone!

ABC induces spurious waves

Add a taper zone (only one)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 14 / 46

Page 15: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for iso/VTI

Enquist-Majda methodology

Transparent Boundary Condition (TBC)

Fourier transform in the directions parallel to the boundary

ODE: ∂xW + MW = 0, M invertible

(Λi ,Pi ) eigenvalues/eigenvectors of M

W = W0eMx ⇒ TBC

From TBC to ABC: approximation of a pseudo-differential operator

2D isotropic eigenvalues{λp =

√k2 − w2/V 2

p ≈ iwVp

λs =√

k2 − w2/V 2s ≈ iw

Vs

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 15 / 46

Page 16: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for iso/VTI

Enquist-Majda methodology

Transparent Boundary Condition (TBC)

Fourier transform in the directions parallel to the boundary

ODE: ∂xW + MW = 0, M invertible

(Λi ,Pi ) eigenvalues/eigenvectors of M

W = W0eMx ⇒ TBC

From TBC to ABC: approximation of a pseudo-differential operator

2D VTI eigenvalues

λP/S =

√αk2 − βρw2 ±

√γk4 − ηρk2w2 + ξρ2w4

and TTI is worse... ⇒ this methodology seems not usable!

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 15 / 46

Page 17: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for iso/VTI

P-waves and S-waves splitting

Elastic sub-systems

VTI P-waves: ρ∂tvx = ∂xσxx

ρ∂tvz = ∂zσzz

∂tσxx = C11∂xvx + C13∂zvz

∂tσzz = C13∂xvx + C33∂zvz

(1)

VTI S-waves:

ρ∂tvx = ∂xσxx + ∂zσxz

ρ∂tvz = ∂xσxz + ∂zσzz

∂tσxx = −2C66∂zvz

∂tσzz = −2C66∂xvx

∂tσxz = C66(∂xvz + ∂zvx)

(2)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 16 / 46

Page 18: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for iso/VTI

P-waves and S-waves splitting

Elastic sub-systems ABC

VTI P-waves: {σxx ≈ −ρVpκvx

σxz ≈ 0(1)

VTI S-waves: {σxx ≈ 0

σxz ≈ −ρVsvz(2)

Elastic P-S system ABC

{σxx ≈ −ρVpκvx

σxz ≈ −ρVsvz(3)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 16 / 46

Page 19: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

Geometrical point of view

Hypothesis: elliptic anisotropy δ = ε

k⋆x

w

k⋆y

w

1√ρVp

1√ρVp

kx

w

ky

w

1√ρVpκ

1√ρVp

θ

Figure: P-waves slowness curves of isotropic (left) and TTI (right) cases

Circle equation:ρV 2

p κ2k?x

2 + ρV 2p k

?z2 = 1 (4)

Rotated ellipsoid equation:

ρV 2p κ

2(kx cos θ + kz sin θ)2 + ρV 2p (−kx sin θ + kz cos θ)2 = 1 (5)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 17 / 46

Page 20: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

Change of coordinates

Propagation modes k from the geometry:

kx = µ1k?x + µ2k

?z and kz = µ3k

?x + µ4k

?z (6)

Velocity v from the second-order equation:

vx = α1v?x + α2v

?z and vz = α3v

?x + α4v

?z (7)

Stress tensor σ from the first-order equation:

σxx = β1p? and σzz = β2p

? and σxz = β3p? (8)

→ apply the opposite change of coordinate on the isotropic ABCs

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 18 / 46

Page 21: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

Change of coordinates 1/3

Propagation modes

kx = µ1k?x + µ2k

?z and kz = µ3k

?x + µ4k

?z (9)

For a vertical boundary: µ3 = 0 (otherwise µ2 = 0)

Circle equation:ρV 2

p κ2k?x

2 + ρV 2p k

?z2 = 1 (10)

Rotated ellipsoid equation:

ρV 2p κ

2(kx cos θ + kz sin θ)2 + ρV 2p (−kx sin θ + kz cos θ)2 = 1 (11)

µ1 =

√1/(κ2 cos2 θ + sin2 θ)

µ2 = −(κ2 − 1) cos θ sin θ/κ√κ2 cos2 θ + sin2 θ

µ4 = 1κ

√κ2 cos2 θ + sin2 θ

(12)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 19 / 46

Page 22: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

Change of coordinates 2/3

Velocity v

vx = α1v?x + α2v

?z and vz = α3v

?x + α4v

?z (13)

Propagation modes change of coordinates:

kx = µ1k?x + µ2k

?z and kz = µ3k

?x + µ4k

?z (14)

Second-order TTI elastic system, with V = (vx , vz):

ρ∂2t V = [Cxxk2x + Cxzkxkz + Czzk

2z ]V (15)

Second-order isotropic elastic system:

ρ∂2t V? = ρV 2

p [Ixxk2x?

+ Ixzk?x k

?z + Izzk

2z?]V ? (16)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 20 / 46

Page 23: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

Change of coordinates 2/3

Velocity v

vx = α1v?x + α2v

?z and vz = α3v

?x + α4v

?z (13)

Propagation modes change of coordinatesSecond-order TTI elastic systemSecond-order isotropic elastic system

vx =

√ρVp√

κ2 cos2 θ + sin2 θ[−(κ cos2 θ + sin2 θ)v?x − (κ− 1) cos θ sin θv?z ]

vz =

√ρVp√

κ2 cos2 θ + sin2 θ[(κ− 1) cos θ sin θv?x − (κ cos2 θ + sin2 θ)v?z ]

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 20 / 46

Page 24: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

Change of coordinates 3/3

Stress tensor σ

σxx = β1p? and σzz = β2p

? and σxz = β3p? (14)

Propagation modes change of coordinates:

kx = µ1k?x + µ2k

?z and kz = µ3k

?x + µ4k

?z (15)

First-order TTI elastic system:

ρ∂tvx = kxσxx + kzσxz

ρ∂tvz = kxσxz + kzσzz

∂tσxx = C11kxvx + C13kzvz + C16(kxvz + kzvx)

∂tσzz = C13kxvx + C33kzvz + C26(kxvz + kzvx)

∂tσxz = C16kxvx + C26kzvz + C66(kxvz + kzvx)

(16)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 21 / 46

Page 25: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

Change of coordinates 3/3

Stress tensor σ

σxx = β1p? and σzz = β2p

? and σxz = β3p? (14)

First-order isotropic elastic system:ρ∂tvx

? = k?x p?

ρ∂tvz? = k?z p

?

∂tp? = ρV 2

p k?x vx

? + ρV 2p k

?z vz

?

(15)

Velocity v change of coordinates:

vx = α1v?x + α2v

?z and vz = α3v

?x + α4v

?z (16)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 21 / 46

Page 26: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

Change of coordinates 3/3

Stress tensor σ

σxx = β1p? and σzz = β2p

? and σxz = β3p? (14)

Propagation modes change of coordinatesFirst-order TTI elastic systemFirst-order isotropic elastic systemVelocity v change of coordinates

σxx = −√ρVp(κ cos2 θ + sin2 θ)p?

σzz = −√ρVp(κ sin2 θ + cos2 θ)p?

σxz =√ρVp(κ− 1) cos θ sin θp?

(15)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 21 / 46

Page 27: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

TTI ABC formulation

P-wave ABC

Isotropic: {σ∗xx = −ρVpv

∗x

σ∗xz = 0

TTI (change of coordinates):σxx = −ρVpκ cos2 θ+sin2 θ√κ2 cos2 θ+sin2 θ

[(κ cos2 θ + sin2 θ)vx + (κ− 1) cos θ sin θvz

]σxz = −ρVp

(κ−1) cos θ sin θ√κ2 cos2 θ+sin2 θ

[(κ cos2 θ + sin2 θ)vx + (κ− 1) cos θ sin θvz

]S-wave ABC {

σxx = 0

σxz = −ρVsvz

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 22 / 46

Page 28: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution ABC for TTI

Same methodology in 3D

σxx = −√ρVpκ sin2 φ+ cos2 φ(κ cos2 θ + sin2 θ)√

κ2 cos2 θ cos2 φ+ κ2 sin2 φ+ sin2 θ cos2 φ[

+(κ sin2 φ+ cos2 φ(κ cos2 θ + sin2 θ))vx

−(κ− 1) cosφ sinφ sin2 θvy − (κ− 1) cos θ sin θ cosφvz ]

σxz = −√ρVp

(κ− 1) cos θ sin θ cosφ√κ2 cos2 θ cos2 φ+ κ2 sin2 φ+ sin2 θ cos2 φ

[

−(κ sin2 φ+ cos2 φ(κ cos2 θ + sin2 θ))vx

+(κ− 1) cosφ sinφ sin2 θvy + (κ− 1) cos θ sin θ cosφvz ]

σxy = −√ρVp(κ− 1) cosφ sinφ sin2 θ√

κ2 cos2 θ cos2 φ+ κ2 sin2 φ+ sin2 θ cos2 φ[

−(κ sin2 φ+ cos2 φ(κ cos2 θ + sin2 θ))vx

+(κ− 1) cosφ sinφ sin2 θvy + (κ− 1) cos θ sin θ cosφvz ]

(16)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 23 / 46

Page 29: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution Results

TTI results

Figure: Velocity magnitude at different time steps of the simulation

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 24 / 46

Page 30: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Math. contribution Results

TTI ABC versus simple ABCs

TTI medium, with different kind of ABCs:

0.0001

0.001

0.01

0.1

1

10

0 5000 10000 15000

Iterations

ABC typettivtiiso

Figure: TTI ABC versus simple ABCs

⇒ TTI ABC is better than isotropic or VTI ABCs!

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 25 / 46

Page 31: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution

Outline

1 DIP context

2 Math. contributionIntroductionABC for iso/VTIABC for TTIResults

3 HPC contributionIntroductionDIVA issue in MPITask-based programmingResults

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 26 / 46

Page 32: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Introduction

HPC evolution

Monoprocessors: easy to program, automatic updates

Multicores: start thinking parallel, local and remote memories

Accelerators: peak vs real performances, special language

Manycores: at least two levels of parallelism

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 27 / 46

Page 33: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Introduction

The problem: heterogeneity

Classical approach:

MPI over CPUs

CUDA over GPUs

implies:

big programming effort

difficult to maintain

hardware-dependent

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 28 / 46

Page 34: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Introduction

Idea: use a runtime and task-based programming

Runtime system:

abstraction layer

hiding heterogeneity

Scheduler decides:

where to execute

when to execute

Memory manager:

does the transfer

guarantees consistency

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 29 / 46

Page 35: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution DIVA issue in MPI

Discretization

Elastic wave equation (first order){ρ(x)∂tv(x, t) = ∇.σ(x, t)

∂tσ(x, t) = C (x) : ε(v(x, t))(17)

Discontinuous Galerkin with Leap-frog scheme

Iteration on n: Mv

vn+1h − vnh

∆t+ Rσσ

n+1/2h = 0

σn+3/2h − σn+1/2

h

∆t+ Rvv

n+1h = 0

(18)

Mv and Mσ block-diagonal matrices ⇒ easily invertible!

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 30 / 46

Page 36: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution DIVA issue in MPI

Sequential algorithm

Quasi-explicit reformulation{vn+1h = vnh + M−1

v [∆tRσσn+1/2h ]

σn+3/2h = σ

n+1/2h + M−1

σ [∆tRvvn+1h ]

(19)

Algorithme 1 : DIP sequential

Data : Nh,∆t ,Nt

Result : vh, σh

[v1h , σ3/2h ]←Initialization(Nh,∆t);

for n = 1..Nt dofor K = 1..Nh do

vn+1hK

← UpdateVelocity(vnhK , σn+1/2hK

,∆t);

endfor K = 1..Nh do

σn+3/2hK

← UpdateStress(σn+1/2hK

, vn+1hK

,∆t);

end

end

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 31 / 46

Page 37: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution DIVA issue in MPI

Parallel algorithm

Algorithme 2 : DIP parallel

Data : Np,Nh,∆t ,Nt

Result : vh, σh

Nhloc ← DomainDecomposition(Np);

[v1h , σ3/2h ]←Initialization(Nhloc ,∆t);

for n = 1..Nt do

σn+1/2hK

← Communication(σn+1/2hK

);

for K = 1..Nhloc do

vn+1hK

← UpdateVelocity(vnhK , σn+1/2hK

,∆t);

end

vn+1hK

← Communication(vn+1hK

);

for K = 1..Nhloc do

σn+3/2hK

← UpdateStress(σn+1/2hK

, vn+1hK

,∆t);

end

end

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 32 / 46

Page 38: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution DIVA issue in MPI

MPI version = one domain per process

Figure: Domain decomposition example

Load balancing limitations:

order of (discretization of) each cell and direct neighbors

architecture specifications (e.g. SIMD, cache size, . . . )

⇒ not straightforward to estimate the computation time for a domain!

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 33 / 46

Page 39: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution DIVA issue in MPI

Load imbalance example

Figure: Trace analysis of 10 timesteps on 32 MPI processes

Each line represents a core activity during the execution time:

ORANGE – computation of the velocity field

RED – computation of the stress tensor

GREY – waiting time (synchronization)

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 34 / 46

Page 40: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Task-based programming

First step: the DAG (Direct Acyclic Graph)

Sequential code

A← fun1();B ← fun2(A);C ← fun2(A);C ← fun3(B,C );

Describe the functions as tasks

Form the dataflow: specify data dependencies

fun1

fun2

fun2

A C

fun3

BA

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 35 / 46

Page 41: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Task-based programming

Second step: task description

Parametrized model

Task fun1()WRITE A → A Task fun2(1)

→ A Task fun2(2)

Task fun2(n)n=1..2READ A ← A Task fun1()WRITE X → (n==1) ? B Task fun3()

→ (n==2) ? C Task fun3()

Task fun3()READ B ← B Task fun2(1)RW C ← C Task fun2(2)

fun1

fun2

fun2

A C

fun3

BA

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 36 / 46

Page 42: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Task-based programming

Multidomain DAG

Basic COMPUTE and EXCHANGE model:

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 37 / 46

Page 43: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Task-based programming

Multidomain DAG

Basic COMPUTE and EXCHANGE model:

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 37 / 46

Page 44: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Task-based programming

Multidomain DAG

Basic COMPUTE and EXCHANGE model:

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 37 / 46

Page 45: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Task-based programming

Multidomain DAG

Basic COMPUTE and EXCHANGE model:

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 37 / 46

Page 46: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Task-based programming

Multidomain DAG

Basic COMPUTE and EXCHANGE model:

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 37 / 46

Page 47: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Task-based programming

Fine granularity

Figure: Subdivision example

More than one domain per CPU

exhibit deeper parallelism

allow dynamic flexibility

reduce the boundary size

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 38 / 46

Page 48: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Results

Geophysics test case

Realistic test case:

3D elastic

TTI (anisotropy)

multi-layers

Hybrid discretization:

unstructuredtetrahedra

P1-P2-P3 orders

boundary conditions

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 39 / 46

Page 49: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Results

One processor behavior

1

1.05

1.1

1.15

1.2

1 2 4 8

sp

ee

du

p

number of cores

coarse granularityfine granularity /w work-stealingfine granularity w/ work-stealing

1

1.05

1.1

1.15

1.2

1 2 4 8

sp

ee

du

p

number of cores

coarse granularityfine granularity /w work-stealingfine granularity w/ work-stealing

⇒ both fine granularity and work-stealing are essential!

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 40 / 46

Page 50: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Results

ccNUMA machine

8 processors (previous Intel Xeon E7-8837)

Total of 64 CPU cores in ccNUMA architecture

Figure: cache-coherent Non-Uniform Memory Access (ccNUMA) scheme

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 41 / 46

Page 51: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Results

ccNUMA results - efficiency

0.5

0.6

0.7

0.8

0.9

1

1.1

1 8 16 32 64

effic

iency

number of cores

Perfect scalingPaRSEC small meshPaRSEC large mesh

MPI small meshMPI large mesh

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 42 / 46

Page 52: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Results

Trace comparison

Figure: MPI-based t = 2.517s

Figure: PaRSEC version (NUMA-aware, granularity x6) t = 2.060s

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 43 / 46

Page 53: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Results

Architectures

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 44 / 46

Page 54: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

HPC contribution Results

Intel Xeon Phi results - efficiency

0.2

0.4

0.6

0.8

1

1 2 4 8 16 32 60 120 240

effic

iency

number of threads

Perfect scalingPaRSEC large mesh

MPI large meshPaRSEC small mesh

MPI small mesh

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 45 / 46

Page 55: Anisotropic elastic waves or how to model the … elastic waves or how to model the subsurface more realistically GdT INRIA Magique3D, 24 November 2014 H el ene BARUCQ, Julien DIAZ

Conclusion & perspectives

Conclusion & perspectives

Context

Geophysics: Seismic Imaging (waves)

TOTAL collaboration: DIP (TMBM)

Results

TI without additional cost: ABC (with taper) vs PML

(portable) perfect efficiency: task-based vs MPI parallelism

Next

many updates in TMBM

GPU option with OpenACC

Lionel BOILLOT (24-nov-14) Anisotropic elastic wave modeling GdT Magique3D 46 / 46