plamen fiziev bltf, jinr, dubna parallel computations using maple 17

23
Plamen Fiziev BLTF, JINR, Dubna Parallel computations using Maple 17 Mathematical Modeling and Computational Physics Dubna, 2013

Upload: kita

Post on 22-Feb-2016

24 views

Category:

Documents


0 download

DESCRIPTION

Plamen Fiziev BLTF, JINR, Dubna Parallel computations using Maple 17. Mathematical Modeling and Computational Physics Dubna , 2013. The point of the talk is to present some of the achievements and technical problems in parallel calculations using last versions of Maple package. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Plamen FizievBLTF, JINR, Dubna

Parallel computations using Maple 17

Mathematical Modeling andComputational Physics

Dubna, 2013

Page 2: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

The point of the talk is to present some of the achievements and technical problems in parallel calculations

using last versions of Maple package.

In particular, we intend to describe the simplicity of Parallel computations with Maple

Linear Algebra Package

DEtools Package

MathematicalFunctions Package

New methods for generalized Heun’s functions

THE HEUN PROJECT

Page 3: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Some of the basic Maple 17 packages for doing Math and Computational Physics:

1. Linear Algebra Package2. DEtools Package3. MathematicalFunctions Package (including Heun’s functions)4. IntegrationTools Package5. DifferentialGeometry Package6. DiscreteTransforms Package7. MultiSeries package8. DynamicSystems Package9. PDEtools Package10.ScientificErrorAnalysis Package11.Physics Package

Page 4: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Supermicro 4U/tower SYS-7047A-TH

2 X CPU Intel Xeon E5-2670 Processor (20M Cache, 2.60 GHz, 8.00 GT/s Intel® QPI) 16 core (32 logical)

2 X HDD SAS 300GB 15000RPM

HDD SATA 2TB 7200RPM Enterprise

Memory 128 GB DDR3-1600MHz ECC REG

OS:

Scientific Linux release 5.4 x 64

WARNING: using Scientific Linux instead of Windows seems to be critical for successful parallel computations on this and similar platforms using Maple 16/17.

Software:

1. Maple 172. Fortran 903. MPI

Page 5: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Lenovo W520

Memory 16 GB DDR3 SDRAM -1333MHz

Two Intel(R) Core (TM), i7-2670 QM CPU @ 2.20 GHz4 core (8 logical)

OS:

1. Windows 7 x 64

Software:

2. Maple 17.2

Page 6: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Linear Algebra is already almost fully paralellezed using the threads technology

with(LinearAlgebra):Neq:=1200;A0 := RandomMatrix(Neq,Neq,datatype=float[8]):nrmA:=sqrt(add(add(A0[j,i]^2,i=1..Neq),j=1..Neq)):A:=A0/nrmA:EV:=Eigenvectors(A, output='list'):

- Time=2 sec

- Time=10 sec

- for a Neq X Neq rendom matrix A

…………………………………………………………….

Eigenvalues:

Page 7: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Eigenvalues: Time versus Matrix size

For such simple computations is CRITICAL the amount of RAM for one core !

The same statement is true for the other Linear Algebra operations.

Page 8: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Linear systems of ODEs with rendom coefficients and rendom initial conditions:

parallelSyssolver:=proc() uses Grid; local me,numNodes,nrm,Xin,r,i,rply; global syss, NK, Neq, IC; me:= MyNode(); numNodes:= NumNodes(); Xin:=seq(x[i](0)=IC[i,me+1]/nrm,i=1..Neq); r:=syssolver(me+1); if me <> 0 then Send(0, r); else rply := r; for i from 1 to (numNodes-1) do r := Receive(i); rply := rply, r; end do; return [rply]; end if: end proc:

Neq := Number of equations A0 := RandomMatrix(Neq,Neq,datatype=float[8]): nrmA:=sqrt(add(add(A0[j,i]^2,i=1..Neq),j=1..Neq)):

A:=A0/nrmA: f:= (j) -> x[j](t):X:= Vector(Neq,f):df:=(j) -> diff(x[j]

(t),t):dX:=Vector(Neq,df): F:=A.X: dsys := seq(dX[m]=F[m],m=1..Neq):

IC0:=RandomMatrix(Neq,NK,datatype=float[8]);nrm:=sqrt(add(add(IC0[i,j]^2,i=1..Neq),j=1..NK)):IC:=IC0/nrm:

result:=Grid:-Launch(parallelSyssolver,imports=['syssolver','dsys','IC','NK','Neq'],numnodes=NK):

syssolver:=proc(k) local ssys, nrm,Xin; global NK, Neq, IC; UseHardwareFloats:=true: nrm:=sqrt(add(IC[i,k]^2,i=1..Neq)); Xin:=seq(x[i](0)=IC[i,k],i=1..Neq); ssys:= dsolve({dsys,Xin},numeric);ssys(500): end proc:

Page 9: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

500 ODEs => parallel 1.7 s sequential 23.5 s

=> 13.6 times (An almost maximal usage of all

cores is reached via the inner Grid technology)

An example for a parallelized procedure - Computing a Convex Hull

from Maple help.

( => acceleration about 2 times)

Page 10: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Critical is the amountof RAM forone core !

Page 11: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Examples of Linear ODEs with essential singular points

1. Euler’s example:

Bi-section method Parallel Comp + Multi-section: M = # Cores+1

AsymptoticSeries

Page 12: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

2. Uniformed Neznamov et. al. system of ODEs for Dirac particle in Schwarzschild metric

(arXiv: 1301.7595):

Examples of Linear ODEs with essential singular points

Unknown functions: and

Page 13: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

1. Regularization (no zeros in the denominator):

2. Iniformization (no roots):

3. Polar variables:

Page 14: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

The vector field on the torus {Φ, η} :

- The relief of the vector field

- Separatrix valley

Page 15: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

The phase portrait on the torus {Φ, η} :

-

Node at

Node at

Saddle point at

=> Bounded states

=> Unbounded states

=> Unbounded states

Page 16: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17
Page 17: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Multi-section

M = # cores +1

- N times.

Practically N ~ 10 gives in a short time an accuracy not worse than

Page 18: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

After a finite number of multi-sections we collect several points (with good precision) on the separatrix and then we perform an interpolation, since we knowthe exact position of the singular point:

η = 0

Φ =

Thus we really reach the infinite pointwith respect to the variable:

ρ

Page 19: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Discrete spectrum of the bounded states of Dirac particle in Schwarzschild metric

Solving by parallel computing the solutions of the corresponding ODEs one obtains:

From

for η asymptotic

Then, according to Neznamov et.al. arXiv: 1301.7595 , the spectral condition is

Φ∞=𝑛𝜋2 ,𝑛=1,3,5 ,…

Page 20: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Another formulation of the same problem

A Schrödinger like formwith quite complicated quasipotential W(ρ,ε)

which yields a second order ODE with five singular points

– even not a Heun equation.

Page 21: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

The Heun Project http://tcpa.uni-sofia.bg/heun/heun_group.html

Particular case: the Heun equation

Page 22: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

The confluent Heun equation:

Huge amount of applications in all scientific areas: physics, astrophysics, astronomy, chemistry, biology, economics , e.t.c

The only computer package able to operate with the Heun functions is still Maple.But there are a lot of problems, in spite of some improvements in Maple 17.2 after more then five years work. For example, problematic are the calculations for big values of z :

(due to existence of irregular singular point at z = )

Maple 10 -17 Maple 17.2

Conclusion: NEW CODES ARE NEEDED. The above example gives some idea what we really need.

Page 23: Plamen Fiziev BLTF, JINR,  Dubna Parallel computations using Maple 17

Thank you for your attention !