LaunchKernels

LaunchKernels[]

launches all currently configured parallel subkernels.

LaunchKernels[n]

launches n local subkernels on the current computer.

LaunchKernels[ker]

launches the kernel specified by ker.

LaunchKernels[{ker1,ker2,}]

launches the kernels keri.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Launch the default kernels:

Close all running kernels and start two new ones:

LaunchKernels by default displays information about its progress:

Scope  (11)

Kernel Specifications  (4)

Launch the default kernels as described in $DefaultKernels:

Launch two more local kernels, in addition to those already running:

Launch kernels on a remote machine:

Use RemoteKernelObject to specify additional details of the desired kernels:

Local Kernels  (3)

Use a specific local kernel, given by its absolute path:

Alternatively, give the path and kernel count in the first argument as a URL:

For local kernels, the default number of parallel kernels is equal to $ProcessorCount, license permitting:

SSH Kernels  (3)

Give the path to the remote kernel as an option of RemoteKernelObject:

Alternatively, specify the path and kernel count as part of the SSH URL:

Specify the remote operating system to automatically choose a suitable kernel command:

When using a URL short form, the number of parallel kernels can be specified with "?n":

WSTPServer Kernels  (1)

Connect to a WSTPServer and request a number of parallel kernels:

Generalizations & Extensions  (1)

Close all kernels:

Launch copies of the previously running kernels:

Options  (2)

ProgressReporting  (2)

Do not show a temporary progress report:

Show a progress report even if the default $ProgressReporting may be False:

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  (4)

If any kernels are already running, LaunchKernels[] does not launch the default kernels:

Close all running kernels, then launch the default set of kernels:

Kernels may be automatically launched when first needed:

Manually close the kernels:

Now, no kernels are launched automatically:

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

No kernels are launched by default on a single-core computer:

Specify the number of desired kernels to launch them anyway:

Neat Examples  (1)

Specify a kernel on a remote machine:

Ask it for the number of processor cores:

Update the kernel specification with the kernel number returned:

Launch the parallel kernels:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2021_launchkernels, author="Wolfram Research", title="{LaunchKernels}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/LaunchKernels.html}", note=[Accessed: 17-May-2022 ]}

BibLaTeX

@online{reference.wolfram_2021_launchkernels, organization={Wolfram Research}, title={LaunchKernels}, year={2008}, url={https://reference.wolfram.com/language/ref/LaunchKernels.html}, note=[Accessed: 17-May-2022 ]}