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


Groups > comp.soft-sys.math.mathematica > #5137 > unrolled thread

How to distribute specific tasks to specific subkernels?

Started byDavi <davi3070008@me.com>
First post2011-09-22 11:29 +0000
Last post2011-09-27 10:23 +0000
Articles 5 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  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

#5137 — How to distribute specific tasks to specific subkernels?

FromDavi <davi3070008@me.com>
Date2011-09-22 11:29 +0000
SubjectHow to distribute specific tasks to specific subkernels?
Message-ID<j5f67m$q7o$1@smc.vnet.net>
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

[toc] | [next] | [standalone]


#5161

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2011-09-23 07:48 +0000
Message-ID<j5hdk7$7jp$1@smc.vnet.net>
In reply to#5137
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.)

[toc] | [prev] | [next] | [standalone]


#5253

FromSebastian Hofer <sebhofer@gmail.com>
Date2011-09-27 22:52 +0000
Message-ID<j5tk2l$3ba$1@smc.vnet.net>
In reply to#5161
Unfortunately it's true that the amount of information on parallel computing decreased in newer versions. The functionality is still there though, only the names changed slightly. If you are willing to lookup the corresponding new functions (which is not hard to do really), the legacy documentation is still available under
http://reference.wolfram.com/legacy/applications/parallel/
and still very helpful!

Sebastian

[toc] | [prev] | [next] | [standalone]


#5256

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2011-09-28 06:48 +0000
Message-ID<j5ug0c$7r3$1@smc.vnet.net>
In reply to#5161
On Tue, 27 Sep 2011 23:52:05 +0100, Sebastian Hofer <sebhofer@gmail.com>  
wrote:

> Unfortunately it's true that the amount of information on parallel  
> computing decreased in newer versions. The functionality is still there  
> though, only the names changed slightly. If you are willing to lookup  
> the corresponding new functions (which is not hard to do really), the  
> legacy documentation is still available under
> http://reference.wolfram.com/legacy/applications/parallel/
> and still very helpful!
>
> Sebastian
>

Well spotted--after the Parallel Computing Toolkit product page  
disappeared (http://www.wolfram.com/products/applications/parallel/ now  
redirects to http://www.wolfram.com/gridmathematica/) I had thought that  
the documentation was also no longer available. I'm glad to learn  
otherwise as it is still a valuable resource, and I would add here that  
the code of the Parallel` package is also very helpful, being clear, well  
commented, and written entirely in the Mathematica language. This is one  
area where its incorporation into Mathematica proper has been of great  
benefit, as there is obviously no longer any need to distribute the source  
in obfuscated form as was the case previously.

[toc] | [prev] | [next] | [standalone]


#5263

FromSebastian Hofer <sebhofer@gmail.com>
Date2011-09-27 10:23 +0000
Message-ID<j5s86e$pen$1@smc.vnet.net>
In reply to#5161
Unfortunately it's true that the amount of information on parallel computing decreased in newer versions. The functionality is still there though, only the names changed slightly. If you are willing to lookup the corresponding new functions (which is not hard to do really), the legacy documentation is still available under
http://reference.wolfram.com/legacy/applications/parallel/
and still very helpful!

Sebastian

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web