$KernelID

$KernelID

is a unique ID number assigned to each running parallel kernel.

Details

  • The value of $KernelID for the master kernel is 0.
  • The value of $KernelID for each subkernel is a distinct positive integer, assigned when the kernel is launched.
  • Values of $KernelID are unique but not necessarily contiguous.

Examples

open allclose all

Basic Examples  (1)

Obtain the ID value of each running parallel kernel:

Generalizations & Extensions  (1)

$KernelID on the master kernel gives 0:

Properties & Relations  (2)

The output form of a kernel object indicates its $KernelID:

Newly launched kernels get new ID values:

Possible Issues  (1)

Kernel ID values are not necessarily contiguous:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_$kernelid, organization={Wolfram Research}, title={$KernelID}, year={2008}, url={https://reference.wolfram.com/language/ref/$KernelID.html}, note=[Accessed: 22-November-2024 ]}