This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

DistributedContexts

DistributedContexts
is an option for various parallel computing functions that specifies which definitions for symbols appearing in an expression should be distributed to all parallel kernels.
  • Possible settings include:
"context`"all symbols in context
{"ctx1`","ctx2`",...}all symbols in the given contexts
Nonedo not distribute any definitions
Alldefinitions of all symbols
Automaticall contexts appearing in expr
$Contextall symbols in the current context
  • Definitions of symbols appearing in an expression set for parallel evaluation that match the given contexts are distributed automatically before the parallel evaluation, effectively using DistributeDefinitions.
  • Definitions for symbols on which other distributed definitions depend are also distributed, as long as they belong to one of the given contexts.
By default, definitions in the current context are distributed automatically in a parallel computation:
Do not distribute definitions of functions defined:
Distribute definitions for all symbols in all contexts appearing in a parallel computation:
Distribute only definitions in the given contexts:
By default, definitions in the current context are distributed automatically in a parallel computation:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
 
Do not distribute definitions of functions defined:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
 
Distribute definitions for all symbols in all contexts appearing in a parallel computation:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
 
Distribute only definitions in the given contexts:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Find all parallel functions that use the DistributedContexts option:
Turn off automatic distribution of definitions in all commands such as ParallelMap:
Restore the default value:
The default setting of DistributedContexts in most parallel commands:
The default value of $DistributedContexts is the global context:
Parallelize uses a different default setting:
New in 8