PARALLEL PACKAGE TUTORIAL

Configuring and Monitoring
This feature is not supported on the Wolfram Cloud.

The Wolfram Language provides a number of tools for configuring and monitoring parallel computations. Some of these are accessed using menus from the Wolfram Language notebook front end. This section introduces these tools and describes what they do.

Parallel Preferences

The default settings of the Wolfram Language automatically configure a number of parallel kernels to use for parallel computation. Typically, on a multicore machine you will get a number of worker kernels to match the number of cores (up to a license process limit). This default setting means that when you carry out a parallel computation for the first time, the system is initialized.

You can see the settings with the parallel preferences. These can be opened from the front end menu bar by choosing Evaluation Parallel Kernel Configuration. It should open the parallel preferences and look something like the following.

From the parallel preferences, you can set details about how parallel kernels are launched; the default setting is to load kernels as they are needed. In addition, you can configure the connection methods.

General Preferences

The General Preferences control when parallel kernels should be launched.

Manualdo not automatically launch kernels
When neededlaunch kernels when the first parallel computation is started
At startuplaunch kernels when the master kernel starts

Parallel kernel launching.

The parallel functions in the Wolfram Language are normally loaded only when any of them is first referenced, so launching of kernels does not slow down the startup of your master kernel.

Evaluation failure handling controls what happens with running evaluations if a parallel kernel fails during a parallel computation (due to hardware failure, network problems, or a crash). Retry causes the evaluation being run on a kernel when it fails to be reassigned to another kernel; Abandon means to mark it as failed and return $Failed as its result. With the default Retry setting a parallel computation than finish normally even if kernels fail during the computation.

With Try to relaunch failed kernels enabled, the Wolfram Language will periodically try to relaunch any failed kernels. This may not always be possible depending on the type of kernel used. It should always succeed for local kernels.

Choosing Enable parallel monitoring tools helps in developing parallel programs by allowing you to monitor the performance and optionally observe the communication between the master and parallel kernels. These tools cause a small performance loss, but except for larger batch-oriented calculations are generally recommended.

Parallel Kernel Configuration

The Parallel Kernel Configuration tabs control how the Wolfram Language launches and communicates with parallel kernels. The default connection method is to use Local Kernels, which runs kernels on the same computer as the main Wolfram Language kernel. By default, this will launch the same number of kernels as you have cores on your computer; this is specified by $ProcessorCount. Other connection methods are provided that work with kernels that run on remote computers in some type of grid or network. You can find more information in "Connection Methods". Some of these methods require additional software on your local computer and generally require a Wolfram System installation on the remote computers you wish to use.

Status

You can monitor the operation of your parallel kernels with the status display. This can be opened from the front end menu bar by choosing Evaluation Parallel Kernel Status. It should look something like the following.

2.gif

This shows a master and two worker kernels all running on the same computer. The performance monitoring group of columns is available only if the parallel monitoring tools have been enabled in the preferences.

System Information

To get a detailed listing of the configuration of your system for parallel computation, you can use the parallel tab of SystemInformation. A sample is shown below.

3.gif

A textual representation of SystemInformation can be obtained from the Copy button.