$DistributedContexts

$DistributedContexts

is the default value of the DistributedContexts option of functions such as ParallelTable and ParallelMap.

Details

  • Before a parallel computation, definitions of symbols to be evaluated in a parallel kernel will automatically be distributed to all kernels, provided these symbols belong to a context given in the DistributedContexts option.
  • The initial value is $DistributedContexts:=$Context, which distributes definitions of all symbols in the current context, but does not distribute definitions of symbols from packages.

Examples

open allclose all

Basic Examples  (1)

Turn off automatic distribution of functions:

Restore the default value:

Scope  (5)

By default, definitions in the current context are distributed automatically:

Do not distribute any definitions:

Distribute definitions for all symbols in all contexts appearing in a parallel computation:

Distribute only definitions in the given contexts:

Restore the default value:

Properties & Relations  (1)

Find all parallel functions that currently use $DistributedContexts:

Possible Issues  (1)

The value of $DistributedContexts is not used in Parallelize:

Set the value of the DistributedContexts option of Parallelize:

Restore all settings to their default values:

Introduced in 2010
 (8.0)