Parallel computations using Maple 17

3 downloads 0 Views 2MB Size Report
Memory 16 GB DDR3 SDRAM -1333MHz. Two Intel(R) Core (TM), i7-2670 QM CPU @ 2.20 GHz. 4 core (8 logical). OS: 1. Windows 7 x 64. Software: 1.
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. 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

Some of the basic Maple 17 packages for doing Math and Computational Physics: 1. Linear Algebra Package 2. DEtools Package 3. MathematicalFunctions Package (including Heun’s functions) 4. IntegrationTools Package 5. DifferentialGeometry Package 6. DiscreteTransforms Package 7. MultiSeries package 8. DynamicSystems Package 9. PDEtools Package 10.ScientificErrorAnalysis Package 11.Physics Package

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) Memory 128 GB DDR3-1600MHz ECC REG 2 X HDD SAS 300GB 15000RPM HDD SATA 2TB 7200RPM Enterprise

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 17 2. Fortran 90 3. MPI

Lenovo W520 Two Intel(R) Core (TM), i7-2670 QM CPU @ 2.20 GHz 4 core (8 logical) Memory 16 GB DDR3 SDRAM -1333MHz

OS:

1. Windows 7 x 64 Software: 1. Maple 17.2

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'):

- for a Neq X Neq rendom matrix A - Time=2 sec - Time=10 sec Eigenvalues:

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

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.

Linear systems of ODEs with rendom coefficients and rendom initial conditions:  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: 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:

Neq := Number of equations 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:

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

An example for a parallelized procedure - Computing a Convex Hull from Maple help. ( => acceleration about 2 times)

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)

Critical is the amount of RAM for one core !

Examples of Linear ODEs with essential singular points 1. Euler’s example:

Bi-section method

Asymptotic Series

Parallel Comp

+ Multi-section:

M = # Cores+1

Examples of Linear ODEs with essential singular points 2. Uniformed Neznamov et. al. system of ODEs for Dirac particle in Schwarzschild metric (arXiv: 1301.7595):

Unknown functions:

and

1. Regularization (no zeros in the denominator):

2. Iniformization (no roots):

3. Polar variables:

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

- The relief of the vector field

-

Separatrix valley

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

=> Unbounded states

Saddle point at

=> Bounded states

Node at

=> Unbounded states

𝜋

-2

Multi-section M = # cores +1 - N times. Practically N ~ 10

gives in a short time an accuracy not worse than 𝟏𝟎−𝟑𝟎

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 know the exact position of the singular point:

η=0 Φ=

Thus we really reach the infinite point with respect to the variable:

ρ = +∞

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

η→

𝜋 2

− 0 𝑜𝑛𝑒 𝑑𝑒𝑟𝑖𝑣𝑒𝑠 asymptotic

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

Then, according to Neznamov et.al. arXiv: 1301.7595 , the spectral condition is 𝜋 Φ∞ = 𝑛 , 𝑛 = 1,3,5, … 2

Another formulation of the same problem

A Schrödinger like form with quite complicated quasipotential W(ρ,ε) which yields a second order ODE with five singular points – even not a Heun equation.

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

Particular case: the Heun equation

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.

Thank you for your attention !

Suggest Documents