Multilevel Monte Carlo
A few words on concurrency in C++11 Vincent Lemaire
LPMA – UPMC
June 11, 2015
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 1 / 47
Multilevel Monte Carlo A few words on concurrency in C++11 Vincent - - PowerPoint PPT Presentation
Multilevel Monte Carlo A few words on concurrency in C++11 Vincent Lemaire LPMA UPMC June 11, 2015 Vincent Lemaire (LPMA UPMC) Multilevel Monte Carlo June 11, 2015 1 / 47 Introduction 1 Abstract framework and assumptions Monte
LPMA – UPMC
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 1 / 47
1
2
3
4
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 2 / 47
1
2
3
4
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 3 / 47
◮ Bias error expansion (weak error expansion):
◮ Strong approximation error assumption:
2 = E
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 4 / 47
π depending on some parameters π
π
π
π ) = ν(π) N
π)
π ) = N κ(π) where κ(π) = Cost(I1 π)
π is the N-empirical mean of i.d.d. r.v.
π −I0
π ).
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 5 / 47
π is defined for every π∈ Π by
π is unbiased then
π − I0
2 = ν(π) so that
π∈Π
π is biased then
π − I0
2 = ν(π) + µ2(π) where
π
π
π∈Π, |µ(π)|<ε
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 6 / 47
h = 1
N
h satisfies
2α
1 α , N ∗(ε) =
β 2 )2
var(Y0). Furthermore, we have
ε→0
α min
h∈H, |µ(h)|<ε
h ) |c1|
1 α
1 2α var(Y0). Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 7 / 47
[P. 2007, MCMA]
n2 , . . . , Y h nR
2 , . . . , n−α
R ) =
2
R
2
R
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 8 / 47
i
i − nα j )
j − nα i )
R
i
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 9 / 47
h,n = 1
N
h,n
h,n
N
R
h ni
h,n
h,n
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 10 / 47
1 2αR
1 αR , N ∗(ε) =
β 2 )2
h∈H |µ(h)|<ε
h ) ∼
1 2αR
1 αR var(Y0)
1 αR
1 R
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 11 / 47
2
1 R ∼ R
e so that
1 R ∼ e(R+1)
2
1 R ∼ M R−1 2
h,n), j = 1, . . . , R of the random
h,n
R
i Y (j)
h ni
j Tj = w.
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 12 / 47
1
2
3
4
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 13 / 47
R
i = 0.
d
i = 1.
j qj = 1. Let Nj = ⌈qjN⌉.
h,n = R
Nj
h,n
R
Nj
h,n
◮ Multilevel Monte Carlo ≡ R
j=1 Tj = eR
◮ Multilevel Richardson-Romberg ≡ R
j=1 Tj = w
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 14 / 47
h,n ) = R
R
i =0} = N κ(π)
R
R
i =0}.
R
h,n
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 15 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 16 / 47
q∈S+(R)
π0∈Π0 |µ(π0,q∗)|<ε
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 17 / 47
var(Y0). Then the optimally stratified
β 2
R
i
− β
2
i
Tj
i =0
2
1(π0) = µ∗(1 + θh
β 2 )
j (π0) = µ∗θh
β 2
i
− β
2
i
Tj
i =0
2
j=1 q∗ j = 1.
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 18 / 47
R
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 19 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 20 / 47
h∈H |µ(h,q∗)|<ε
h,n
1 2αR
1 αR R | var(Y0)
1 αR
1 R
1 2αR
αR
1 R .
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 21 / 47
h∈H |µ(h,q∗)|<ε
h,n
2α
1 α var(Y0)
α
2α
α
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 22 / 47
ε→0 v(β, ε)×
h∈H,R2 |µ(h,R,q∗)|<ε
h,n
√α
2 log(1/ε) log(M)
1 α )
1 α )
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 23 / 47
ε→0 v(β, ε) ×
h∈H,R2 |µ(h,R,q∗)|<ε
h,n
α
1 α h
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 24 / 47
1
2
3
4
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 25 / 47
1 α h)
1 α h)
1 2αR ε− 1 αR M − R−1 2
β 2 )
β 2
− β
2
j−1 + n − β
2
j
β 2
R
− β
2
j−1 + n − β
2
j
R
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 26 / 47
1 α h)
1 2α ε− 1 α |c1| 1 α M −(R−1)
β 2 )
β 2
− β
2
j−1 + n − β
2
j
β 2
R
− β
2
j−1 + n − β
2
j
R
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 27 / 47
h(M),n
R
R
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 28 / 47
K = ϕ
K
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 29 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 30 / 47
2 [f]2
Lip
2 −
2
R
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 31 / 47
R
2 )
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 32 / 47
2 )(T2−T1)+σ√T2−T1G Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 33 / 47
2−1 2−2 2−3 2−4 2−5 2−6 2−7 2−8 2−9 2−1 2−2 2−3 2−4 2−5 2−6 2−7 2−8 2−9
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 34 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 35 / 47
1
2
3
4
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 36 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 37 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 37 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 38 / 47
2
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 39 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 40 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 40 / 47
std::thread
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 40 / 47
2
4
6
8
10
12
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 41 / 47
2
4
6
8
10
12
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 41 / 47
2
4
6
8
10
12
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 41 / 47
2
4
6
8
10
12
14
16
18
20
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 42 / 47
2
4
6
8
10
12
14
16
18
20
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 42 / 47
2
4
6
8
10
12
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 43 / 47
TLinearEstimator.
nb_threads generator_type
2
4
6
8
10
12
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 43 / 47
2
4
6
8
10
12
14
16
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 44 / 47
2
4
6
8
10
12
14
16
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 44 / 47
2
4
6
8
10
12
14
16
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 44 / 47
2
4
6
8
10
12
14
16
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 44 / 47
TLinearEstimator
2
4
6
8
10
12
14
16
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 44 / 47
2
4
6
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 45 / 47
2
4
6
2
4
6
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 45 / 47
2
4
6
2
4
6
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 45 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 46 / 47
Vincent Lemaire (LPMA – UPMC) Multilevel Monte Carlo June 11, 2015 47 / 47