The CONTEXT_SHARED directive specifies that the same memory location will be used for a symbol declared in a routine. The symbol uses the same memory location in any parallel DO-loops contained within the routine.
If a routine has several concurrent invocations (because it is called from within a parallel DO-loop), each invocation uses different memory locations for its variables that are declared CONTEXT_SHARED.
The CONTEXT_SHARED directive takes the following form:
cPAR$ CONTEXT_SHARED syname [,syname] . . .
CONTEXT_SHARED can appear anywhere within declaration statements in the routine.
Arrays cannot be dimensioned within CONTEXT_SHARED.
Symbols listed in CONTEXT_SHARED cannot also be listed in a PRIVATE directive.
Dummy arguments cannot be declared CONTEXT_SHARED.
For details on how to use the CONTEXT_SHARED directive, see Example 11-2.