The following examples show shared and private variables and arrays. A END DO A is a shared variable because it is a read-only variable. END DO V is shared because it is a read-only array. I and J are written and then read, so they are private variables. T END DO U and V are shared arrays because they are indexed by the loop index.
All processors share the same location for V and U .
T is written and then read, so it is a private variable. J is shared because it is a read-only variable. Special care is needed in writing into a shared variable that is not indexed by the loop control variable. END DO V is written to and then read. It must be a private array.