Changes in Version 2.1
Parallel Computing Toolkit works with Mathematica 6.
Mathematica kernels earlier than Version 5.2 are no longer supported as slave kernels. Mathematica kernels earlier than Version 6 are no longer supported as master kernels.
The parallel animation and plotting code in Commands.m is obsolete in Mathematica 6.
Changes in Version 2
has been extended to become a flexible tool for implementing many structural operations (such as Map
, and all associative functions) in parallel.
A new auxiliary command ParallelDispatch for sending different commands to different kernels is the basis for the re-implementation of ParallelEvaluate and ParallelTable.
Delayed definitions for shared variables are possible and cause the right sides to be evaluated on the remote kernels.
Support for different process queue models has been added, including user-defined ones. Standard queues provided are a FIFO queue (as in Version 1) and a new priority queue, as well as a faster unordered queue.
Processes can be queued with a user-defined priority that the scheduler takes into account when assigning processes to processors.
There is more extensive debugging support and saving of trace output for later analysis.
If no remote kernels are available, all evaluations happen sequentially in the master kernel.
A new command RemoteNeeds for loading packages on remote kernels has been added.
ParallelEvaluate, ParallelMap, and ParallelTable do a single dispatch on each remote kernel, taking relative processor speeds into account for optimal load balancing.
There are new commands ParallelSum and ParallelProduct to complement ParallelTable.
A new configuration variable $RemoteUserName for use in kernel launch command templates, such as $RemoteCommand, has been added.
Send[kernel, cmd] returns kernel, so you can use it as an argument of Receive.
Receive can take a list of kernels as arguments and waits for one result from each of them while allowing for callbacks, such as shared variables.
RemoteEvaluate allows callbacks and therefore shared variables.
A proper data type for remote kernels with improved diagnostic print formatting is included.
Aborting remote kernels is possible, provided the MathLink device used for the kernel connection supports aborts. Resetting runaway kernels is possible in a wider set of circumstances, in many cases without an actual abort.
Newly launched kernels inherit all previously exported environments, loaded packages, and declared shared variables.
There is a new command ClearShared to unshare previously shared variables. The variables $SharedVariables and $SharedDownValues give the lists of currently shared variables and downvalues, respectively.
It is possible to extract a part of a shared variable and transmit only the requested part of the variable to the remote kernel, rather than its whole value.
Process scheduling has much less latency.
Needs["Parallel`"] sets up Parallel Computing Toolkit by loading the required parts and autoloading the optional extensions (except for Parallel`Commands`).
ParallelEvaluate[Dot[...]], ParallelEvaluate[Inner[...]], and ParallelDot/ParallelInner also parallelize tensors of rank 1 (vectors).
$TraceLevel is supported only for backwards compatibility. There is a nicer debugging facility in the Parallel`Debug` package.
CloseSlave has been renamed Close; the old name is still supported.
The symbols $AvailableMachines, $RemoteCommand, and RemoteMachine are no longer in the global context, but in Parallel`Configuration`. If Parallel Computing Toolkit finds that global symbols with the same names exist and have values, those values are picked up, so old initialization code should still work. (A shadowing warning is emitted in this case.)
ResetSlaves no longer clears remote definitions. It is intended to clean up after an abort of the master kernel. There is a new function ClearSlaves that clears all remote definitions and shared variables.
Queue and DoneQ no longer call QueueRun. Explicit scheduling code should be checked for any necessary changes. In most cases, QueueRun is called implicitly when Wait or WaitOne is called, so no changes will be necessary.
Use of $TraceLevel requires loading the debugging support package before loading Parallel Computing Toolkit itself.
The default connection type for starting kernels on remote machines is LinkConnect
rather than LinkLaunch
is still used for local kernels.
The default linkprotocol for remote kernels is TCPIP. Launching remote kernels prior to Version 5 requires a LinkProtocol->"TCP" setting.
There is no ParallelDo, because Do makes sense only in the presence of side effects, which prevent a naive parallelization.