#### Topic: Languages for calculations

Now like growth of productivity of processors stopped, the future behind multisequencing - many kernels means, it is a lot of processors in one computer. Whether exist , allowing conveniently  algorithm? I represent it so: in such  there should be two types of cycles - normal and parallel. In normal cycles there is any counter which increases each iteration, and in parallel the system should launch at once many flows, each of which processes the section of storage and has on an input the number - analog of the counter. In these parallel cycles some tasks cannot be implemented - for example, factorial calculation. But as a whole, when it will be necessary to process at one go the big array, they will normally work.

#### Re: Languages for calculations

Hello, Khimik, you wrote: K> in such  there should be two types of cycles - normal and parallel even in conservative  already is stream and parallelStream

#### Re: Languages for calculations

Hello, Khimik, you wrote: K> In these parallel cycles some tasks cannot be implemented - for example, factorial calculation. But as a whole, when it will be necessary to process at one go the big array, they will normally work. For "parallel cycles" separate languages are not necessary, enough libraries. For example Intel TBB, Microsoft PPL, and since a C ++ 17 - generally in STL. There just those parallel cycles, even a title corresponding - parallel_for.

#### Re: Languages for calculations

Hello, Khimik, you wrote: K> I represent it so: in such  there should be two types of cycles - normal and parallel. In normal cycles there is any counter which increases each iteration, and in parallel the system should launch at once many flows, each of which processes the section of storage and has on an input the number - analog of the counter. For a C ++ still is OpenMP - there generally  the most ordinary cycles, by means of adding #pragma. But nevertheless it is better than library of type TBB.

#### Re: Languages for calculations

Hello, Evgeny. Panasyuk, you wrote: EP> Hello, Khimik, you wrote: K>> I represent it so: in such  there should be two types of cycles - normal and parallel. In normal cycles there is any counter which increases each iteration, and in parallel the system should launch at once many flows, each of which processes the section of storage and has on an input the number - analog of the counter. EP> for a C ++ still is OpenMP - there generally  the most ordinary cycles, by means of adding #pragma. But nevertheless it is better than library of type TBB. And what will be, if in it  a normal cycle to try to count a factorial?

#### Re: Languages for calculations

Hello, Khimik, you wrote: EP>> For a C ++ still is OpenMP - there generally  the most ordinary cycles, by means of adding #pragma. But nevertheless it is better than library of type TBB. K> and what will be, if in it  a normal cycle to try to count a factorial? Some flows will be launched and the parallel reduction will be produced - the problem is not present, as multiplication operation is associative: template <typename T> T factorial (T N) {T result = 1; #pragma omp parallel for reduction (*:result) for (T i = 1; i <= N; ++ i) result * = i; return result;} But, again , I instead of OpenMP prefer libraries of type TBB, or a C ++ 17 STL. In the presence of lambdas, an ubiquitous output of types, etc. tricks with  are not necessary.

#### Re: Languages for calculations

Hello, Khimik, you wrote: K> Now like growth of productivity of processors stopped, the future behind multisequencing - many kernels means, it is a lot of processors in one computer. Whether exist , allowing conveniently  algorithm? Languages of 4th generation for example sql. Where the compiler itself synthesizes and  algorithm. K> I represent it so: in such  there should be two types of cycles - normal and parallel. In normal cycles there is any counter which increases each iteration, and in parallel the system should launch at once many flows, each of which processes the section of storage and has on an input the number - analog of the counter. In these parallel cycles some tasks cannot be implemented - for example, factorial calculation. But as a whole, when it will be necessary to process at one go the big array, they will normally work. In such languages of cycles it is not necessary. Simply other primitives - samplings, convolutions, etc.

#### Re: Languages for calculations

Hello, Khimik, you wrote: K> I represent it so: in such  there should be two types of cycles - normal and parallel. It is such children's, amateurish sight. It prevailed in 90. Then thought that if to make the extension of imperative languages all  will be accelerated in so much time, how many at you is processors. In a reality, it is self-deception.  calculations at level of cycles hardly less than it is useless. In the real world there are tasks which well  and those that  is bad. The majority of calculations has an accurate sequence. It would be necessary to calculate at first to calculate And, etc. Parallelit is possible "in big". A simple example. Here there is at us a project which we develop. In it of 100500 files.  analysis one  is almost useless (very difficult and I pound) a little. But  analysis of separate files it is possible simply enough. In my opinion from programming languages of following worship it is necessary to demand not automatic multisequencing, and support of warranties of a correctness of manual multisequencing. Well cannot it is effective  calculations the automatic machine (program). And the person - can. Means it is necessary for it to help. I consider that support of locality of the data and increase of efficiency of change and "copying" of the local data will be following step to mankind development. We are returned to the same files. Here  we a file in a separate flow. Now it is necessary to make so that I could process data retrieveds (and them much) is parallel with the remaining data (from other files) and thus not to have problems with locks and not to copy all data. For this purpose it is necessary that the programmer operated with certain areas of storage which it is possible change only from one control flow. And to give to the programmer a cheap method of transmission "the frozen it is blind information" from one flow in another. Differently it is necessary to make so that flows had no general data, and date transmission from one flow in another was transparent and cheap. I have a mass of thoughts about it. But it demands development of a modern language of programming. And new  for it. The correct thoughts are in Raste. But there all is too difficult that it could enter into a mainstream. It is necessary to teach to manipulate languages heaps. To teach to transfer these heaps between "the virtual processes" (in style the Erlang). For this purpose it is necessary to create programming modern languages.

#### Re: Languages for calculations

Hello, Evgeny. Panasyuk, you wrote: EP> some flows Will be launched and the parallel reduction will be produced - the problem is not present, as multiplication operation is associative: EP> EP> template <typename T> EP> T factorial (T N) EP> {EP> T result = 1; EP> #pragma omp parallel for reduction (*:result) EP> for (T i = 1; i <= N; ++ i) EP> result * = i; EP> return result; EP>} EP> EP> But, again , I instead of OpenMP prefer libraries of type TBB, or a C ++ 17 STL. In the presence of lambdas, an ubiquitous output of types, etc. tricks with  are not necessary.  for , but I do not understand as this code works. It was a question that factorial calculation just is impossible . Or in this code it  partially, type of digit with 2 to 5 are multiplied in one process, with 6 on 9 in other, then two results the factorial of nine is multiplied and turns out?

#### Re: Languages for calculations

Hello, kov_serg, you wrote: _> Languages of 4th generation for example sql. Where the compiler itself synthesizes and  algorithm. On SQL Doom you will not write...

#### Re: Languages for calculations

Hello, Khimik, you wrote: EP>> some flows Will be launched and the parallel reduction will be produced - the problem is not present, as multiplication operation is associative: EP>> EP>> #pragma omp parallel for reduction (*:result) EP>> for (T i = 1; i <= N; ++ i) EP>> result * = i; EP>> K> Sorri for , but I do not understand as this code works. It was a question that factorial calculation just is impossible . Or in this code it  partially, type of digit with 2 to 5 are multiplied in one process, with 6 on 9 in other, then two results the factorial of nine is multiplied and turns out? Yes, so. The parallel reduction is one of basis operations for parallel algorithms, and as for multi-core, for multi-node (a-lja MPI_Reduce), and for GPGPU. That is it is necessary to calculate: a * b * c * d where a, b, c, d - the arbitrary data, and * - the arbitrary associative binary operation. For the associativity account we have possibility to place a bracket as it is required to us (that as a matter of fact reduces dependences between the data): (a * b) * (c * d) And accordingly to calculate operations in brackets parallely. Actually it approaches and for operations with a floating point, in spite of the fact that they not associative. The main thing understand that the result can to depend on the order of calculations, and is frequent these distinctions are admissible (in a case floating point).

#### Re: Languages for calculations

Hello, VladD2, you wrote: VD> In a reality, it is self-deception. VD> Parallelit of calculation at level of cycles hardly less than is useless. Cycles happen not only on a low level, but also on high. You further also give an example: VD> Parallelit is possible "in big". A simple example. In from there is at us a project which we develop. In it of 100500 files.  analysis one  is almost useless (very difficult and I pound) a little. But  analysis of separate files it is possible simply enough. Here is how time parallel analysis of separate files, it also is a cycle on files at high level - parallel transform/map, and can also parallel reduce after, depending on the task.

#### Re: Languages for calculations

Hello, Evgeny. Panasyuk, you wrote: EP> Cycles happen not only on a low level, but also on high. You further also give an example: VD>> Parallelit is possible "in big". A simple example. In from there is at us a project which we develop. In it of 100500 files.  analysis one  is almost useless (very difficult and I pound) a little. But  analysis of separate files it is possible simply enough. EP> here is how time parallel analysis of separate files, it also is a cycle on files at high level - parallel transform/map, and can also parallel reduce after, depending on the task. It any more cycles. It already program structure.  cycles hardly less than it is completely useless.  it is possible only for essence really capable to be processed independently. For today, solve that it is possible  can only the person. On this from language it is required to allow to the person to define as as . And for increase of efficiency and safety to give it mechanisms of control of date transmission between parallel to processes (or other units of parallel performance). Roughly speaking languages providing cheap  processes are necessary. And cheap date transmission in between. Are for this purpose necessary: 1. A warranty of an invariance given different "processes". 2. Cheapness of date transmission (an object graph frost in one process and its transmissions to another). 3. Monitoring aids of sequence of calculations. That the person could behold as calculations  and are returned reversely to synchronous.

#### Re: Languages for calculations

Hello, VladD2, you wrote: EP>> Cycles happen not only on a low level, but also on high. You further also give an example: VD>>> Parallelit is possible "in big". A simple example. In from there is at us a project which we develop. In it of 100500 files.  analysis one  is almost useless (very difficult and I pound) a little. But  analysis of separate files it is possible simply enough. EP>> here is how time parallel analysis of separate files, it also is a cycle on files at high level - parallel transform/map, and can also parallel reduce after, depending on the task. VD> it any more cycles. It already program structure. And this STRUCTURE how expresses? Whether cycles casually? VD> Paralelene of cycles hardly less than is completely useless. If you not all cycles cycles name, and only those which not  it is visible yes. And if without terminological balancing act - that quite has, from here and is visible in parallel libraries (that multi-thread that multi-process that multi-node) primitives of "parallel cycles" type parallel map/transform, reduce, and sometimes and alloyed mapreduce. VD> And for increase of efficiency and safety to give it mechanisms of control of date transmission between parallel to processes (or other units of parallel performance). It only for a subset of those tasks in which date transmission between parallel processes is required. Many tasks express through mapreduce where in processes there is no interaction with others. The same tasks in which there is a constant interaction between processes normally concern not to parallel computing, and to concurrent.

#### Re: Languages for calculations

Hello, Evgeny. Panasyuk, you wrote: EP> And this STRUCTURE how expresses? Whether cycles casually? No. But it not the main thing. The main thing that the primary goal not , and to make so that  calculations did not hinder each other (were isolated). And in that how to unite results of calculations. EP> if you not all cycles cycles name, and only those which not  it is visible yes. And if without terminological balancing act - that quite has, from here and is visible in parallel libraries (that multi-thread that multi-process that multi-node) primitives of "parallel cycles" type parallel map/transform, reduce, and sometimes and alloyed mapreduce. These libraries are in the same way useless. They no more than crutches not solving a problem, but only only  their facilitating. In respect of language means and libraries it is possible to select such  as Rx and ReactiveUI. These are more useful crutches. And there there are no cycles. But even these advanced crutches do not solve a problem of competitive change of the data. For the decision of this problem it is necessary to do modern languages and new  to them. EP> It only for a subset of those tasks in which date transmission between parallel processes is required. Many tasks express through mapreduce where in processes there is no interaction with others. These are 100 % of tasks. All tasks demand operation dataful. Map-redju - no more than algorithm for certain tasks. It any does not give warranties. And for safe and productive programming warranties and control are necessary. EP> the same tasks in which there is a constant interaction between processes normally concern not to parallel computing, and to concurrent. Yes you can though to hell bald that want to carry. It changes nothing. The main problem of parallel calculations in that that it is necessary to supervise change of the data. If it was not so problems would solve banal functions.

#### Re: Languages for calculations

Hello, Kodt, you wrote: High-level - because the price for interstream communication should not exceed advantage of multisequencing. That is, matrixes 10*10 to multiply on several kernels - the sense is not present, and here matrixes 10000*10000 - already are. It is necessary to multiply matrixes on GPU. They are for this purpose intended. And generally, such things should do libraries. Should not write everyone the variant of multiplication of matrixes. In general, the example from a finger is exhausted. Speech almost always goes to realities about challenging tasks with a heap of branchings and the difficult data. And here in these conditions multisequencing of a cycle gives nothing. All essentially is more difficult.