40
March 2000 1 ALADIN project Algorithmes Adapt ´ es au Calcul Intensif Advanced Algorithms for Scientific Computing Jocelyne Erhel Project leader since 01/09/1997 J. Erhel, ALADIN

Algorithmes Adapt ALADIN project Jocelyne Erhel - … · Algorithmes Adapt ´ es au Calcul Intensif ... Test Asher−Petzold − Méthode de Gauss s=2 − De 4 à 512 pas Erreur globale

Embed Size (px)

Citation preview

March 2000 1

ALADIN project

Algorithmes Adaptes au Calcul Intensif

Advanced Algorithms for Scientific Computing

Jocelyne Erhel

Project leader since 01/09/1997

J. Erhel, ALADIN

March 2000 2

Composition on 31/1/2000

Permanent researchers

Philippe Chartier (CR-INRIA)

Jocelyne Erhel (DR-INRIA)

Bernard Philippe (DR-INRIA)

Claude Simon (MdC, IUT de Lannion)

External collaborators , ingenieur expert , invited

Michel Crouzeix (Professeur, U. de Rennes 1)

Haiscam Abdallah (MdC, U. de Rennes 2)

Olivier Bertrand (completed)

Yann-Herve De Roeck (Ifremer)

M. Sadkane (ex-INRIA) professor at U. Brest since 1997

J-C. Paoletti (ex-SIMULOG) engineer at Transpac, Rennes, since 1998

Ph-D students

IRISA co-encadres co-tutelle

Frederic Guyomarc’h Ahmid Zaoui Dany Mezher

Eric Lapotre Hussein Hoteit Claude Tadonki

J. Erhel, ALADIN

March 2000 3

Completed Ph-D

Ph-D name current status location

March 1996 Robert Erra lecturer ESIEA, Paris

January 1997 Vincent Heuveline researcher U. Heidelberg

October 1997 Pierre-Francois Lavallee engineer CNRS, IDRIS, Paris

November 1997 Sophie Robert engineer SACET, Rennes

December 1997 Anne Aubry PRAG U. Marseille

February 1998 Stephane Chauveau engineer Philips, Eindhoven

March 1998 Nicolas Mallejac engineer CEA, Paris

September 1998 Stephanie Rault computer scientist department of finance

November 1998 Philippe Feat teacher secondary school

January 1999 Mathias Brieu maıtre de conferences U. Lille

January 1999 Olivier Beaumont maıtre de conferences ENS-Lyon

December 1999 Olivier Bertrand post-doc IFP

12 thesis - university:4 - national center:3 - industry:2 - other:3

J. Erhel, ALADIN

March 2000 4

Research context

applied mathematics electromagnetism

scientific computing geophysics

computer science mechanics

multi-disciplinary problems

collaboration between experts of different fields

various levels of involvement in the applications

J. Erhel, ALADIN

March 2000 5

Modelling of flow in a porous mediaH. Hoteit, B. Philippe, J. Erhel - 1999

with IMF in Strasbourg

Modelling Discretisation with Mixed Finite Elements

Partial Differential Equations Algebraic Differential Equation of index 1 (EDA-1)8>>>>><>>>>>:

s ∂p∂t

+ ∇q = f

q = −k∇p

Boundary Conditions (g)

Initial Condition

p : hydraulic load q : Darcy speed

8>><>>:

S dPdt

+ DP − W ∗ T = F

WP − M T = G

Initial Condition

S and D are diagonal

J. Erhel, ALADIN

March 2000 6

Numerical schemes involved

first step : numerical integration of DAE

implicit schemes ensure stability

objective : use a library such as DASSL with variable time step and variable order

second step :large scale linear problem (or nonlinear)

sparse solvers reduce the complexity and the storage

objective : combine a library such as SPARSKIT with DASSL

compare direct and iterative solvers

third step :more complex models

objective : simulate solute transport

J. Erhel, ALADIN

March 2000 7

Statistical error estimation with the toolbox Aquarelsthe result must have 9 significant digits

10−20

10−17

10−14

10−11

10−8

10−5

Amplitude

10−5

10−2

101

104

Est

imat

ion

d’er

reur

Code généré par le calcul formelTriangle [(2.01,2.01),(3+1e−6,.01),(3+1e−5,.01)]

1 2 3 4 5 67 8 9 10

1112

13

14

15

16

Regularite = 1.20

Correlation = 0.95

Conditionnement = 9.50 e+6

only 3 significant digits

The code generated by symbolic software

amplifies rounding errors

when computing the matrix

C =

0BB@

a b c

b d e

c e f

1CCA

−1

using the Cramer formulas

J. Erhel, ALADIN

March 2000 8

A numerically stable computation

10−20

10−17

10−14

10−11

10−8

10−5

Amplitude

10−15

10−12

10−9

10−6

10−3

100

103

Est

imat

ion

d’er

reur

Code avec factorisationTriangle [(2.01,2.01),(3+1e−6,.01),(3+1e−5,.01)]

12

34

56

78

910

1112

1314

15

16

Regularite = 1.05

Correlation = 0.99

Conditionnement = 6.15 e+6

9 significant digits

The Cholesky factorisation

is numerically stable

and is more CPU-efficient

J. Erhel, ALADIN

March 2000 9

Pre-stack depth migration of reflection seismicY-H. De Roeck - 1999

Source

Receivers

Wave front

RaysInterfacesGeological

0

50

100

150

200

250

Mili

-sec

onds

50 100 150 200 250 300 350 400Shots

smavh/Donnees/s8-inter-bmut.ita

Algorithmic goal: efficient sparse linear least squares solver

J. Erhel, ALADIN

March 2000 10

Waveform inversion

Set of parameters for the direct model:

– f : signal wavelet

– ν: slowness, linearized into

– r: reflectivity (fast variations)

– ν0: background propagator

– p: positioning parameters

f

0

p

ν

r

ν

J(f,ν,p) =12‖csynthetics(f,ν,p) − ddata‖2 (cost function)

=12

∑s∈shots

∑h∈receivers

∫ T

0

(cs,h(t) − ds,h(t)

)2dt

= ‖f ?t B(ν0,p) · r − d‖2

For given f , ν0, p : a linear least squares problem.

J. Erhel, ALADIN

March 2000 11

Use of Truncated Pivoted QR (Stewart)

B(: ,E) = Q · (i,i)

@@

@

@@

@

@@

@

@@

@

@@

@

@@@

@@

@@@

0 3000 6000 900010−25

10−20

10−15

10−10

10−5

100

Diagonal elements of the R−factor of a pivoted QR on B’B

pivot number

abso

lute

am

plitu

de |R

ii|

diag(|R(B’B)|)diag(|R(B’C’CB)|)

1.e−11 threshold: r(B’B) = 7792

r(B’C’CB) = 7645

1.e−20 threshold: r(B’B) = 7895

r(B’C’CB) = 7892

approximates TSVD for σi > σ1 ∗ |Rii||R11| .

– Quasi Gram Schmidt algorithm;

– Q-less form;

– convolution on the fly

⇒ handles B only;

– R factor upper triangular n × n

⇒ not very sparse;

– E, handy permutation vector.

Still not a true rank-revealing QR.

J. Erhel, ALADIN

March 2000 12

Initial reflectivity projected on the orthonal of Ker(B)

Horizontal extent of the grid (m)

Ver

tical

ext

ent o

f the

grid

(m

)

10 20 30 40 50 60 70 80 90

10

20

30

40

50

60

70

80

90

100

Raw noisy data

TPQR on Bf: # zeros & quasi−zeros = 387

20 40 60 80

20

40

60

80

100

Regularisation

– Synthetic reflectivity to be retrieved

– TPQR at different thresholds

|R11||Rii|

8<:

1011

102

Raw noisy data

TPQR on Bf: # zeros & quasi−zeros = 146 3

20 40 60 80

20

40

60

80

100

J. Erhel, ALADIN

March 2000 13

Conjugate Gradient for Least Squares

Regularisation by limited convergence

0 20 40 60 80

0

20

40

60

80

100

CGLS with Bf after 1000 iterations CGLS with B

f after 250 iterations

0 20 40 60 80

0

20

40

60

80

100

left : Resulting reflectivity after too many iterations.

right: Stopped according to an error estimate.

J. Erhel, ALADIN

March 2000 14

How to stop with CGLS

0 200 400 60010

−5

10−4

10−3

10−2

10−1

100

τ = 10%

τ = 5%

τ = 1%

log 10

(|r/

r 0|)

relative residual vs iteration0 200 400 600

0.2

0.4

0.6

0.8

1

τ = 10%

τ = 5%

τ = 1%

|e/e

0|

relative true error vs iteration

– residual

– true error

– Hanke’s error estimate

0 200 400 6000

0.2

0.4

0.6

0.8

1

error estimate vs iteration

τ = 10%

τ = 5%

τ = 1%

ξ / ξ

max

J. Erhel, ALADIN

March 2000 15

Objectives of the project

design, analysis, implementation of

numerical algorithms and methods

speed accuracy

convergence order of approximation

parallelism stability

complexity invariants

applications of scientific computing

J. Erhel, ALADIN

March 2000 16

Domains of research

Differential equations - P. Chartier

Linear algebra

– eigenvalue problems - B. Philippe

– linear systems and least-square problems - J. Erhel

J. Erhel, ALADIN

March 2000 17

Ordinary differential equations y′ = f(y)Differential algebraic equations y′ = f(y,z) and g(y) = 0

Aims and results

general linear methods and Runge-Kutta methods

conservation of invariants

with U. Auckland, U. Geneve, U. Arizona, U. Trieste

optimisation problems (P. Chartier with MOCOA)

molecular dynamics (with NUMATH)

free software RADAU5M and RKPS63

Pseudo-symplectic method

[BIT-3 1998,BIT-4 1998]

-4

-3

-2

-1

0

1

2

3

4

-6 -4 -2 0 2 4 6

q

p

PS63EXACT

BUTCHER6

Research in other groups Aladin is the only group in France on this topic

multistep methods - stochastic DE - delay DE - Lie methods - software

New Talent Discovery prize - A. Aubry - 1997

J. Erhel, ALADIN

March 2000 18

Algebraic differential equations of index 2 (EDA2)

A. Aubry, P. Chartier - [App.Num.Math. 1996,SINUM 1998]

P. Chartier with U. Auckland [BIT 1996] , with U. San Sebastian

y′ = f(y,z) ∈ R

m ,

0 = g(y) ∈ R

n(1)

The exact solution (y(x),z(x)) lies on the manifold

V = (y,z) ∈ R

m × R

n,0 = g(y),0 = gy(y)f(y,z) (2)

Examples of application

mechanical systems, molecular biology, electrical networks, astronomy, etc

J. Erhel, ALADIN

March 2000 19

Vitesse : (u,v)

mg

λ

(u,v)

Longueur de la corde : l

Constante gravitationnelle : g

(p,q)

p

q

l

Masse : m

Coordonnees du point : (p,q)

Tension de la corde : λ

mv′ = −2qλ − mg

mu′ = −2pλ

q′ = v

p′ = u

H = m2 (u2 + v2) + mgq est constant le long de toute solution

0 = p2 + q2 − l2

0 = pu + qv

− − − − − − −

Example : pendulus behaviour

J. Erhel, ALADIN

March 2000 20

y0y1 y2

y3

y4

yn−2yn−1

yn

Φh Φh Φh

Φh

Φh

Φh

ΦhΦh

Φh

P

PP

PP

PP

P

P P

Solution propagee apres projection

Solution propagee avant projection

y0

yn−1 yn

y1 y2y3

y4

yn−2yn−1

yn

PΦh

Φh

y1 y2

y3

y4

y1 y2

y3

y4

yn−2

ynΦh

yn−2

yn−1

P

g(y) = 0

g(y) = 0

Runge-Kutta methods with projection (Radau I or Gauss for example)

propagation after projection : existing methods

propagation before projection : new method

J. Erhel, ALADIN

March 2000 21

0 100 200 300 400 500 600−0.93

−0.92

−0.91

−0.9

−0.89

−0.88

−0.87

Temps

Ham

ilton

ien

Hamiltonien du pendule

Solution propagée avant projection

Solution propagée après projection

Gauss s=2

The new method preserves the Hamiltonian of the system.

J. Erhel, ALADIN

March 2000 22

Method global error on y (EDO) global error on y (EDA2)

Gauss h2s hs or hs+1

propagation after projection ∗ h2s

propagation before projection ∗ h2s−2 or h2s

Convergence of Gauss methods

J. Erhel, ALADIN

March 2000 23

10−3

10−2

10−1

100

10−10

10−8

10−6

10−4

10−2

100

102

Solution propagée avant projection

Solution propagée après projection

Test Asher−Petzold − Méthode de Gauss s=2 − De 4 à 512 pas

Err

eur

glob

ale

en é

chel

le lo

garit

hmiq

ue

Pas intégration en échelle logarithmique

Both methods have the same order (same slope),

with a larger constant for the new one.

J. Erhel, ALADIN

March 2000 24

Linear systems : Ax = b or min ‖Ax − b‖, with A sparse

Aims and results

projection iterative methods :

CG and GMRES

to speed-up convergence

with Minneapolis and Queensland

Examples of application

electromagnetism (with M3N)

behaviour of composite structures (with

LM2S)

image analysis (with VISTA)

DEFLATED GMRES

[JCAM 1996, NLAA 1998]

0 50 100 150 200 250 300 350 40010

−14

10−12

10−10

10−8

10−6

10−4

10−2

100

matvec

resi

dual

n=100; beta=0.9; circulant(−1.5,2,30), D(31:100)

FULL−GMRES

GMRES(50)

MORGAN(25,15)

DEFLATION(25,15,2)DEFLATION(25,15,4)

Research in other groups

Aladin is one of the few groups in France studying linear solvers

dense matrices (REMAP) - direct methods (CERFACS, U. Bordeaux)

iterative methods (U. Lille, U. Littoral, U. Paris 6) - software

J. Erhel, ALADIN

March 2000 25

Solving a sequence of linear systemsF. Guyomarc’h - J. Erhel

A symmetric positive definite (SPD)

Solve

Ax(1) = b(1)

Ax(2) = b(2)

...

Preconditioned Conjugate Gradient for the first system (PCG)

Acceleration of convergence in the second system

J. Erhel, ALADIN

March 2000 26

A and M SPD - PCG=CG applied to B = M1/2AM1/2

Initialisation

r0 = b − Ax0

z0 = Mr0

p0 = z0

For k = 0,1 . . .

αk = (rk,zk)(Apk,pk)

xk+1 = xk + αkpk

rk+1 = rk − αkApk

zk+1 = Mrk+1

βk+1 =(rk+1,zk+1)

(rk,rk)

pk+1 = zk+1 + βk+1pk

Endfor

minimisation

‖rk‖B−1 = minx∈x0+Span(p0,... ,pk−1) ‖b − Ax‖B−1

eigenvalues of B and MA

0 < λ1 ≤ . . . ≤ λn

condition number κ = λn/λ1 ≥ 1

asymptotic convergence

‖rk‖B−1 ≤ 2‖r0‖B−1

√κ−1√κ+1

k

choose M such that κ ' 1

J. Erhel, ALADIN

March 2000 27

Acceleration of convergence

Projections

W = (w1, . . . ,wm) such that D = W T AW non singular

H = I − WD−1(AW )T

HT = I − AWD−1W T

Preconditioning

PCG with M = HHT and r0 = HT r−1 ⊥ W

M positive semi-definite and Ker(M) = Ker(HT ) = Span(W ) but

rk ⊥ W

Theorem : results for PCG are valid here

J. Erhel, ALADIN

March 2000 28

AUGCG [SIMAX 2000]

W = (p0,p1, . . . ,pm−1) thus D = W T AW is diagonal

Initialisation

x0 = x−1 + WD−1W T r−1

r0 = b − Ax0 = HT r−1

z0 =(I − WD−1(AW )T

)r0 = Hr0

p0 = z0

Projection

zk = HHT rk = Hrk = rk − (rk,Awm)(wm,Awm)wm

(zk,rk) = (rk,rk)

I/O on W can be used in the initialisation

J. Erhel, ALADIN

March 2000 29

DEFCGwith U. Minneapolis [SISC 2000]

Exact Deflation

W = (v1,v2, . . . ,vm) with Avj = λjvj thus H = I − WW T

κ =λn

λm+1

Invariant subspace approximation

Harmonic Ritz vectors

(AZ)T AZyi − θi(AZ)T Zyi = 0, yi ∈ R

m+k

with Z = [W (j),P (j)]

W (j+1) = Z(y1, . . . ,ym)

Accuracy of Ritz vectors increases at each new system

J. Erhel, ALADIN

March 2000 30

AUGCG and DEFCG : example - Matrix S2RMQ4M1

0 10 20 30 40 50 60 70 80 90−12

−10

−8

−6

−4

−2

0

2

Dotted: system one(CG); Dashed: systems two to four(DefCG); Solid: system two(AugCG)

log(

rela

tive

erro

r)

Preconditioning IC(1)

0 5 10 15 20 25 30 35 40−12

−10

−8

−6

−4

−2

0

2

Dotted: system one(CG); Dashed: systems two to four(DefCG); Solid: system two(AugCG)

log(

rela

tive

erro

r)

Preconditioning IC(4)

J. Erhel, ALADIN

March 2000 31

An application of AUGCGwith LM2S - M. Brieu - J. Erhel - [Comp. Str. 1999, Int.J.Eng.Sc. 2000]

Nonlinear behaviour

of composite structures

homogenisation approach

Newton-type method

parallel domain decomposition

4 linear interface problems

Equi-biaxial tension

Uniaxial tension

1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4

Equi-triaxial Tension

Pure shear

0

Number of iterations in CG

Problem

20

10

5

15

25

J. Erhel, ALADIN

March 2000 32

Eigenvalue problems and singular value decompositionAx = λx or Ax = λBx or A = UΣV T , with A sparse

Aims and results

projection methods :Arnoldi and Davidson

to speed-up convergence

to control accuracy

coordination of european project STABLE

thesis with CERFACS

fluid dynamics (with LIMSI)

Research in other groups

Very few groups in France

dense matrices - projection methods (CER-

FACS,U. Brest) - solid mechanics (LM2S) -

data mining - software

pseudo-spectrum

[LAA 1996,Num. Alg. 1997,Comp. 1998]

2nd prize Leslie Fox - V. Heuveline - 1999

J. Erhel, ALADIN

March 2000 33

Parallelism

Aims and results

design and implementation

of parallel algorithms

for ODE and linear algebra

to solve large scale problems

Examples of application

electromagnetism (with U. Rennes 1, IPSIS)

high-speed networks (NSF)

parallel tensor product :

x −→ x ⊗ni=1 A(i)

[PDCP-I 2000, PDCP-II 2000]

0 5 10 15 20 25 30 350

5

10

15

20

25

30

35

# processors

spee

d−up

Parallel run on T3E

n = 12 = 2,985,984 6

Research in other groups

domain decomposition (LM2S, 4B) - parallel libraries

IEEE best paper award at RENPAR 11 - C. Tadonki - 1999

J. Erhel, ALADIN

March 2000 34

Numerical reliability : rounding errors and condition numbers

Aims and results

interval algorithms

interaction symbolic/numerical

to control numerical quality

coordination of FIABLE

Examples of application

chemistry (BERTIN/ANDRA)

computational geometry

(GENIE2, FIABLE)

numerical GCD of two polynomials - 1999

Linear algebra hidden

k = maxi∃∆p ‖∆p‖ ≤ ε,∃∆q ‖∆q‖ ≤ ε,

deg(GCD(p + ∆p,q + ∆q)) = ip =

Q10i=1(X − i) and q =

Q15i=9(X − i)

before refining after refining

root 1 10.000038 9.99999999997

root 2 8.999986 9.00000000003

Research in other groups

stable algorithms - condition number estimation -

control of numerical quality (CERFACS, U. Paris 6) - interval library

J. Erhel, ALADIN

March 2000 35

Plans

free software environment

numerical algorithms

industrial contacts health and medicine

Manpower

3 INRIA researchers : P. Chartier, J. Erhel, B. Philippe

C. Simon external collaborator?

Y-H. De Roeck associate researcher?

Needs

one software engineer

one more researcher

J. Erhel, ALADIN

March 2000 36

Technology transfer

Objectives

increase further the national visibility of the project

increase further the collaboration with industries

Software development

free software (like other teams in the domain)

integration into the Scilab package

parallel versions

Industrial collaborations prospected

parallel and reliable versions of scientific softwares

hydro-geology and cardiology

J. Erhel, ALADIN

March 2000 37

Domains of application

Aladin will be strongly involved in three applications,

including modelling and discretisation.

Hydro-geology - H. Hoteit, B. Philippe, J. Erhel

modelling of flow and transport of solute - DAE and linear systems

cooperation with IMF, ESTIME, Cameroon (Campus project), Andra?

Acoustic and seismic image processing - Y-H. De Roeck, B. Philippe, J. Erhel

modelling of geotechnic problems - large scale 3D ill-conditioned problems

cooperation with Ifremer - Contrat de Plan Etat Region

Cardiology? - P. Chartier, J. Erhel

3D modelling of electric heart activity - DAE

grant of CIFRE type? - interaction with ICEMA action?

J. Erhel, ALADIN

March 2000 38

Differential equationsE. Lapotre, P. Chartier

Objectives

shooting methods

numerical resolution of Hamilton-Jacobi-Bellman equations

cooperation with MOCOA

solving EDA of index 2

Gauss-based methods without explicit use of projection step

analysis using geometric invariants

cooperation with U. San Sebastian, U. Auckland

J. Erhel, ALADIN

March 2000 39

Eigenvalue and singular value problemsD. Mezher, B. Philippe

Objectives

utility of balancing to improve the speed and accuracy of methods to solve large scale

nonsymmetric eigenvalue problems

cooperation with Berkeley? (proposal submitted)

0.9

1

1.1

1.2

1.3

−0.1

−0.05

0

0.05

0.10

2

4

6

8

10

12

14

16

18

pseudo-spectrum before balancing

0.9

1

1.1

1.2

1.3

−0.1

−0.05

0

0.05

0.10

2

4

6

8

10

12

14

16

18

pseudo-spectrum after balancing

J. Erhel, ALADIN

March 2000 40

General linear models : y = Ax + ε,ε ∼ (0,Ω)Y-H. De Roeck, J. Erhel, F. Guyomarc’h, B. Philippe

Objectives

regularisation with polynomial filter functions

iterative preconditioned methods

cooperation with Ifremer and U. Minneapolis - NSF proposal submitted

50 100 150 200 250

50

100

150

200

250

polynomial filter

50 100 150 200 250

50

100

150

200

250

blurred image

50 100 150 200 250

50

100

150

200

250

Tychonov filter

J. Erhel, ALADIN