-
See Also
- $KernelCount
- LaunchKernels
- $ProcessorType
- SystemInformation
-
- Remote Batch Computation Providers
- AzureBatch
- Related Guides
- Workflows
-
-
See Also
- $KernelCount
- LaunchKernels
- $ProcessorType
- SystemInformation
-
- Remote Batch Computation Providers
- AzureBatch
- Related Guides
- Workflows
-
See Also
gives the number of processor cores available on the computer system on which the Wolfram System is being run.
$ProcessorCount
gives the number of processor cores available on the computer system on which the Wolfram System is being run.
Details
- $ProcessorCount is used by Parallelize and other parallel functions.
Examples
open all close allBasic Examples (1)
$ProcessorCountApplications (2)
By default, as many parallel kernels are launched as there are processor cores:
$ProcessorCount$ConfiguredKernelsLaunchKernels[]You can change $ProcessorCount in a new session to simulate a multicore computer:
Unprotect[$ProcessorCount];$ProcessorCount = 8;LaunchKernels[]Possible Issues (2)
No kernels are launched by default on a single-core computer:
$ProcessorCountLaunchKernels[]Specify the number of desired kernels to launch them anyway:
LaunchKernels[2]Changing $ProcessorCount takes effect only if it happens before using any parallel commands:
$ProcessorCount$KernelCountUnprotect[$ProcessorCount];$ProcessorCount = 8;Length[LaunchKernels[]]You can always launch the desired number of kernels explicitly:
Length[LaunchKernels[8]]See Also
$KernelCount LaunchKernels $ProcessorType SystemInformation
Remote Batch Computation Providers: AzureBatch
Related Guides
Related Workflows
- Run a Computation in Parallel
History
Text
Wolfram Research (2008), $ProcessorCount, Wolfram Language function, https://reference.wolfram.com/language/ref/$ProcessorCount.html.
CMS
Wolfram Language. 2008. "$ProcessorCount." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$ProcessorCount.html.
APA
Wolfram Language. (2008). $ProcessorCount. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$ProcessorCount.html
BibTeX
@misc{reference.wolfram_2026_$processorcount, author="Wolfram Research", title="{$ProcessorCount}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/$ProcessorCount.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_$processorcount, organization={Wolfram Research}, title={$ProcessorCount}, year={2008}, url={https://reference.wolfram.com/language/ref/$ProcessorCount.html}, note=[Accessed: 12-June-2026]}