Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6464 > unrolled thread
| Started by | ValeX <rjovale@gmail.com> |
|---|---|
| First post | 2011-11-16 09:45 +0000 |
| Last post | 2011-11-17 11:04 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
easy way to switch between Table and ParallelTable ValeX <rjovale@gmail.com> - 2011-11-16 09:45 +0000
Re: easy way to switch between Table and ParallelTable "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-11-17 11:04 +0000
| From | ValeX <rjovale@gmail.com> |
|---|---|
| Date | 2011-11-16 09:45 +0000 |
| Subject | easy way to switch between Table and ParallelTable |
| Message-ID | <ja00o2$60r$1@smc.vnet.net> |
hi guys, is there an easy way to switch between Table and ParallelTable other than manually delete the letters "Parallel" from ParallelTable? i ask this because i have a code which is partially parallelized through the use of ParallelTable. Sometimes, however, i need to run that code within another master ParallelTable and it would run faster if my code runs single thread, that is, only using Tables.
[toc] | [next] | [standalone]
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> |
|---|---|
| Date | 2011-11-17 11:04 +0000 |
| Message-ID | <ja2pnv$m84$1@smc.vnet.net> |
| In reply to | #6464 |
On Wed, 16 Nov 2011 09:45:38 -0000, ValeX <rjovale@gmail.com> wrote: > hi guys, is there an easy way to switch between Table and > ParallelTable other than manually delete the letters "Parallel" from > ParallelTable? > > i ask this because i have a code which is partially parallelized > through the use of ParallelTable. > Sometimes, however, i need to run that code within another master > ParallelTable and it would run faster if my code runs single thread, > that is, only using Tables. > Subkernels can't initiate parallel computations using ParallelTable, so I think the premise of your question is flawed to begin with. However, if you are doing something unusual such that this would not be the case, why not replace explicit calls to both Table and ParallelTable with your own definition? For example, myTable := If[System`Parallel`$SubKernel, Table, ParallelTable]
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web