ClearDistributedDefinitions

ClearDistributedDefinitions[s1,s2,]

clears all previously distributed definitions of symbols si on all parallel kernels.

ClearDistributedDefinitions[]

clears all previously distributed definitions of all symbols.

Details

Examples

open allclose all

Basic Examples  (1)

Disable the automatic distribution of definitions:

Distribute the definition of a function:

Use the function on the parallel subkernels:

The symbol f appears in the list of all distributed symbols:

Clear the distributed definitions:

The function is no longer known on the subkernels; it is evaluated only after being returned:

The symbol f no longer appears in the list of all distributed symbols:

Scope  (1)

Make various types of definitions for a set of symbols:

Distribute the definitions to all parallel subkernels:

All symbols appear in the list of distributed symbols:

Clear the distributed definitions of the symbol f:

f no longer appears in the list of distributed symbols:

Clear the distributed definitions of several symbols:

Clear the distributed definitions of all remaining symbols:

There are no symbols with distributed definitions left:

Possible Issues  (3)

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

Clearing the distributed definitions may seem to work:

As soon as mat is used again in a parallel computation, its definition will be distributed automatically again:

Disable automatic distribution of definitions if you wish to control distribution of definitions manually:

The definition of a has not been distributed to parallel subkernels:

Distribute the definition of a manually:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_cleardistributeddefinitions, author="Wolfram Research", title="{ClearDistributedDefinitions}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/ClearDistributedDefinitions.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_cleardistributeddefinitions, organization={Wolfram Research}, title={ClearDistributedDefinitions}, year={2024}, url={https://reference.wolfram.com/language/ref/ClearDistributedDefinitions.html}, note=[Accessed: 22-December-2024 ]}