Enabling automatic parallelization
The compiler can automatically locate and parallelize all countable loops where possible in your program code. A loop is considered to be countable if it has any of the forms shown in Countable loops, and:
- There is no branching into or out of the loop.
- The increment_expression is not within a critical section.
In general, a countable loop is automatically parallelized only if all of the following conditions are met:
- The order in which loop iterations start or end does not affect the results of the program.
- The loop does not contain I/O operations.
- Floating point reductions inside the loop are not affected by round-off error, unless the -qnostrict option is in effect.
- The -qnostrict_induction compiler option is in effect.
- The -qsmp=auto compiler option is in effect.