terminates all parallel kernels from the list Kernels[].


terminates the kernel k.


terminates the kernels k1, k2, .


  • Kernels can be specified either using KernelObject, as returned by Kernels[], or using their integer IDs, as returned by $KernelID.
  • Closed kernels are removed from the list of kernels available for parallel computing, as given by Kernels[].


open allclose all

Basic Examples  (1)

Close all running parallel kernels:

Scope  (2)

Close any parallel kernels that may be running and launch the default kernels:

Close all kernels:

Launch copies of the previously running kernels:

Applications  (1)

Measure the speedup of the same calculation with different numbers of kernels used:

Properties & Relations  (1)

Distributed definitions and shared variables apply to running kernels and new ones:

Packages read with ParallelNeeds also apply to running and new kernels:

Close all running kernels and launch new ones:

The new kernels inherit previously distributed definitions and shared variables:

The new kernels also inherit packages read previously:

Possible Issues  (1)

If no kernels are available, most parallel calculations are done sequentially:

Wolfram Research (2008), CloseKernels, Wolfram Language function,


Wolfram Research (2008), CloseKernels, Wolfram Language function,


Wolfram Language. 2008. "CloseKernels." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2008). CloseKernels. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2023_closekernels, author="Wolfram Research", title="{CloseKernels}", year="2008", howpublished="\url{}", note=[Accessed: 19-April-2024 ]}


@online{reference.wolfram_2023_closekernels, organization={Wolfram Research}, title={CloseKernels}, year={2008}, url={}, note=[Accessed: 19-April-2024 ]}