Please note: I cannot provide the code here, since the project is far too big to post at any Internet forum.

I have a computer with eight logical cores.

Task Manager

I have Mathematica Version 10.0.2, and I am making a call to ParallelMap[] with Method -> Automatic. (In serial, the computation takes about 90 minutes, so in parallel, I would expect the computation to take about 30 minutes or so.) For the first few seconds of the call, the kernel status monitor shows the message 4 kernels running, busy, with the word "busy" being displayed in red. Then, after those few seconds, the message changes to the one shown below:

enter image description here

Now the kernels are apparently idle. And sure enough, I see absolutely no speed-up. I have repeated the process with Method -> "FinestGrained" and Method -> CoarsestGrained, but the result has been exactly the same as with Automatic.

I would like to mention that my input does not have any global variable updates. I am not expecting any contention or race conditions.

Is there anything I can do to understand why I am not seeing a speed-up?

  • $\begingroup$ Have you tried the same things with another (smaller) parallelizable load? $\endgroup$ – Dr. belisarius Mar 11 '15 at 22:26
  • $\begingroup$ Yes, I did. For trivial functions--such as ParallelMap[# + 1&, Range[100]], everything happens so fast that I don't get to see any sustained behaviour. When I restrict the input size of my problem to about 50% the size (by taking the first 250 elements) I see a similar behaviour as that described in the question. I have not tried the call for smaller inputs. Maybe I should try it. $\endgroup$ – Shredderroy Mar 11 '15 at 22:30
  • $\begingroup$ What does ParallelMap[Pause[1] &, Range[5]] // AbsoluteTiming return? $\endgroup$ – Sjoerd C. de Vries Mar 11 '15 at 22:32
  • $\begingroup$ @SjoerdC.deVries My Mathematica is currently running the computation even as I write. As soon as that computation is over, I will run your snippet and post the answer. Thanks. $\endgroup$ – Shredderroy Mar 11 '15 at 22:37
  • $\begingroup$ @SjoerdC.deVries I ran AbsoluteTiming[ParallelMap[Pause[2] &, Range[5]]] and got the output {4.000240, {Null, Null, Null, Null, Null}}. So I'm definitely seeing some speed-up here. $\endgroup$ – Shredderroy Mar 12 '15 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.