Parallelization with OpenMP*

The OpenMP* C/C++ API has recently emerged as the de facto standard for shared memory, parallel programming. It shelters you from having to deal with the low-level details of iteration partitioning, data sharing, thread scheduling, and synchronization. The Intel® C++ Compiler supports the OpenMP* API version 1.0 and performs code transformation to generate multithreaded code automatically as determined by your OpenMP* directive annotations to the program.

Note

As with many advanced features of compilers, you must be sure to properly understand the functionality of the auto-parallelization switches in order to use them effectively and avoid unwanted program behavior.

OpenMP* Parallelization Reference

Option Description Default Reference
-openmp Enables the parallelizer to generate multi-threaded code based on the OpenMP* directives. The code can be executed in parallel on both uniprocessor and multiprocessor systems. The -openmp option only works at an optimization level of -O2 (the default) or higher. OFF See OpenMP* Standard Options
-openmp_report{0|1|2}

Controls the output of diagnostic messages. The level of the message output is controlled by 0, 1, or 2.
0
= no diagnostic information is displayed.
1
= display diagnostics indicating loops, regions, and sections successfully parallelized (default).
2
= same as 1 plus diagnostics indicating master construct, single construct, critical sections, order construct, atomic directive, etc. successfully handled.