OpenMP: Difference between revisions

369 bytes added ,  6 years ago
no edit summary
(Marked this version for translation)
No edit summary
Line 15: Line 15:
<!--T:5-->
<!--T:5-->
Another important point concerning threads is synchronization. When multiple threads in a program do computations at the same time, one must assume nothing about the order in which things happen. If the order matters for the correctness of the code, then the programmer must use OpenMP synchronization directives to achieve that. Also, the precise distribution of threads over cores is unknown to the programmer (although thread [https://en.wikipedia.org/wiki/Processor_affinity affinity] capabilities are available to control that).
Another important point concerning threads is synchronization. When multiple threads in a program do computations at the same time, one must assume nothing about the order in which things happen. If the order matters for the correctness of the code, then the programmer must use OpenMP synchronization directives to achieve that. Also, the precise distribution of threads over cores is unknown to the programmer (although thread [https://en.wikipedia.org/wiki/Processor_affinity affinity] capabilities are available to control that).
When parallelizing a program using OpenMP (or any other technique) it's important to also consider how well the program is able to run in parallel, known as the software's [[scalability]]. After you've parallelized your software and are satisfied about its correctness, we recommend that you perform a scaling analysis in order to understand its parallel performance.


<!--T:6-->
<!--T:6-->
Bureaucrats, cc_docs_admin, cc_staff
2,306

edits