Oracle® Solaris Studio 12.4: OpenMP API User's Guide

Exit Print View

Updated: December 2014
 
 

7.3 Restrictions When Using Scope Checking

  • Scope checking works only with optimization level -xO3 or higher. Scope checking does not work if the program is compiled with just -xopenmp=noopt.

  • Only OpenMP directives are recognized and used in the analysis. Calls to OpenMP runtime routines are not recognized. For example, if a program uses omp_set_lock() and omp_unset_lock() to implement a critical section, the compiler is not able to detect the existence of the critical section. Use the critical directive if possible.

  • Only synchronizations specified using OpenMP synchronization directives, such as barrier and master, are recognized and used in data race analysis. User-implemented synchronizations such as busy-waiting are not recognized.


Note -  Scope checking with the –xvpara compiler option determines potential problems in the program using static (compile-time) analysis. The Thread Analyzer tool, on the other hand, checks for data races and deadlocks in the program using dynamic (runtime) analysis. Use both of these approaches to detect as many errors as possible in the program.