ParallelKernels
✖
ParallelKernels
Details

- On a multicore computer, kernels are normally launched automatically when needed for a parallel computation.
- All available kernels are by default used for all parallel computations.
- The following properties can be used to select a subset of all running kernels:
-
All all kernels "CloudKernels" all cloud kernels "LinkKernels" all link kernels "LocalKernels" all kernels running locally "LWGKernels" all LightweightGrid kernels "OneKernelPerMachine" one kernel for each different machine "RemoteKernels" all kernels on remote machines "SshKernels" all SSH kernels "WSTPServerKernels" all WSTPServer kernels
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (5)Survey of the scope of standard use cases
Launch the default set of kernels:

https://wolfram.com/xid/0n4mm4yu9no-or7uha

Give the list of currently running parallel kernels:

https://wolfram.com/xid/0n4mm4yu9no-jtvifu

Close all running parallel kernels:

https://wolfram.com/xid/0n4mm4yu9no-c7abox


https://wolfram.com/xid/0n4mm4yu9no-2tsh5

Launch kernels on various machines:

https://wolfram.com/xid/0n4mm4yu9no-tqiiic

Select one kernel for each machine:

https://wolfram.com/xid/0n4mm4yu9no-8jkzqw

Run an evaluation on this subset of kernels:

https://wolfram.com/xid/0n4mm4yu9no-8e9o2n

Select all kernels of a particular type:

https://wolfram.com/xid/0n4mm4yu9no-bgoh1d


https://wolfram.com/xid/0n4mm4yu9no-v06x2o


https://wolfram.com/xid/0n4mm4yu9no-qt64sr


https://wolfram.com/xid/0n4mm4yu9no-knl5qe


https://wolfram.com/xid/0n4mm4yu9no-guffsg

Generalizations & Extensions (1)Generalized and extended use cases
Properties & Relations (2)Properties of the function, and connections to other functions
ParallelEvaluate by default does one evaluation on each kernel:

https://wolfram.com/xid/0n4mm4yu9no-c3ihye


https://wolfram.com/xid/0n4mm4yu9no-blyq9e

$KernelCount gives the number of running kernels:

https://wolfram.com/xid/0n4mm4yu9no-x6lxb


https://wolfram.com/xid/0n4mm4yu9no-npb76b


https://wolfram.com/xid/0n4mm4yu9no-bgtdra

Possible Issues (3)Common pitfalls and unexpected behavior
If no kernels are available, most parallel calculations are done sequentially:

https://wolfram.com/xid/0n4mm4yu9no-7b004


https://wolfram.com/xid/0n4mm4yu9no-f9yca5


A kernel launched as a remote kernel, but on the local machine, is treated as remote:

https://wolfram.com/xid/0n4mm4yu9no-errbmo


https://wolfram.com/xid/0n4mm4yu9no-inzrgq


https://wolfram.com/xid/0n4mm4yu9no-te59v8

Earlier versions of the Wolfram Language provided this functionality under the name Kernels:

https://wolfram.com/xid/0n4mm4yu9no-6n3ry

Neat Examples (1)Surprising or curious use cases
Given multiple running kernels on many different machines:

https://wolfram.com/xid/0n4mm4yu9no-bgh92b

Load a resource function into the cache on each machine only once:

https://wolfram.com/xid/0n4mm4yu9no-0t9jlv

Use the resource function in all kernels:

https://wolfram.com/xid/0n4mm4yu9no-ycqbdg

Wolfram Research (2022), ParallelKernels, Wolfram Language function, https://reference.wolfram.com/language/ref/ParallelKernels.html (updated 2022).
Text
Wolfram Research (2022), ParallelKernels, Wolfram Language function, https://reference.wolfram.com/language/ref/ParallelKernels.html (updated 2022).
Wolfram Research (2022), ParallelKernels, Wolfram Language function, https://reference.wolfram.com/language/ref/ParallelKernels.html (updated 2022).
CMS
Wolfram Language. 2022. "ParallelKernels." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/ParallelKernels.html.
Wolfram Language. 2022. "ParallelKernels." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/ParallelKernels.html.
APA
Wolfram Language. (2022). ParallelKernels. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ParallelKernels.html
Wolfram Language. (2022). ParallelKernels. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ParallelKernels.html
BibTeX
@misc{reference.wolfram_2025_parallelkernels, author="Wolfram Research", title="{ParallelKernels}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/ParallelKernels.html}", note=[Accessed: 25-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_parallelkernels, organization={Wolfram Research}, title={ParallelKernels}, year={2022}, url={https://reference.wolfram.com/language/ref/ParallelKernels.html}, note=[Accessed: 25-May-2025
]}