26.06.2015 Views

Parallel Programming in Fortran 95 using OpenMP - People

Parallel Programming in Fortran 95 using OpenMP - People

Parallel Programming in Fortran 95 using OpenMP - People

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

34 2. <strong>OpenMP</strong> constructs<br />

Shared memory<br />

serial region<br />

thread 0<br />

a = ?<br />

parallel reg. 1<br />

❄ ❄ ❄<br />

thread 0 thread 1 thread N<br />

...<br />

a = 0 a = 1 a = N<br />

Shared memory<br />

E xecution<br />

serial region<br />

❄<br />

thread 0<br />

a = 0<br />

Shared memory<br />

parallel reg. 2<br />

❄ ❄ ❄<br />

thread 0 thread 1 thread N<br />

...<br />

a = 0 a = 1 a = N<br />

Shared memory<br />

❄<br />

Figure 2.8: Graphical representation of the example expla<strong>in</strong><strong>in</strong>g the work<strong>in</strong>g pr<strong>in</strong>ciple of the<br />

!$OMP THREADPRIVATE clause.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!