OpenMP Use: Data Privatization
Most data structures are “private”.
Each thread has its own copy.
Syntactic forms:
Program Seismic
...
C$OMP PARALLEL
C$OMP+PRIVATE(a)
a = “local computation”
call x()
C$END PARALLEL
Subroutine x()
common /cc/ d
c$omp threadprivate (/cc/)
real b(100)
...
b() = “local computation”
d = “local computation”
...
Previous slide
Next slide
Back to first slide
View graphic version