WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

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.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
See Also
History
Cite this Page

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.

Details

  • Possible settings include:
  • "context`" all symbols in context "context`"
    {"ctx1`","ctx2`",} all symbols in the given contexts
    None do not distribute any definitions
    All definitions of all symbols
    Automatic all contexts appearing in expr
    $Context all 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.
  • The initial value for most parallel computing functions is DistributedContexts:>$DistributedContexts .

Examples

open all close all

Basic Examples  (4)

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:

Scope  (1)

Find all parallel functions that use the DistributedContexts option:

Applications  (1)

Turn off automatic distribution of definitions in all commands such as ParallelMap :

Restore the default value:

Properties & Relations  (1)

The default setting of DistributedContexts in most parallel commands:

The default value of $DistributedContexts is $Context :

Parallelize uses a different default setting:

Wolfram Research (2010), DistributedContexts, Wolfram Language function, https://reference.wolfram.com/language/ref/DistributedContexts.html.

Text

Wolfram Research (2010), DistributedContexts, Wolfram Language function, https://reference.wolfram.com/language/ref/DistributedContexts.html.

CMS

Wolfram Language. 2010. "DistributedContexts." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DistributedContexts.html.

APA

Wolfram Language. (2010). DistributedContexts. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DistributedContexts.html

BibTeX

@misc{reference.wolfram_2025_distributedcontexts, author="Wolfram Research", title="{DistributedContexts}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/DistributedContexts.html}", note=[Accessed: 17-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_distributedcontexts, organization={Wolfram Research}, title={DistributedContexts}, year={2010}, url={https://reference.wolfram.com/language/ref/DistributedContexts.html}, note=[Accessed: 17-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /