$KernelCount

$KernelCount

gives the number of subkernels available for parallel computations.

Details

  • $KernelCount is equivalent to Length[Kernels[]].
  • When evaluated in a subkernel of a particular master kernel, $KernelCount gives the number of subkernels available to the master kernel.

Examples

open allclose all

Basic Examples  (1)

Applications  (1)

Run a search for a random prime on each parallel kernel:

Properties & Relations  (1)

$KernelCount is effectively a shared variable:

Wolfram Research (2008), $KernelCount, Wolfram Language function, https://reference.wolfram.com/language/ref/$KernelCount.html.

Text

Wolfram Research (2008), $KernelCount, Wolfram Language function, https://reference.wolfram.com/language/ref/$KernelCount.html.

CMS

Wolfram Language. 2008. "$KernelCount." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$KernelCount.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_$kernelcount, author="Wolfram Research", title="{$KernelCount}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/$KernelCount.html}", note=[Accessed: 31-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_$kernelcount, organization={Wolfram Research}, title={$KernelCount}, year={2008}, url={https://reference.wolfram.com/language/ref/$KernelCount.html}, note=[Accessed: 31-October-2024 ]}