[Omp] About iteration determination for #omp for

Meadows, Lawrence F lawrence.f.meadows at intel.com
Sat Nov 12 09:26:12 PST 2005


For static schedules each thread usually computes its iteration
set at entry to the loop.

For dynamic schedules there is usually a critical section within
the loop to determine the next iteration set for a given thread.

Whether the compiler diagnoses a violation of an invariant
constraint at compile time is a quality of implementation issue
(and is clearly not always possible).

>-----Original Message-----
>From: Omp-bounces at openmp.org [mailto:Omp-bounces at openmp.org] 
>On Behalf Of NovaElf
>Sent: Saturday, November 12, 2005 9:19 AM
>To: Omp at openmp.org
>Subject: [Omp] About iteration determination for #omp for
>
>Hi there. I have 2 questions concerning iteration 
>determination for the #omp 
>for construct.
>
>Does each thread do some calculation to find out which slices of the 
>iterations it should be taking? Since the calculation can only 
>be done on 
>entry to the #omp for construct, and there is no barrier on entry, any 
>thread can arrive first, so it seems impossible for one thread to be 
>handling that job.
>
>A second question is, the #omp for loop has some loop invariant 
>restrictions. However, if I purposely violate those 
>restrictions, will it 
>result in compile time error or will it only result in 
>incorrect execution?
>
>_________________________________________________________________
>Get MSN Hotmail alerts on your mobile. 
>http://mobile.msn.com/ac.aspx?cid=uuhp_hotmail
>
>
>_______________________________________________
>Omp mailing list
>Omp at openmp.org
>http://openmp.org/mailman/listinfo/omp_openmp.org
>




More information about the Omp mailing list