Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5161

Re: How to distribute specific tasks to specific subkernels?

From "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to distribute specific tasks to specific subkernels?
Date 2011-09-23 07:48 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j5hdk7$7jp$1@smc.vnet.net> (permalink)
References <j5f67m$q7o$1@smc.vnet.net>

Show all headers | View raw


On Thu, 22 Sep 2011 12:29:58 +0100, Davi <davi3070008@me.com> wrote:

> Hi,
>
> I am having trouble on using the automatic "Parallelize" to do my
> parallel computations, and I would like to know if there is a
> straightforward way to manually select which tasks should be run in
> each subkernel.
>
> A workaround I know is to open multiple Mathematica sessions, but
> there should be a less time-consuming option.
>
> Thanks for the help.
>
> Davi
>

See Parallel`Developer`ParallelDispatch. Regrettably this is now  
completely undocumented, so I quote from the older but much more complete  
Parallel Computing Toolkit documentation:

ParallelDispatch[h[e_1, e_2, ..., e_n], {k_1, k_2, ..., k_m}] evaluates  
e_i on kernel k_i and returns h[r_1, r_2, ..., r_n], where r_i is the  
result of evaluating e_i. The default list of kernels is Kernels[]. The  
number m of kernels must be at least as large as the number m of  
expressions. ParallelDispatch has HoldFirst so that h[e_1, e_2, ..., e_n]  
is not evaluated on the master kernel before the parallelization.  
ParallelDispatch[{e_1, e_2, ..., e_n}, {k_1, k_2, ..., k_m}] is equivalent  
to Parallel`Developer`Receive[Inner[Parallel`Developer`Send, {k_1, k_2,  
...., k_n}, {e_1, e_2, ..., e_n}]].

If the current documentation is judged good enough and not worth investing  
extra effort to bring up to the very high standard set originally by  
Maeder, it would be very helpful if WRI would put the PCT documentation up  
on MathSource for the benefit of those for whom the present documentation  
is not sufficient. (In fact, why not just put the whole PCT package up,  
given that it's no longer available to buy.)

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to distribute specific tasks to specific subkernels? Davi <davi3070008@me.com> - 2011-09-22 11:29 +0000
  Re: How to distribute specific tasks to specific subkernels? "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-09-23 07:48 +0000
    Re: How to distribute specific tasks to specific subkernels? Sebastian Hofer <sebhofer@gmail.com> - 2011-09-27 22:52 +0000
    Re: How to distribute specific tasks to specific subkernels? "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-09-28 06:48 +0000
    Re: How to distribute specific tasks to specific subkernels? Sebastian Hofer <sebhofer@gmail.com> - 2011-09-27 10:23 +0000

csiph-web