$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:

In[1]:=
Click for copyable input
Out[1]=

Generalizations & Extensions  (1)

Properties & Relations  (3)

Possible Issues  (1)

See Also

Kernels  $KernelCount  $ProcessID  $SessionID  $ProcessorCount

Introduced in 2008
(7.0)