Startseite Automated Program Design – an Example Solving a Weather Forecasting Problem
Artikel Open Access

Automated Program Design – an Example Solving a Weather Forecasting Problem

  • Anatoliy Doroshenko , Pavlo Ivanenko , Olga Ovdii und Olena Yatsenko EMAIL logo
Veröffentlicht/Copyright: 10. Dezember 2016

Abstract

High-level algebra-algorithmic software tools for automated design of parallel code in the OpenMP environment are developed for the purpose of both producing efficient parallel code and increasing the performance of program developers. Application of the tools is illustrated with an example of a problem in atmosphere circulation modeling, represented as a service belonging to an Internet portal providing meteorological forecasting services. Results of execution of the parallel weather forecasting program on multiprocessor platforms are given.

1 Introduction

One of the prospective directions in the development of parallel and distributed computing systems is the construction of program abstractions using high-level algorithmic languages and models. In previous works [15], we have been developing a theory, methodology and software tools for automated parallel program design, based on the algebra of algorithms. The algebra is applied for formalization, substantiation of correctness and transformation of algorithms. The developed algebra-algorithmic tools include the Integrated toolkit for Design and Synthesis of programs (IDS) [1, 3, 4]and its alternative version, the Synthesis framework [5], which is based on usage of Web technologies. The IDS toolkit is intended for automated design and generation of serial and parallel programs on the basis of high-level specifications of algorithms (schemes).

One of the main application domains of our tools is in weather forecasting. Forecasting systems are getting more complex every year as underlying mathematical models evolve and the amount of computed data grows swiftly. The problem of meteorological forecasting [6] is not an exception. Taking into account a large demand for meteorological prognoses in different fields of human activity, design and development of programs for solving this problem are extraordinarily timely. In addition, reliability and efficiency of meteorological forecasts are of high and sometimes critical importance, which puts high demands on the accuracy of the results and response time of forecasting programs. A large amount of computation over huge data arrays demands the usage of parallel computing.

In the previous paper[5], we considered an automated design of a parallel program for solving a simplified two-dimensional convection-diffusion problem, which arises in mathematical modeling of atmosphere circulation in meteorology [7]. The main goal of this paper is to develop algebra-algorithmic software tools for an automated design of efficient parallel code in the OpenMP environment. The application of the tools is illustrated by designing a program for the three-dimensional convection-diffusion problem. The developed parallel program is used in a Web portal for weather forecasting purposes that is under development [8]. In this work we also consider the automated designing of a service, which belongs to the portal and is implemented in the Java language.

The proposed approach is related to works on algebraic programming [9], synthesis of programs from specifications [1012], automated generation of OpenMP programs [1316]and Java applications [1719]. In particular, works [13, 14] consider the tools for automatic OpenMP code generation, which is implemented using a polyhedral model, an algebraic abstraction which is used to detect data dependencies and perform high-level transformations of loops and other control flow structures for the purpose of program parallelization. Paper [15] proposes a methodology for translating a program written in Signal, which is a synchronous language dedicated for the functional description of safety critical systems, to OpenMP code. In [16] a source-to-source compilation framework for analyzing and transforming programs is considered, which is applied for automatic parallelization of scientific and signal processing applications. Paper [17] presents an approach to an automatic construction of Java programs from functional specifications, which is based on an inductive theorem prover. Works [18, 19] are devoted to Java code generation from a model-based design.

The main difference of our approach from the mentioned related works is that it uses high-level algebraic specifications which can be represented in three equivalent forms: algebraic, natural linguistic and graphical, and therefore giving a comprehensive understanding of specifications and facilitating achievement of demanded program quality. Another advantage of our tools is the method of automated design of syntactically correct algorithm specifications [1, 3, 4], which eliminates syntax errors during construction of algorithm schemes.

2 Automated Design of Programs using Algorithmic Algebra Facilities

Our approach to the design of algorithms and programs is based on the Glushkov System of Algorithmic Algebra (SAA) [1, 2], which is applied for formalized representation of algorithmic knowledge. SAA is the two-based algebra 〈Pr, Op; Ω〉, where Pr is a set of logical conditions (predicates) and Op is a set of operators, both defined on an informational set; Ω is a signature of operations, which will be considered below.

The algorithms specified in SAA are called SAA schemes. The schemes can be represented in algebraic, natural linguistic (textual) and graphical forms [1].

2.1 The Main Operations of Algorithmic Algebra

Below we give the list of the main SAA operations, specifications of which are written in a natural linguistic form.

  1. The operation of serial execution of two operators:

     “operator 1”;

     “operator 2”

  2. The conditional execution of operators (branching):

     IF ‘condition’ THEN

      “operator 1”

     ELSE “operator 2” END IF

  3. The loop operation:

     WHILE ‘condition

     LOOP “operator

     END OF LOOP

  4. The switch operation, which executes one of n operators, if the value of the corresponding condition is true, and then breaks execution without checking the values of other conditions:

     SELECT

     (

      [‘condition 1’] → “operator 1”,

      [‘condition 2’] → “operator 2”,

      ...

      [‘condition n ’] → “operator n”,

     )

  5. The operation of asynchronous execution of n operators (threads), where i is the index of the current thread:

     PARALLEL ( i = 0, ..., n - 1)

     (

      “operator i

     )

  6. The synchronizer operation, which delays the computation until the value of the specified condition is true:

     WAIT ‘condition

The usage of the above operations will be illustrated in Section 3.

2.2 The Operations of Algorithmic Algebra for the Object-Oriented Paradigm

SAA also contains operations for the formalization of the main concepts of object-oriented programming, such as classes, objects, etc. For compatibility with the Java programming language, the operations for the definition of annotated classes, fields, methods and parameters were included in the signature. An annotation is a special form of syntactic metadata, which can be added to a source code and used for analysis, compilation or execution of code [20]. The list of the SAA operations for the object-oriented paradigm, used in this work, is given below.

  1. The definition of an annotated class (in generalized form):

    1. Annotated class X implements Y (Class name, Interface name)

    2. <Annotations>

      1. Annotation (Annotation text 1);

      2. Annotation (Annotation text 2);

      3. ...

    3. <Fields>

      1. operators

    4. <Methods>

      1. operators

    Here Class name is a class name, which implements an interface with identifier Interface name; <Annotations>, <Fields>, <Methods> are the strings which precede the operators for definition of one or more annotations, data fields and methods of the class, respectively; Annotation text is a text of an annotation.

  2. The annotations for classes, data fields and methods are defined with the help of the operator

    1. Annotation (Annotation text),

    where Annotation text is the parameter, in which the text of the annotation is specified.

    An example of the definition of an annotation for a class is Annotation (Service).

  3. The definition of an initialized data field of a class:

    1. Field initialized (Modifiers,Field type,Fieldname)

      1. <Initialization>

        1. operator

    This construction is used for specifying a class field, which is assigned some initial value. Here Modifiers is a list of access modifiers (e.g. public, static, final); Field type is a type of the data field; Field name is the identifier of the field; <Initialization> is the string preceding the operator or an expression, the value of which is used for initializing the field.

  4. The construction for definition of an annotated data field of a class is the following:

    1. Field annotated (Modifiers,Field type,Fieldname)

      1. <Annotations>

        1. Annotation (Annotation text 1);

        2. Annotation (Annotation text 2);

        3. ...

    Here the meanings of the parameters Modifiers, Field type and Field name are the same as in the operation given above; <Annotations> is a string, after which the operators for the definition of one or more annotations are to be given.

  5. The definition of an annotated method of a class:

    1. Method annotated (Return type, Method name, Parameters list),

      1. <Annotations>

        1. Annotation (Annotation text 1);

        2. Annotation (Annotation text 2);

        3. ...

      2. <Body>

        1. operators

    Here Return type is the data type of the value returned from a method; Method name is the identifier of a method; Parameters list is a list of formal parameters; <Annotations> is a string, which precedes the operators for definition of annotations (e.g. Override, Transactional); <Body> is a string, which precedes the operators of a method body.

    A formal parameter of a method, which is specified in the Parameters list, is defined in the following way:

    1. ParamType ParamName,

    where ParamType is a data type of a parameter (variable); ParamName is the identifier of the parameter. The data types include basic types (short, int, long, float, double, char, String, boolean) and compound types (class objects and arrays).

    Non-annotated classes, data fields and methods are defined with the help of constructs, similar to given above.

  6. The construction for calling a method of a class instance (an object):

    1. Call instance method (Instance name, Method name, Arguments),

    where Instance name is an identifier of a class instance; Method name is the identifier of the class method; Arguments is a list of parameters of the method.

The usage of the operations considered in this subsection will be illustrated in Section 4.

2.3 The Tools for Automated Software Design

Our approach to an automated design of programs is based on a method which ensures the syntactical regularity of algorithm schemes [1, 3, 4]. The method consists of unfolding the design of schemes by superposition of predefined SAA language constructs (such as presented above in previous subsections), which are considered as reusable components and are stored in the database. The design process is represented by a tree of an algorithm. The user selects SAA constructs from the list and adds them to an algorithm tree (for example, by using a drag-and-drop technology). On each step of the design process, the system allows a user to select only those operations, the insertion of which into a scheme does not break its syntactical correctness. An algorithm tree is then used for automatic generation of SAA scheme text and a source code in a target programming language. The mapping of SAA operators to a text in a programming language is defined in the form of code templates in the database.

We implemented the aforementioned approach in the IDS toolkit [1, 3, 4] and its alternative version, called the Synthesis framework [5]. The IDS toolkit is intended for automated design of algorithm schemes and generation of programs in target programming languages (Java, C++). IDS integrates three forms of design-time representation of algorithms: algebraic, textual and flowchart. The main difference between the Synthesis framework [5] and IDS is that Synthesis is based on using Web technologies and is suited for object-oriented programming, whereas the IDS toolkit is mainly aimed at an imperative paradigm.

The IDS system consists of the following main components (see Figure 1):

Figure 1 The architecture of the IDS toolkit.
Figure 1

The architecture of the IDS toolkit.

  • the constructor, which is applied for an automated design of algorithm schemes and generation of programs;

  • the flowchart editor [1], intended for editing the graphical representation of an algorithm scheme;

  • the parameter-driven generator of algorithms on the basis of higher level schemes, called hyper schemes [3];

  • the database, containing the description of SAA operations, basic operators and predicates, and also their program implementations.

To automate the transformation (e.g. parallelization) of algorithms and programs, the IDS system is used together with the term rewriting system Termware [4, 21].

In previous works [15], the SAA structure and developed software tools were applied in automated design and generation of parallel programs for multicore central processing units and graphics processor units, in particular, in the subject domain of weather forecasting.

In the next sections, we further develop these in the direction of their application for the three-dimensional case of the meteorological forecasting problem, and also for automation of software development for an Internet portal providing weather prediction services.

3 Design of a Parallel Algorithm for Solving a Convection-Diffusion Problem

In this section we illustrate the usage of SAA and the IDS toolkit [1, 3, 5] on an example of developing a parallel program for a numerical solution of a convection-diffusion problem (CDP).

3.1 The Mathematical Model of the Convection-Diffusion Problem

The mathematical model of CDP [22] is a combination of the diffusion and convection equations and describes physical phenomena where particles, energy, or other physical quantities are transferred inside a physical system due to two processes:diffusion and convection.

Here we will consider the three-dimensional CDP, which arises in mathematical modeling of atmosphere circulation in meteorology [7]. The problem to be solved is presented as the set of the following convection-diffusion equations:

ut+uacosϕuλ+vavϕ+wvz=1ρacosϕpλ+vsinϕwcosϕ2ω+uacosϕ+1ρFλ,(1)
vt+uacosϕvλ+vavϕ+wvz=1ρapϕu2ω+uacosϕsinϕwva+1ρFϕ,(2)
1acosϕuλ+1avϕ+wzvatanϕ=0,(3)
Tt+uacosϕTλ+vaTϕ+wTz=δcVρ,(4)
p=ρRCT.(5)

Here u and v are horizontal components and w is the vertical component of the wind velocity vector V = (u, v, w); λ, ϕ and z are longitude, latitude and altitude respectively; t is time; a is the Earth’ radius; ρ is air density; p is atmospheric pressure; w is the Earth’s rotation speed; Fλ and Fϕ are the components of the frictional force density vector Ff = (Fλ, Fϕ, Fz); T is absolute temperature; δ is heat penetration per unit of air volume; cV is the specific heat capacity of dry air; RC is the specific gas constant of dry air.

From Equations (1) and (2) we obtain the horizontal components u and v of the wind velocity vector, from Equation (3) the vertical component w of the vector, from Equation (4) the temperature T, and from Equation (5) the density ρ.

3.2 The Parallel Algorithm Scheme for Solving the Convection-Diffusion Problem

The parallel numerical implementation of the above model (1)(5) is based on the following algorithm which parallelizes the task over three levels:

  • the equations (each equation is solved independently);

  • space directions λ, ϕ and z;

  • the subdomains for each space direction. The computation domain is decomposed along λ for the subtasks in the directions ϕ and z and along ϕ for subtasks in the direction λ.

The algorithm uses the modified additive-averaged splitting method [23]. The general scheme of the calculation is iterative. The input data determine the state of an atmosphere at the initial moment of time t0. To obtain the prognosis for some moment CALC_TIME > t0 the time segment is divided into TmKnotsPer12h relatively short segments of size τ = CALC_TIME/TmKnotsPer12h. At each iteration, the algorithm calculates the state of the atmosphere after the time τ and its output data become input (initial) data for the next iteration. Increase of the step τ results in a reduction of the number of iterations but leads to an increase in prognosis error, which is why it is recommended that the value of τ be chosen from the interval [0.5, 10] seconds. At each iteration, the equations for each coordinate direction are solved independently and then the results are gathered and processed, which requires synchronization. The usage of the modified additive-averaged splitting method allows the combination of several iterations (let’s denote the number of iterations by m) into one, which reduces the synchronization overhead. Increase in value of the parameter m also results in loss of adequacy of the solution and the recommended interval of values is m ∈ [1, 10].

Below, we give the generalized SAA scheme for the parallel algorithm developed for the solution of the convection-diffusion problem. The scheme was designed in the IDS toolkit with the usage of SAA language constructs which were described in Section 2.1.

  1. SCHEME “Parallel Algorithm for Solving the 3-Dimensional Convection-Diffusion Problem”

  2. “Main scheme” =

    1. “Set initial parameters (Subdomains, M_prm,TmKnotsPer12h, TmLimCalc, tau)”;

    2. “Start the timer”;

    3. “Load the data to arrays for (p, u, v, w, T)”;

    4. (Proc_Num := “Parallel computation”);

    5. “Stop the timer and print the execution time”;

    6. “Compare the computed values with actual values and calculate an error”;

    7. “Save the data to files for the 3-dimensional convection-diffusion problem”;

  3. “Parallel computation” =

    1. “Initialization of data”;

    2. (NmbThreads := Subdomains * DIR * * EVL_MT_VAL);

    3. PARALLEL (proc = 0, ..., NmbThreads–1)

    4. (

      1. “Initialization of variables and arrays according to the value of (proc)”;

      2. “(n := M_prm)”;

      3. “Comment (*** The m-loop: ***)”;

      4. WHILE ‘(n * tau <= TmLimCalc)’

      5. LOOP

        1. “Set actual values for u, v, w, p, T, D,

        2. F, C and the boundary conditions”;

        3. SELECT

        4. (

          1. [‘(dir) = (0)’] →

          2. “Compute the subtasks for (Lam)

          3. direction”,

          4. [‘(dir) = (1)’] →

          5. “ Compute the subtasks for (Fi)

          6. direction”,

          7. [‘(dir) = (2)’] →

          8. “ Compute the subtasks for (Z)

          9. direction”

        5. );

        6. “Interchange values of intermediate arrays”;

        7. WAIT ‘All threads completed work’;

        8. “Compute the average on the basis of the results obtained for each direction”;

        9. WAIT ‘All threads completed work’;

        10. “Storing the results to global arrays”;

        11. WAIT ‘All threads completed work’;

        12. “Increase (n) by (M_prm)”;

      6. END OF LOOP;

      7. “Deallocate the memory for arrays for 3-dimensional convection-diffusion problem”

    5. );

    6. “Return value (NmbThreads)”;

  4. END OF SCHEME

The above scheme consists of two parts, “Main scheme” and “Parallel computation”, which are compound operators and correspond to subroutines in a program to be generated in a target programming language (C++).

The compound operator “Main scheme”is composed of the operators: setting the initial parameters of the algorithm; measuring the execution time of the program; loading the data into arrays in which the main values of the problem are stored; calling the “Parallel computation” compound operator; comparing the computed values and saving the results data to files. The main scheme contains the following variables: Subdomains ≥ 1 is the number of subregions for each of the space directions; M_prm ∈ [1, 10] is the parameter (m) of the modified additive-averaged splitting method [23]; TmKnotsPer12h is the number of points in the time mesh for a twelve-hour period; TmLimCalc is the final value of time (in seconds) in the condition of the while loop; tau is the time step (in seconds), which is defined according to the formula: tau = CALC_TIME/TmKnotsPer12h, where CALC_TIME is the end time for calculating the prognosis; u, v, w are the components of the wind velocity vector; p is atmospheric pressure; T is absolute temperature; Proc_Num is the number of threads.

The compound operator “Parallel computation” is composed of the initialization operators and the parallel region. The parallel region contains the operators of initialization of variables and arrays and the m-loop of the modified additive-averaged splitting method [23]. The beginning of the m-loop body contains the preparation for the main computation, namely, setting current values for u, v, w, p and boundary conditions, calculation of equation coefficients, etc. Then the subtasks for each direction λ, ϕ and z are computed. Next, the average values are calculated based on the results obtained for each direction. At the end of the loop, the results are saved to global arrays.

The meanings of the main constants and variables of the parallel scheme are as follows. The variable NmbThreads is the number of threads, which is calculated according to the formula:

NmbThreads=SubdomainsDIREVL_MT_VAL,(6)

where DIR = 3 is the number of space directions (λ, ϕ, z); EVL_MT_VAL is the number of meteorological values in the evolution equation.

The variable proc in the scheme is the index of the current thread; n is a loop variable; D is air density; F is an equation coefficient; C is an advection coefficient; dir is an integer variable for storing the value of the space direction being processed (0 for λ, 1 for ϕ and 2 for z); Lam, Fi and Z are the parameters, which correspond to space directions.

The IDS toolkit automatically translated the above SAA scheme into C++ source code with the usage of OpenMP directives [24]. The translation process is based on usage of program code templates which are defined for each high-level SAA construction and stored in the database of IDS. In particular, the SAA operation of asynchronous execution of operators (PARALLEL) was implemented using the OpenMP construction “#pragma omp parallel”. The fragment of C++ source code, generated for this operation, is given below.

  1. // PARALLEL (proc = 0, ..., NmbThreads-1)

  2. omp_set_num_threads(NmbThreads);

  3. #pragma omp parallel

  4. {

    1. // Get thread index:

    2. int proc = omp_get_thread_num();

    3. // Get the total number of threads:

    4. #pragma omp master

    5. {

      1. NmbThreads = omp_get_num_threads();

      2. printf(“\n Number of threads: \%d. \n”, NmbThreads);

    6. }

    7. ...

  5. }

The synchronizer operation (WAIT) is translated into the “#pragma omp barrier”directive.

4 Designing the Online Weather Forecasting Service

In this section, we illustrate the usage of SAA and the Synthesis framework [5] on the example of designing a fragment of an online service, which is part of the system developed here for providing meteorological forecasting services [8]. The system consists of the components shown in Figure 2.

Figure 2 The architecture of the online system providing meteorological services.
Figure 2

The architecture of the online system providing meteorological services.

The Web Portal provides the user interface for accessing the services of the system. It was implemented using a free open source enterprise portal software product Liferay [25].

The Service for Managing Meteorological Prognoses is a service which performs the functions of planning, synchronizing and managing the system. It receives and processes the requests which contain the information about time, place, and type of prognosis.

The Providers of Meteorological Data are one or several providers of the initial meteorological data which are the basis for computing prognoses. At present, the initial data are provided by the meteorological center located in Offenbach, Germany [26].

The Providers of Prognoses are external systems which provide meteorological forecasting services. The present implementation of our system uses the OpenWeatherMap service [27] as an external prognosis provider.

The Database of the system contains the initial meteorological data and the resulting data of prognoses which are computed on the basis of initial data. PostgreSQL [28] was used as the database management system.

The Service for Computing Meteorological Prognoses performs the calculation of prognoses with the usage of the parallel program which is executed on a multiprocessor platform (a cluster).

Most of the system was written in Java, except for parallel programs which implement numerical weather prediction which were written in the C++ language with the usage of OpenMP. The programs implement the solution of the two-dimensional and three-dimensional convection-diffusion problem. The design of the algorithm scheme for the three-dimensional case of the problem was considered above in Section 3.

Below we give the SAA scheme of the Java class Prediction3DServiceImpl, which is one of the software components of the weather forecasting system considered here. The methods of this class are intended for finding, saving, creating and deleting prognoses, which are stored in the database of the system. The scheme was designed in the Synthesis framework [5] with the usage of the SAA language constructs described in Section 2.2.

  1. Annotated class X implements Y (Prediction3DServiceImpl, Prediction3DService)

  2. <Annotations>

    1. Annotation (Service)

  3. <Fields>

  4. Field initialized (private static final, Logger, LOGGER)

    1. <Initialization>

      1. Call instance method (Logger, getLogger, Prediction3DServiceImpl.class);

  5. Field annotated (public, Prediction3DRepository, prediction3dRepository)

    1. <Annotations>

      1. Annotation (Resource)

  6. <Methods>

  7. Method annotated (Prediction3D, findById, Long id)

    1. <Annotations>

      1. Annotation (Override);

      2. Annotation (Transactional)

    2. <Body>

      1. Call instance method (LOGGER, debug, “Trying get prediction3d #” + id + “from DB”);

      2. Return (Call instance method (prediction3dRepository, findById, id));

  8. Method annotated (void, savePrediction, Prediction3Dprediction)

    1. <Annotations>

      1. Annotation (Override);

      2. Annotation (Transactional)

    2. <Body>

      1. Assign (prediction, Call instance method (prediction3dRepository, save, prediction);

      2. Call instance method (LOGGER, debug, “Prediction3D #” + prediction.getId() + “has been saved to DB“);

  9. Method annotated (Long, createPrediction, Prediction3Dprediction)

    1. <Annotations>

      1. Annotation (Override)

    2. <Body>

      1. Assign (prediction, Call instance method (prediction3dRepository, save, prediction));

      2. Return (Call instance method (prediction, getId));

  10. Method annotated (void, deletePrediction, Long id)

    1. <Annotations>

      1. Annotation (Override)

    2. <Body>

      1. Call instance method (prediction3dRepository, delete, id);

In the above scheme, the class Prediction3D-ServiceImpl is defined using the construction “Annotated class X implements Y” (see Subsection 2.2). The parameters of the construction are the class name and the interface name (Prediction3DService). After the class header, the class annotation and the definitions of class fields and methods are given.

The class fields are the initialized field LOGGER and the annotated field prediction3DRepository. The LOGGER field is an instance of the Logger class, the methods of which are intended for writing the messages to a journal (log). The prediction3DRepository field presents the database of the system.

The Prediction3DServiceImpl class contains four methods. The findById method is aimed at searching the computed prognosis in the database according to id number. The methods savePrediction,createPrediction and deletePrediction are intended for saving, creating and deleting prognoses from the database, respectively.

The Synthesis framework automatically translated the above scheme into the following Java source code of the Prediction3DServiceImpl class:

  1. @Service

  2. public class Prediction3DServiceImpl implements Prediction3DService

  3. {

    1. private static final Logger LOGGER = Logger.getLogger(Prediction3DServiceImpl.class);

    2. @Resource public Prediction3DRepository prediction3dRepository;

    3. @Override

    4. @Transactional

    5. public Prediction3D findById(Long id)

    6. {

      1. LOGGER.debug(“Trying get prediction3d #” + id + “from DB”);

      2. return prediction3dRepository.findById(id);

    7. }

    8. @Override

    9. @Transactional

    10. public void savePrediction(Prediction3D prediction)

    11. {

      1. prediction = prediction3dRepository.save(prediction);

      2. LOGGER.debug(“Prediction3D #” + prediction.getId() + “has been saved to DB”);

    12. }

    13. @Override

    14. public Long createPrediction(Prediction3D prediction)

    15. {

      1. prediction = prediction3dRepository.save(prediction);

      2. return prediction.getId();

    16. }

    17. @Override

    18. public void deletePrediction(Long id)

    19. {

      1. prediction3dRepository.delete(id);

    20. }

  4. }

5 Experiment Results

We carried out two independent experiments, which consisted of execution of the OpenMP program developed here for solving the weather forecasting problem, on the following two multiprocessor platforms:

  • a node of the cluster of the Institute of Software Systems (ISS), which contains two Quad-Core Intel Xeon E5405 processors (8 cores in total on the node);

  • a node of the SCIT-4 supercomputer of the Institute of Cybernetics [29], which contains two Intel Xeon X5675 processors (altogether 12 physical cores, or 24 logical cores in hyperthreading mode, on the node).

During the experiments we used the following values of program parameters (see Section 3): the time for calculating the prognosis CALC_TIME = 43200 seconds (12 hours); the parameter of the modified additive-averaged splitting method [23] M_prm = 10; the number of time knots TmKnotsPer12h = 4320; the final time TmLimCalc = 43200 seconds (12 hours); the time step tau = 10 seconds. The space domain of the problem definition was λ ∈ [0°, 90°], ϕ ∈ [0°, 90°], z ∈ [8000; 18000]. The size of the input finite-difference mesh was 182 × 182 × 11 points. The number of threads was set according to the formula (6), given in Section 3.2:NmbThreads = Subdomains * 3 * 3.

Figure 3 shows the obtained values for the efficiency of the parallel program

E=SpN,
Figure 3 The values of the efficiency of the parallel program obtained on SCIT-4 and ISS clusters at three values of the number of subdomains.
Figure 3

The values of the efficiency of the parallel program obtained on SCIT-4 and ISS clusters at three values of the number of subdomains.

where Sp=T(1)T(N) is the multiprocessor speedup, T(1) denotes the execution time of the corresponding sequential program, T(N) is the execution time of the parallel program, N is the number of cores. On ISS cluster the number of cores N = 8 and on SCIT-4 N = 12.

The program was executed at three values of Subdomains: 1, 2 and 3; the number of threads NmbThreads was set to 9, 18 and 27, correspondingly.

On SCIT-4, the maximum efficiency 0.98 was obtained at the value of Subdomains = 2, which is optimal at the currently used number of processor cores. On ISS, the maximum efficiency was 0.74 at Subdomains = 3. The higher efficiency obtained on the SCIT-4 cluster is explained by the presence of hyperthreading.

6 Conclusion

We developed software tools for an automated design of efficient parallel code in the OpenMP environment. The distinctive feature of our approach consists of using high-level algebra-algorithmic program specifications which are represented in a natural linguistic form. The developed tools automatically translate the specifications into source code in a programming language. The usage of the proposed toolset is illustrated with an example of parallel program development for solving a problem of atmosphere circulation modeling. The program is used in an Internet portal which provides meteorological forecasting services.

References

[1] Andon F.I., Doroshenko A.Y., Tseytlin G.O., Yatsenko O.A., Algebra-algorithmic models and methods of parallel programming, Akademperiodika, Kyiv, 2007, (in Russian)Suche in Google Scholar

[2] Doroshenko A., Tseytlin G., Yatsenko O., Zachariya L., A theory of clones and formalized design of programs, In: G. Lindemann, H. Schlingloff, H.-D. Burkhard, L. Czaja, W. Penczek, A. Salwicky, et al. (Eds.), Proceedings of the 15th International Workshop “Concurrency, Specification and Programming” CS&P‘ 2006 (27–29 September 2006, Wandlitz, Germany), Humboldt University Press, Berlin, 2006, 328-339Suche in Google Scholar

[3] Yatsenko O., On parameter-driven generation of algorithm schemes, In: L. Popova-Zeugmann (Ed.), Proceedings of the 21th International Workshop “Concurrency, Specification and Programming” CS&P’2012 (26-28 September 2012, Berlin, Germany), Humboldt University Press, Berlin, 2012, 428-438Suche in Google Scholar

[4] Doroshenko A., Zhereb K., Yatsenko O., Developing and optimizing parallel programs with algebra-algorithmic and term rewriting tools, In: V. Ermolayev, H.C. Mayr, M. Nikitchenko, A. Spivakovsky, G. Zholtkevych (Eds.), Proceedings of the 9th International Conference “ICT in Education, Research, and Industrial Applications” ICTERI 2013, Revised Selected Papers (19-22 June 2013, Kherson, Ukraine), Springer, Berlin, 2013, 70-9210.1007/978-3-319-03998-5_5Suche in Google Scholar

[5] Andon F.I., Doroshenko A.E., Beketov A.G., Iovchev V.A., Yatsenko E.A., Software tools for automation of parallel programming on the basis of algebra of algorithms, Cybernetics and Systems Analysis, 2015, 51, 142-14910.1007/s10559-015-9706-0Suche in Google Scholar

[6] Coiffier J., Fundamentals of numerical weather prediction, Cambridge University Press, Cambridge, 201210.1017/CBO9780511734458Suche in Google Scholar

[7] Prusov V.A., Doroshenko A.E., Chernysh R.I., A method for numerical solution of a multidimensional convection-diffusion problem, Cybernetics and Systems Analysis, 2009, 45, 89-9510.1007/s10559-009-9074-8Suche in Google Scholar

[8] Doroshenko A. Yu., Ivanenko P.A., Ovdii O.M., Pavliuchyn T.O., Vitriak I.A., Creation of an Internet portal providing meteorological forecasting services on multiprocessor platform, Problems in Programming, 2015, 3, 24-32, (in Ukrainian)Suche in Google Scholar

[9] Sannella D., Tarlecki A., Foundations of algebraic specification and formal software development, Springer, Berlin, 201210.1007/978-3-642-17336-3Suche in Google Scholar

[10] Flener P., Achievements and prospects of program synthesis, In: Kakas A.C., Sadri F. (Eds.), Computational Logic: Logic Programming and Beyond. Essays in Honour of Robert A. Kowalski, Part I, Springer, Berlin, 2002, 310-34610.1007/3-540-45628-7_13Suche in Google Scholar

[11] Leonard E.I., Heitmeyer C.L., Automatic program generation from formal specifications using APTS, In: Danvy O., Mairson H., Henglein F., Pettorossi A. (Eds.), Automatic Program Development. A Tribute to Robert Paige, Springer Science, Dordrecht, 2008, 93-11310.1007/978-1-4020-6585-9_10Suche in Google Scholar

[12] Gulwani S., Dimensions in program synthesis, In: Proceedings of the 12th international ACM SIGPLAN symposium on Principles and Practice of Declarative Programming (26-28 July 2010, Hagenberg, Austria), ACM, New York, 2010, 13-2410.1145/1836089.1836091Suche in Google Scholar

[13] Aloor R., A framework for automatic OpenMP code generation, Master’s thesis, Indian Institute of Technology, Madras, India, 2011, http://www.cse.iitm.ac.in/~raghesh/raghesh-a-masters-thesis.pdfSuche in Google Scholar

[14] PLUTO – An automatic parallelizer and locality optimizer for affine loop nests, http://pluto-compiler.sourceforge.netSuche in Google Scholar

[15] Hu K., Zhang T., Yang Z., Multi-threaded code generation from Signal program to OpenMP, Frontiers of Computer Science, 2013, 7, 617-62610.1007/s11704-013-3906-4Suche in Google Scholar

[16] PIPS: Automatic Parallelizer and Code Transformation Frame-work, http://pips4u.orgSuche in Google Scholar

[17] Kabir M.H., Automatic construction of Java programs from functional program specifications, International Journal of Advanced Chemical Science and Applications, 2015, 6, 65-7210.14569/IJACSA.2015.060409Suche in Google Scholar

[18] Schoeberl M., Brooks C., Lee E.A., Code generation for embedded Java with Ptolemy, In: S.L. Min, R. Pettit, T. Ungerer (Eds.), Proceedings of the 8th IFIP Workshop on Software Technologies for Embedded and Ubiquitous Systems, (13-15 October 2010, Waidhofen, Austria), Springer, Berlin, 2010, 155-166Suche in Google Scholar

[19] Usman M., Nadeem A., Automatic generation of Java code from UML diagrams using UJECTOR, International Journal of Software Engineering and Its Applications, 2009, 3, 21-38Suche in Google Scholar

[20] Java documentation. The Java Tutorials. Lesson: Annotations, https://docs.oracle.com/javase/tutorial/java/annotationsSuche in Google Scholar

[21] Doroshenko A., Shevchenko R., A rewriting framework for rule-based programming dynamic applications, Fundamenta Informaticae, 2006, 72, 95-108Suche in Google Scholar

[22] Kaper H., Engler H., Mathematics and climate, Society for Industrial & Applied Mathematics, Philadelphia, PA, 201310.1137/1.9781611972610Suche in Google Scholar

[23] Prusov V.A., Doroshenko A.E., Chernysh R.I., Choosing the parameter of a modified additive-averaged splitting algorithm, Cybernetics and Systems Analysis, 2009, 45, 589-59610.1007/s10559-009-9126-0Suche in Google Scholar

[24] OpenMP Application Programming Interface. Version 4.5, 2015, http://www.openmp.org/wp-content/uploads/openmp-4.5.pdfSuche in Google Scholar

[25] LIFERAY, http://www.liferay.comSuche in Google Scholar

[26] Wetter und Klima – Deutscher Wetterdienst, http://www.dwd. deSuche in Google Scholar

[27] OpenWeatherMap, http://openweathermap.orgSuche in Google Scholar

[28] The PostgreSQL Global Development Group, PostgreSQL 9.0.22 Documentation, http://www.postgresql.org/files/documentati on/pdf/9.0/postgresql-9.0-A4.pdfSuche in Google Scholar

[29] Supercomputer of IC, http://icybcluster.org.ua/index.php? lang_id=3&menu_id=1Suche in Google Scholar

Received: 2016-6-8
Accepted: 2016-10-26
Published Online: 2016-12-10
Published in Print: 2016-1-1

© 2016 A. Doroshenko et al.

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 3.0 License.

Artikel in diesem Heft

  1. Regular articles
  2. Speeding of α Decay in Strong Laser Fields
  3. Regular articles
  4. Multi-soliton rational solutions for some nonlinear evolution equations
  5. Regular articles
  6. Thin film flow of an Oldroyd 6-constant fluid over a moving belt: an analytic approximate solution
  7. Regular articles
  8. Bilinearization and new multi-soliton solutions of mKdV hierarchy with time-dependent coefficients
  9. Regular articles
  10. Duality relation among the Hamiltonian structures of a parametric coupled Korteweg-de Vries system
  11. Regular articles
  12. Modeling the potential energy field caused by mass density distribution with Eton approach
  13. Regular articles
  14. Climate Solutions based on advanced scientific discoveries of Allatra physics
  15. Regular articles
  16. Investigation of TLD-700 energy response to low energy x-ray encountered in diagnostic radiology
  17. Regular articles
  18. Synthesis of Pt nanowires with the participation of physical vapour deposition
  19. Regular articles
  20. Quantum discord and entanglement in grover search algorithm
  21. Regular articles
  22. On order statistics from nonidentical discrete random variables
  23. Regular articles
  24. Charmed hadron photoproduction at COMPASS
  25. Regular articles
  26. Perturbation solutions for a micropolar fluid flow in a semi-infinite expanding or contracting pipe with large injection or suction through porous wall
  27. Regular articles
  28. Flap motion of helicopter rotors with novel, dynamic stall model
  29. Regular articles
  30. Impact of severe cracked germanium (111) substrate on aluminum indium gallium phosphate light-emitting-diode’s electro-optical performance
  31. Regular articles
  32. Slow-fast effect and generation mechanism of brusselator based on coordinate transformation
  33. Regular articles
  34. Space-time spectral collocation algorithm for solving time-fractional Tricomi-type equations
  35. Regular articles
  36. Recent Progress in Search for Dark Sector Signatures
  37. Regular articles
  38. Recent progress in organic spintronics
  39. Regular articles
  40. On the Construction of a Surface Family with Common Geodesic in Galilean Space G3
  41. Regular articles
  42. Self-healing phenomena of graphene: potential and applications
  43. Regular articles
  44. Viscous flow and heat transfer over an unsteady stretching surface
  45. Regular articles
  46. Spacetime Exterior to a Star: Against Asymptotic Flatness
  47. Regular articles
  48. Continuum dynamics and the electromagnetic field in the scalar ether theory of gravitation
  49. Regular articles
  50. Corrosion and mechanical properties of AM50 magnesium alloy after modified by different amounts of rare earth element Gadolinium
  51. Regular articles
  52. Genocchi Wavelet-like Operational Matrix and its Application for Solving Non-linear Fractional Differential Equations
  53. Regular articles
  54. Energy and Wave function Analysis on Harmonic Oscillator Under Simultaneous Non-Hermitian Transformations of Co-ordinate and Momentum: Iso-spectral case
  55. Regular articles
  56. Unification of all hyperbolic tangent function methods
  57. Regular articles
  58. Analytical solution for the correlator with Gribov propagators
  59. Regular articles
  60. A New Algorithm for the Approximation of the Schrödinger Equation
  61. Regular articles
  62. Analytical solutions for the fractional diffusion-advection equation describing super-diffusion
  63. Regular articles
  64. On the fractional differential equations with not instantaneous impulses
  65. Topical Issue: Uncertain Differential Equations: Theory, Methods and Applications
  66. Exact solutions of the Biswas-Milovic equation, the ZK(m,n,k) equation and the K(m,n) equation using the generalized Kudryashov method
  67. Topical Issue: Uncertain Differential Equations: Theory, Methods and Applications
  68. Numerical solution of two dimensional time fractional-order biological population model
  69. Topical Issue: Uncertain Differential Equations: Theory, Methods and Applications
  70. Rotational surfaces in isotropic spaces satisfying weingarten conditions
  71. Topical Issue: Uncertain Differential Equations: Theory, Methods and Applications
  72. Anti-synchronization of fractional order chaotic and hyperchaotic systems with fully unknown parameters using modified adaptive control
  73. Topical Issue: Uncertain Differential Equations: Theory, Methods and Applications
  74. Approximate solutions to the nonlinear Klein-Gordon equation in de Sitter spacetime
  75. Topical Issue: Uncertain Differential Equations: Theory, Methods and Applications
  76. Stability and Analytic Solutions of an Optimal Control Problem on the Schrödinger Lie Group
  77. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  78. Logical entropy of quantum dynamical systems
  79. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  80. An efficient algorithm for solving fractional differential equations with boundary conditions
  81. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  82. A numerical method for solving systems of higher order linear functional differential equations
  83. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  84. Nonlinear self adjointness, conservation laws and exact solutions of ill-posed Boussinesq equation
  85. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  86. On combined optical solitons of the one-dimensional Schrödinger’s equation with time dependent coefficients
  87. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  88. On soliton solutions of the Wu-Zhang system
  89. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  90. Comparison between the (G’/G) - expansion method and the modified extended tanh method
  91. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  92. On the union of graded prime ideals
  93. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  94. Oscillation criteria for nonlinear fractional differential equation with damping term
  95. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  96. A new method for computing the reliability of consecutive k-out-of-n:F systems
  97. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  98. A time-delay equation: well-posedness to optimal control
  99. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  100. Numerical solutions of multi-order fractional differential equations by Boubaker polynomials
  101. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  102. Laplace homotopy perturbation method for Burgers equation with space- and time-fractional order
  103. Topical Issue: Recent Developments in Applied and Engineering Mathematics
  104. The calculation of the optical gap energy of ZnXO (X = Bi, Sn and Fe)
  105. Special Issue: Advanced Computational Modelling of Nonlinear Physical Phenomena
  106. Analysis of time-fractional hunter-saxton equation: a model of neumatic liquid crystal
  107. Special Issue: Advanced Computational Modelling of Nonlinear Physical Phenomena
  108. A certain sequence of functions involving the Aleph function
  109. Special Issue: Advanced Computational Modelling of Nonlinear Physical Phenomena
  110. On negacyclic codes over the ring ℤp + up + . . . + uk + 1p
  111. Special Issue: Advanced Computational Modelling of Nonlinear Physical Phenomena
  112. Solitary and compacton solutions of fractional KdV-like equations
  113. Special Issue: Advanced Computational Modelling of Nonlinear Physical Phenomena
  114. Regarding on the exact solutions for the nonlinear fractional differential equations
  115. Special Issue: Advanced Computational Modelling of Nonlinear Physical Phenomena
  116. Non-local Integrals and Derivatives on Fractal Sets with Applications
  117. Special Issue: Advanced Computational Modelling of Nonlinear Physical Phenomena
  118. On the solutions of electrohydrodynamic flow with fractional differential equations by reproducing kernel method
  119. Special issue on Information Technology and Computational Physics
  120. On uninorms and nullnorms on direct product of bounded lattices
  121. Special issue on Information Technology and Computational Physics
  122. Phase-space description of the coherent state dynamics in a small one-dimensional system
  123. Special issue on Information Technology and Computational Physics
  124. Automated Program Design – an Example Solving a Weather Forecasting Problem
  125. Special issue on Information Technology and Computational Physics
  126. Stress - Strain Response of the Human Spine Intervertebral Disc As an Anisotropic Body. Mathematical Modeling and Computation
  127. Special issue on Information Technology and Computational Physics
  128. Numerical solution to the Complex 2D Helmholtz Equation based on Finite Volume Method with Impedance Boundary Conditions
  129. Special issue on Information Technology and Computational Physics
  130. Application of Genetic Algorithm and Particle Swarm Optimization techniques for improved image steganography systems
  131. Special issue on Information Technology and Computational Physics
  132. Intelligent Chatter Bot for Regulation Search
  133. Special issue on Information Technology and Computational Physics
  134. Modeling and optimization of Quality of Service routing in Mobile Ad hoc Networks
  135. Special issue on Information Technology and Computational Physics
  136. Resource management for server virtualization under the limitations of recovery time objective
  137. Special issue on Information Technology and Computational Physics
  138. MODY – calculation of ordered structures by symmetry-adapted functions
  139. Special issue on Information Technology and Computational Physics
  140. Survey of Object-Based Data Reduction Techniques in Observational Astronomy
  141. Special issue on Information Technology and Computational Physics
  142. Optimization of the prediction of second refined wavelet coefficients in electron structure calculations
  143. Special Issue on Advances on Modelling of Flowing and Transport in Porous Media
  144. Droplet spreading and permeating on the hybrid-wettability porous substrates: a lattice Boltzmann method study
  145. Special Issue on Advances on Modelling of Flowing and Transport in Porous Media
  146. POD-Galerkin Model for Incompressible Single-Phase Flow in Porous Media
  147. Special Issue on Advances on Modelling of Flowing and Transport in Porous Media
  148. Effect of the Pore Size Distribution on the Displacement Efficiency of Multiphase Flow in Porous Media
  149. Special Issue on Advances on Modelling of Flowing and Transport in Porous Media
  150. Numerical heat transfer analysis of transcritical hydrocarbon fuel flow in a tube partially filled with porous media
  151. Special Issue on Advances on Modelling of Flowing and Transport in Porous Media
  152. Experimental Investigation on Oil Enhancement Mechanism of Hot Water Injection in tight reservoirs
  153. Special Issue on Research Frontier on Molecular Reaction Dynamics
  154. Role of intramolecular hydrogen bonding in the excited-state intramolecular double proton transfer (ESIDPT) of calix[4]arene: A TDDFT study
  155. Special Issue on Research Frontier on Molecular Reaction Dynamics
  156. Hydrogen-bonding study of photoexcited 4-nitro-1,8-naphthalimide in hydrogen-donating solvents
  157. Special Issue on Research Frontier on Molecular Reaction Dynamics
  158. The Interaction between Graphene and Oxygen Atom
  159. Special Issue on Research Frontier on Molecular Reaction Dynamics
  160. Kinetics of the austenitization in the Fe-Mo-C ternary alloys during continuous heating
  161. Special Issue: Functional Advanced and Nanomaterials
  162. Colloidal synthesis of Culn0.75Ga0.25Se2 nanoparticles and their photovoltaic performance
  163. Special Issue: Functional Advanced and Nanomaterials
  164. Positioning and aligning CNTs by external magnetic field to assist localised epoxy cure
  165. Special Issue: Functional Advanced and Nanomaterials
  166. Quasi-planar elemental clusters in pair interactions approximation
  167. Special Issue: Functional Advanced and Nanomaterials
  168. Variable Viscosity Effects on Time Dependent Magnetic Nanofluid Flow past a Stretchable Rotating Plate
Heruntergeladen am 13.9.2025 von https://www.degruyterbrill.com/document/doi/10.1515/phys-2016-0048/html
Button zum nach oben scrollen