OpenMP uses the fork-join parallel execution mode. It is executed by a main thread at the beginning. ProgramThis thread is executed in a serial manner until the first parallel guidance statement is encountered. The process is as follows: ① fork: the main thread creates a thread to execute Code; ② Join: after each thread is executed, it is synchronized or interrupted, and only the main thread is executed.
OpenMP programming is relatively simple. It makes full use of the features of the shared storage Architecture and avoids the overhead of message passing. Although it also supports coarse-grained parallelism, it mainly targets fine-grained loop-level parallelism. Another feature of OpenMP is that you do not need to make major changes to the Code when converting a serial program into a parallel program. Its shortcomings are that it can only run on machines with shared storage structures. Improper data placement may lead to other problems. Low loop granularity of parallelism may increase system overhead.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service