DS 642: Applications of Parallel Computing Lecture 6 PDF
Document Details
Uploaded by FantasticCyan
NJIT
David A. Bader
Tags
Related
- 2-OpenMP.pdf
- Parallel & Distributed Computing PDF
- 1- Introduction to Parallel Computing.pdf
- Theoretical and Practical Foundations of Parallel Computing in Numerical Methods PDF
- CS621 Parallel and Distributed Computing Short Notes PDF
- Parallel Computing Unit 1 - Introduction to Parallel Computing PDF
Summary
This document is a lecture on parallel computing, specifically covering topics of synchronization and thread management using OpenMP. The NJIT course DS 642 is referenced in the title.
Full Transcript
DS 642: Applications of Parallel Computing Lecture 6 http://www.cs.njit.edu/~bader DS642 1 Synchronization High level synchronization included in the common core (the full OpenMP specification has MANY more): critical barrier Synchronization is used to impose order constraints and to protect access...
DS 642: Applications of Parallel Computing Lecture 6 http://www.cs.njit.edu/~bader DS642 1 Synchronization High level synchronization included in the common core (the full OpenMP specification has MANY more): critical barrier Synchronization is used to impose order constraints and to protect access to shared data 2 Synchronization: critical Mutual exclusion: Only one thread at a time can enter a critical region. float res; #pragma omp parallel { float B; int i, id, nthrds; id = omp_get_thread_num(); Threads wait their turn – only one at a time calls consume() nthrds = omp_get_num_threads(); for(i=id;i