Work Replication With Parallel Region: #Pragma Omp Parallel For (For (J 0 J 10 J++) Printf ("Hello/n") )
Work Replication With Parallel Region: #Pragma Omp Parallel For (For (J 0 J 10 J++) Printf ("Hello/n") )
C/C++ :
#pragma omp single [clause,….. nowait]
block of code to be executed by just one thread
single for I/O
more computation
end parallel loop
Synchronization : ordered clause
• The structured block following an ordered directive is
executed in the order in which iterations would be
executed in a sequential loop
• Fortran :
!$omp ordered
code block
!$omp end ordered
• C/C++:
#pragma omp ordered
code block
ordered example