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.

3.2. Other clauses 53<br />

and the !$OMP ORDERED/!$OMP END ORDERED directive-pair is used to allow the parallelization<br />

of the do-loop, then it is mandatory to add the ORDERED clause to the !$OMP DO<br />

open<strong>in</strong>g-directive to warn the compiler about the existence of the ORDERED section. The<br />

previous example would look as follows:<br />

!$OMP DO ORDERED<br />

do i = 1, 1000<br />

!$OMP ORDERED<br />

A(i) = 2 * A(i-1)<br />

!$OMP END ORDERED<br />

enddo<br />

!$OMP END DO

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

Saved successfully!

Ooh no, something went wrong!