Common Mistakes in Using OpenMP 3: Fifteen Cases from a IWOMP 2006 paper by Michael Süß and Claudia Leopold
June 7th, 2006
The coming International Workshop on OpenMP (IWOMP 2006) has a paper titled “Common Mistakes in OpenMP and How to Avoid Them” written by Michael Süß and Claudia Leopold (University of Kassel, Germany).
The result is based on a survey of two undergraduate courses. The authors of the paper kindly allow me to list the 15 common mistakes presented in their paper here,
- (Correctness) Access to shared variables not protected
- (Correctness) Use of locks without flush
- (Correctness) Read of shared variable without flush
- (Correctness) Forget to mark private variables as such
- (Correctness) Use of ordered clause without ordered construct
- (Correctness) Declare loop variable in #pragma omp parallel for as shared
- (Correctness) Forget to put down for in #pragma omp parallel for
- (Correctness) Try to change num. of thr. in parallel reg. after start of reg.
- (Correctness) omp_unset_lock() called from non-owner thread
- (Correctness) Attempt to change loop variable while in #pragma omp for
- (Performance) Use of critical when atomic would be sufficient
- (Performance) Put too much work inside critical region
- (Performance) Use of orphaned construct outside parallel region
- (Performance) Use of unnecessary flush
- (Performance) Use of unnecessary critical
For detail, please read the full paper.
Categories: Parallel Programming

