A Brief Introduction to Fortran 77 - Polaris
A Brief Introduction to Fortran 77 - Polaris
A Brief Introduction to Fortran 77 - Polaris
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6.3 The BARRIER directiveTo incorporate e in<strong>to</strong> the parallel region it is necessary <strong>to</strong> makesure that a(20) and a(15) have been computed before thestatement executes.This can be done with a barrier directive whichsynchronizes all the threads in the enclosing parallelregion. When encountered, each thread waits until all theothers in that team have reached this point.c$omp parallel private(c,i,il,iu)c = sin(d)call get_limits(n,il,iu,* omp_get_num_threads(),* omp_get_thread_num())do i=il,iua(i) = b(i) + cend doc$omp barriere = a(20) + a(15)c$omp end parallel© 1998 David A. Padua48 of 118