Научная статья на тему 'MULTIPROCESSOR MODELING TECHNOLOGIES FOR THE APPLIED STATISTICAL TASKS'

MULTIPROCESSOR MODELING TECHNOLOGIES FOR THE APPLIED STATISTICAL TASKS Текст научной статьи по специальности «Математика»

CC BY
44
7
i Надоели баннеры? Вы всегда можете отключить рекламу.
Область наук
Ключевые слова
technology / modeling tasks Monte Carlo / distributed computing

Аннотация научной статьи по математике, автор научной работы — Shvachych G. G., Sazonova M. S., Zaporozhchenko O. E., Karpova T. P., Sushko L. F.

The work considers the multiprocessors technologies of modeling for Monte Carlo tasks. It is shown that only application of the modern super productive systems permitted the new way to realize the mechanism of corresponding partitioned computations. The calculating schemes that supply to provide the increase of productivity and calculations' speed effectiveness are shown. In this article the modified algorithm of parallel calculations is offered based on the Monte Carlo method. Here every calculator has its own random generator of numbers. Thus intermediate calculations come true independently on the different, separately taken blades of cluster, "calculators". The results are already processed on some separately taken master -blades ("analyzer"). This allows to get rid from the necessary presence of router-communicator between the random generator of numbers and "calculator". Obviously, that such decision allows to accelerate the process of calculations. It is shown that the parallel algorithms of the Monte Carlo method are stable to any input data and have the maximal parallel form and, thus, minimal possible time of realization using the parallel computing devices. If it is possible to appoint one processor to one knot of calculation. Thus the realization of calculations becomes possible in all knots of net area in parallel and simultaneously.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «MULTIPROCESSOR MODELING TECHNOLOGIES FOR THE APPLIED STATISTICAL TASKS»

COMPUTER SCIENCE

MULTIPROCESSOR MODELING TECHNOLOGIES FOR THE APPLIED STATISTICAL TASKS

1Doctor of science Shvachych G. G., 1PhD Sazonova M. S., 1PhD Zaporozhchenko O. E., 1Karpova T. P., 2Sushko L. F.

1 Ukraine, Dnipro, National Metallurgical Academy of Ukraine, 2Ukraine, Dnipro, State Agrarian and Economic University

DOI: https://doi.org/10.31435/rsglobal_wos/31032019/6386

ABSTRACT

The work considers the multiprocessors technologies of modeling for Monte Carlo tasks. It is shown that only application of the modern super productive systems permitted the new way to realize the mechanism of corresponding partitioned computations. The calculating schemes that supply to provide the increase of productivity and calculations' speed effectiveness are shown. In this article the modified algorithm of parallel calculations is offered based on the Monte Carlo method. Here every calculator has its own random generator of numbers. Thus intermediate calculations come true independently on the different, separately taken blades of cluster, "calculators". The results are already processed on some separately taken master -blades ("analyzer"). This allows to get rid from the necessary presence of router-communicator between the random generator of numbers and "calculator". Obviously, that such decision allows to accelerate the process of calculations. It is shown that the parallel algorithms of the Monte Carlo method are stable to any input data and have the maximal parallel form and, thus, minimal possible time of realization using the parallel computing devices. If it is possible to appoint one processor to one knot of calculation. Thus the realization of calculations becomes possible in all knots of net area in parallel and simultaneously.

Citation: Shvachych G. G., Sazonova M. S., Zaporozhchenko O. E., Karpova T. P., Sushko L. F. (2019) Multiprocessor Modeling Technologies for the Applied Statistical Tasks. International Academy Journal Web of Scholar. 3(33). doi: 10.31435/rsglobal_wos/31032019/6386

Copyright: © 2019 Shvachych G. G., Sazonova M. S., Zaporozhchenko O. E., Karpova T. P., Sushko L. F. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

Introduction. Among the variety of calculating methods in the modern mathematical solutions it is possible to put attention on the methods such as Monte Carlo [1 - 4]. This name unites the group of the calculative methods based on receiving the great amount of the stochastic process realizations. This process demands that its probability could correlate with the analogical values of the solved problem. Monte Carlo methods are widely used in areas of physics, mathematics, economics, optimization, management etc. The national works based on the Monte Carlo methods appeared in 1955-1956. Since that time a lot of the scientific works describing the above mentioned method were written [5 - 10]. Even the superficial glance shows the efficiency of the Monte Carlo method for solving of applied tasks in the different science and techniques areas. Thus now these methods are

ARTICLE INFO

Received: 15 January 2019 Accepted: 20 March 2019 Published: 31 March 2019

KEYWORDS

technology,

modeling tasks Monte Carlo, distributed computing.

applied for solving for some classes of the differential equations in the partial derivatives, integral equations, problems of the eigen-values and linear algebraic equations. The important feature of the Monte Carlo method is its experimental characteristics. We will call this name the procedure including the use of ways of statistic sampling for the approximate solving of the mathematical and physics problems.

Among all methods the Monte Carlo had and has the influence on the development of the methods of applied mathematics, e.g. on the development of the methods of numerical integrating. It also effectively coincides with other calculative methods and makes addition for them. It is widely used especially for the tasks having the theoretical-probable description because of the definite simplification of the solving.

Monte Carlo method is widely used for its simplicity and universality. Low approximation is the essential shortcoming of the method but in this work we will describe its modifications which provide the high order of the convergence; which is possible with the help of special assumptions. Though the calculating procedure becomes more complicated. Monte Carlo approximation is the approximation based on probability. It is known that the approximate methods are often used for solving the practical tasks.

At least we admit that solution accuracy of this method depends on the quality of the generator of the random values that describes the analyzed process and also on the productivity of the so called calculator. Today the tact frequency of the modern processors is higher than Gigabytes and the volume of the RAM of the PC is also very large. Taking in account that the definite class of tasks will be developed on the personal calculating cluster the calculator productivity is not a problem for solving for calculating algorithms used to solve multi dimensional tasks. The practical example of the mechanism for applying this method and some special features of its realizing will be considered for the typical thermo -physical tasks.

Specialty of realization of the parallel calculations with the Monte Carlo Method.

Among the other numerical methods the main role plays the Monte Carlo Method. We have to point that this method helps to get the closest solution of the task in one fixed point without knowing the solution for other points of the grid. This differs the Monte Carlo Method especially for solving the Dirichlet problem from other well-known ways.

The simplified scheme is shown on the Fig. 1.

Fig. 1. Scheme of calculations with the Monte Carlo Method

Application of this method gives the possibility to review the idea of making nonparallel calculations and using the cluster technologies. Intermediate results may be obtained independently on the different levels and the final results should be arranged on any separate master -blade or analyzer. Fig.2 shows the algorithm of parallel calculations.

According to this scheme one generator of the random numbers outputs one random value to each "calculator". Information is permanently transferred via latent channels. So the productivity will be low as well as the data speed. Experience of operating of the calculating cluster for such schemes made it available to perfect the scheme on the Fig.2.

Fig. 2. Scheme of parallel calculations

The Fig.3 shows the modified algorithm of calculations with Monte Carlo Method. Every user has its own generator of random values. This fact allows to escape the presence of the router communicator. This decision definitely accelerates the calculating process. The productivity may be evaluated experimentally.

Fig. 3. Modified algorithm of parallel calculations based on Monte Carlo Method

Thus Monte Carlo Method based algorithms are the stable relating to any input data, have the maximal parallel form and the minimal time for realization of calculations.

Investigation of efficiency of the cluster system simulation of tasks by the Monte Carlo Method.

Analysis of the problem of search and solution for boundary value problems.

Boundary problems and problems with initial conditions for linear differential equations are the one of the most interesting areas of using the Monte Carlo Method. The connection between two types of these problems is known for long time (5-9). But only the computers' appearance gave the possibility of using this connection for finding the results of this problem.

To clear the main idea of the method we consider the Dirichlet problem for Laplace equation. We have the definite G-area on which boundary the function f(Q) is defined. We have to find the function U(P) that satisfies the Laplace equation:

AU = 0, (1)

on boundary of area P accepts values:

U r = f (Q) . (2)

Generally this problem is brought to a finite-difference scheme. G-area is covered by the square grid nodes. We look for values of the function U(P) from the following system.

U(P) - 1[U(Pl) + U(P2) + U(P3) + U(P4)]. (3)

Symbols {Pi, P2, P3, P4} mean four nodes next to the internal node P: they are arranged inside the G-area or on its bound.

We consider the theoretical probable scheme which is connected with the problem. Imagine the participle that has to move between the grid nodes with integer coordinates (i, j) on the area:

x = x + yj = y0 + JV (i, j = 0, ± 1, ± 2,...,) :

and the step is Axt = xi+l - xt, Ayj - y^ - yj.

Let's say that the grid of Sn consists of internal and boundary nodes in which boundary conditions of the first kind are set. Boundary nodes represent a set of the linear points of Mpq(xp,yq) which approximate the curvilinear r boundary of the area G which approximate the curvilinear boundary of the area G to with accuracy n. The particle M realizes the uniform accidental movement between nodes of the grid [3]. In particular, being in the internal node Mio,jo of a grid Sn, this particle for one transition with identical probability equal to % can move to one of adjacent nodes. In particular in Mi-i,j(xi-n ,yj), one step back, in Mi+i,j(xi+q, y) one step to the right, in Mt,j.i(xi, yj - n) -one a step down or Mi,j+i(xi, yj +n) - one step up. Each such transition is absolutely accidental and doesn't depend on the position of a particle and its previous relocation. Let's allow that relocation of M will end as soon as it reaches the boundary Fn. In this case Fn is "the absorbing screen". It is possible to prove [5] that M relocation through a finite number of steps will finish on this boundary.

If the particle of M began the relocation with the fixed point of Mio,jo on the grid Sn that can be written as:

Miojo, Miiji, ... , MiSjS ,

and

Mj g Fv (k = 0,1,...,S- 1) .

Here expression Mt j 6 Fv displays a particle path in case of quantity of steps equal to S.

This value is accepted to be called "history of relocation".

Uniform accidental relocation of a particle can be organized by means of uniformly distributed sequence of random numbers [5, 7 - 10] which are equal to: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

For this purpose it is enough to carry out random check from numbers (0 - 9), adhering to the instruction shown in the table 1.

Table 1. Determination of the particle step depending on a random number

Random number Determination

0 or 4 AXi = n (step right)

1 or 5 AYy = n (step up)

2 or 6 AAXi = - n (step left)

3 or 7 AAYy = - n (step down)

Random numbers are taken from the ready tables or turn out by the pseudorandom number generator [7]. The last method became popular as it doesn't allow to overload the system memory. The particle which has begun relocation from a point Mij after the first step will occur in one of the nodes

I. Mij, Mi-1j, ... , ;

II. Mij, Mi+1j, ... , ;

III. Mij, Mij-1, ... , ;

IV. Mij, Mij+1, ... .

By the formula of full probability we have

P(i, j, p, q) = 1 P(i -1, j, p, q) +

+1 P(i +1, j, P, q) +1 P(i, j -1, p, q) +1 P(i, j +1, p, q)

(4)

Having multiplied two members of equation (4) on boundary values ypq and having summarized all possiblep and q values, we will receive.

(5)

Values Vj allow the experimental determination, for this purpose it is necessary to replace mathematical expectation by empirical. Then expression will look as:

1

Nk-i

Uj -1 z* x pk ) yqk )).

(6)

The formula (6) gives a statistical assessment of values U i, j and can be used as the best approximation to the solution of the Dirichlet problem.

Example 1. To find value U(2, 2) with the application of the Monte Carlo method where AU (x, y) = 0, in the area

and conditions are:

G {0 < x < 4; 0 < y < 4},

U(x,0) - 0, 0 < x < 4;

U(4, y) - y, 0 < y < 4;

U(x,4) - x, 0 < x < 4;

U(0, y) - 0, 0 < y < 4.

(7)

(8)

Solution. For the square G with the boundary r we will build the square grid S with the step n =1. Coming from the initial position (2,2) the movement finishes on the boundary r in the area GK, at the given conditions (8) (see table 1). Appearance of numbers 8 and 9 we consider as a stop on one place.

Table 2 shows trajectories of 10 histories for two-dimension random movement at N = 10. Due to (8) we get that:

U(2'2> ^ ^ 1 ^'yf] *20 ^ 1 •

20

In this case the exact solution of the Dirihlet problem is known (7, 8):

U(x, y) = Xy •

thus

2 • 2

U (2,2) = — = 1. 4

This is a way we received the exact solution for U(2,2) applying the statistic method. Table 2. Trajectory of the motion for the working point_

k

Number of motion, k Value of the function

Trajectory of wandering u(x,y) at exit point on the border G

1 (2,2) > (2,3) > (2,2) > (2,1) > > (3,1) > (3,2) > (3,1) > (3,2) > > (2,2) > (2,3) > (2,3) > (2,2) > > (2,1) > (2,0); 0

2 (2,2) > (2,3) > (3,3) > (3,2) > > (4,2); 2

3 (2,2) > (2,3) > (2,2) > (2,3) > > (2,4); 2

4 (2,2) > (1,2) > (1,2) > (0,2); 0

5 (2,2) > (2,3) > (2,4); 2

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

6 (2,2) > (2,1) > (2,0); 0

7 (2,2) > (1,2) > (2,2) > (3,2) > > (3,1) > (3,2) > (2,2) > (1,2) > > (0,2); 0

8 (2,2) > (1,2) > (0,2); 0

9 (2,2) > (2,1) > (2,2) > (3,2) > > (3,3) > (3,3) > (2,3) > (1,3) > > (0,3); 0

10 (2,2) > (1,2) > (0,2); 0

Conclusions. The article describes the process of mathematical design of the applied tasks on the basis of the use of the Personal Cluster System. Experience of exploitation of the first parallel systems showed that their effective work needs the radically change of the structure of numerical methods. In this connection this article shows the features of design of the applied tasks which are described on the basis of application of the Personal Cluster System.

Nowadays it is possible to talk about the revival of the method of Monte Carlo. It is explained by the fact that this method ideally approximates the cluster system. Thus, the more processors will be in a cluster, the more effective the task will be solved. The method of Monte Carlo produced and continues to produce substantial influence on development of methods of calculable mathematics (for example, development of methods of numerical integration). It also is successfully solving many tasks combined with other calculable methods and complements them. The method's application is justified,

first of all, to the decision of such tasks as admit assume of theoretical-probable description. It is explained by both: the tasks with the certain set probability and in tasks with probabilistic maintenance and substantial simplification of procedure of decision. The Monte Carlo method is also used to solve the multidimensional tasks of metallurgy.

Slow convergence of method is its little defect. However in this article we show that with forming selective random numbers in relation to separate groups the accuracy of this method allows to use it widely.

In addition it was shown that the method of Monte Carlo is enough successful adjusted to solve multidimensional tasks. For example, at applying the ordinary method for solving the systems of linear algebraic equalizations for a calculation of one unknown value it is necessary to define also the other ones. In the Monte Carlo method it is not necessary because at each time moment only one necessary co-ordinate is determined.

Regional tasks and tasks with initial conditions for linear differential equalizations are one of the most interesting application of the method of Monte Carlo. It became possible only due to the development of the cluster computer systems. In this work the examples of solution for tasks of Newman and Dirihlet are made by means of the method of Monte Carlo.

REFERENCES

1. Михайлов Г.А. Численное статистическое моделирование. Методы Монте-Карло / Г.А. Михайлов,

A.В. Войтишек. - М.: Академия, 2006. - 368 с.

2. Михайлов Г. А. Оптимизация весовых методов Монте-Карло по вспомогательным переменным / Г. А. Михайлов, И. Н. Медведев // Сиб. матем. журн. - 2004. - № 45. - С. 399 - 409.

3. 1нтернет-ресурс http://ru.wikipedia.org/wiki/метод_Монте-Карло.

4. 1нтернет-ресурс http://www.riskglossary.com/link/monte_ carlo_method.htm.

5. Ермаков С.М. Метод Монте-Карло и смежные вопросы / С.М. Ермаков. - М.: Наука, 1971. - 471 с.

6. Соболь И.М. Метод Монте-Карло / И.М. Соболь. - М.: Наука, 1968. - 64 с.

7. Браун Дж. Методы Монте-Карло / Дж. Браун // Современная математика для инженеров; под ред. Э.Ф. Беккенбаха. - М.: Изд-во ин. лит., 1958. - 500 с.

8. Китов Н.А. Электронные цифровые машины и программирование / Н.А. Китов, Н.А. Криницкий. -М.: Физматиз, 1959. - 572 с.

9. Демедович Б.П. Основы вычислительной математики / Б.П. Демедович, И.А. Марон. - М.: Физматиз, 1963. - 660 с.

10. Березин И.С. Методы вычислений / И.С. Березин, Н.П. Шибков. - М.: Наука. - Т. 1. - 1966. - 632 с.

11. Коздоба Л. А. Вычислительная теплофизика / Л.А. Коздоба. - К.: Наук. думка, 1992. - 224 с.

12. Shvachych G.G. Component system of numeral-analytical visualization of vectors decisions multiprocessor calculable complexes // IV Intrenational Conference ["Strategy of Quality in Indastry and Education"]; May 30 - June 6, 2008; Varna; Bulgaria. - Proceedings. - V. 2. - P. 810-815.

13. Shvachych G.G. Maximally parallel forms of distributed simulation of dynamic system / G.G. Shvachych,

B.I. Moroz, I.A. Pobochii, E.V. Ivaschenko, V.V. Busygin // World Science, Vol 1, № 4(32), April, Warsaw, 2018. - P. 12 - 20.

14. Ivaschenko V.P. Effective algorithms for solving coefficient problems of high accuracy order schemotechnical technologies for reliability of solar arrays / V.P. Ivaschenko, G.G. Shvachych, E.V. Ivaschenko, V.V. Busygin // System Technologies: the Regional collection of the proceedings, № 4(117), 2018. - С. 95 - 108.

15. Воеводин Вл. В. Вычислительное дело и кластерные системы / Вл. В. Воеводин, С.А. Жуматий. -М.: Изд-во Московского университета, 2007. - 150 с.

16. Баканов В.М. Персональный вычислительный кластер как недостающее звено в технологии проведения сложных технологических расчетов / В.М. Баканов // Метизы. - 2006. - 2 (12). - С. 33 - 36.

17. Shvachych G.G. Prospects of construction highly-productive computers systems on the base of standard technologies / G.G. Shvachych // IV Intrenational Conference "Strategy of Quality in Indastry and Education"; May 30 - June 6, 2008, Varna; Bulgaria. - Proceedings. - V. 2. - P. 815 - 819.

18. Shvachych G.G. Research of the problem of compatibility in the multi-processing compound systems / G.G. Shvachych, I.A. Pobochii, E.V. Ivaschenko, V.V. Busygin // Science review, Vol 1, № 2(9), February, Warsaw, 2018. - P. 19 - 23.

19. Шнейдер П. Инженерные проблемы теплопроводности / П. Шнейдер; пер. с англ. - М.: Изд-во ин. лит., 1960. - 478 с.

i Надоели баннеры? Вы всегда можете отключить рекламу.