Hello! Recently met a wonderful thing like OpenMP, there are many in the open spaces
Descriptions here or here , but there are no beautiful graphs that would show the effectiveness of this technology. In this post I will try to visually show the effectiveness of working with OpenMP on various platforms. Who cares welcome!
In the modern world there are many different operating systems and new powerful processors that allow you to perform complex calculations with relatively little time. This study was conducted in order to find out in which environment it is most effective to perform laborious calculations, as well as ways to reduce the time spent on calculations.
For the study, an algorithm was chosen - calculating the number of PIs using an integral formula, since this algorithm lends itself well to parallelization and is rather laborious from the point of view of calculations.
For parallelization of the algorithm, it was decided to use openMP technology. This technology allows you to effectively write the same code for different runtime environments, minimizing the errors that are made when a programmer writes code using p_threads or Windows Threads, in Linux and Windows, respectively.
For comparison, 3 runtime environments were selected:
Tests were conducted on a computer with a processor.
Intel Core i7-4771
If many have heard about the first two systems, WSL is still little known. WSL is a feature that appeared in Windows 10 relatively recently. The ubuntu 14.04 kernel has been built into the Win10 kernel. This system allows you to run linux applications while working in Windows; moreover, the user has an almost complete working environment which is as easy to use as opening a conductor. You can read about it for example here .
The data presented on the graphs are averaged; 5 test runs were performed for each OS. The ordinate axis on the graphs is time per second, the values of the divisions of the abscissa axis are given in the table.
one | 2 | 3 | four | five | 6 | 7 | eight | 9 | ten | eleven | 12 | 13 | 14 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
one | 2 | four | 6 | eight | ten | 12 | sixteen | 32 | 64 | 128 | 256 | 512 | 1024 |
Thanks for attention.
Source: https://habr.com/ru/post/325360/
All Articles