VMS Help FORTRAN, Statements, Directive Statements, CONTEXT_SHARED *Conan The Librarian (sorry for the slow response - running on an old VAX) |
CPAR$ CONTEXT_SHARED var_name[,...,var_name] CPAR$ CONTEXT_SHARED_ALL CONTEXT_SHARED directives can be interspersed with declaration statements within program units in a parallel-processing application program. Variables (scalars, arrays, and records) specified on a CONTEXT_SHARED directive reside in a shared memory location throughout any one invocation of a subprogram (subroutine or function), including any parallel loops contained within the subprogram. However, if a subprogram has several concurrent invocations (because it is called from within a parallel loop), each invocation will use different memory for these variables. This context adjustment is handled automatically by the compiler and is not a programming consideration. By default, all variables in a routine compiled with the /PARALLEL qualifier are context-shared. Commas are required between variable names specified on a CONTEXT_SHARED directive. The CONTEXT_SHARED_ALL directive forces all symbols that are declared within a routine to default to CONTEXT_SHARED. This directive affects only default behavior. Individual symbols can still be declared PRIVATE. See your user manual for information about when to use directives to resolve certain types of data dependence problems.
|