Issues warnings about potential parallel-programming related problems that may cause incorrect results when using OpenMP. Use with -xopenmp and OpenMP API directives.
The compiler issues warnings when it detects the following situations:
Loops are parallelized using MP directives with data dependencies between different loop iterations
OpenMP data-sharing attributes-clauses are problematic. For example, declaring a variable "shared" whose accesses in an OpenMP parallel region may cause a data race, or declaring a variable "private" whose value in a parallel region is used after the parallel region.
No warnings appear if all parallelization directives are processed without problems.
Example:
CC -xopenmp -xvpara any.cc |
Sun Studio compilers support OpenMP 2.5 API parallelization. Consequently, the MP pragmas directives are deprecated and are no longer supported. See the OpenMP API User’s Guide for information on migrating to the OpenMP API.