Message Boards Message Boards

0
|
5627 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Parallelization issues using different OSs

Posted 9 years ago

I am experiencing very different running times when using different OSs. It seems the problem is related with parallelization routine. For example, I got the following times for the code attached.

{126.601112, "9.0 for Mac OS X x86 (64-bit)"} @ MacBook Pro i7-2.3GHz, 8GB DDR3 {177.238, "10.3.1 for Microsoft Windows (64-bit)"} @ i7-5930K 3.5GHz, 64GB DDR4 {454.222, "10.3.0 for Linux x86 (64-bit)"} @ i7-5930K 3.5GHz, 64GB DDR4

Notice that the fastest case occurs for a 3-year old machine running Mathematica 9.0 and that all kernels are 64bit.

Does anyone have a clue about what is going on?

Thanks.

AbsoluteTiming[
 v0 = {0., 1.};
 \[CapitalDelta]0 = 100.;
 \[CapitalOmega] = 37.33;
 H[t_] := - \[CapitalDelta]0 Sin[
    2 \[Pi] \[CapitalOmega] t] PauliMatrix[1];
 \[Delta]t = 10^-4;
 u = IdentityMatrix[2];
 Nsteps = 5000;
 U = Reap[
    Do[u = MatrixExp[-I N[(2 \[Pi] \[Delta]t)] H[N[ii \[Delta]t]] ].u;
      Sow[u], {ii, 1, Nsteps}]][[2, 1]];
 PrependTo[U, IdentityMatrix[2]];
 u00 = ParallelTable[{{t, tp} // N, 
    v0.U[[t/\[Delta]t + 1]].ConjugateTranspose[
      U[[tp/\[Delta]t + 1]]].v0}, {t, 0, 
    Nsteps \[Delta]t, \[Delta]t}, {tp, 0, 
    Nsteps \[Delta]t, \[Delta]t}];
 StringTake[$Version, StringPosition[$Version, ")"][[1, 1]]]]
POSTED BY: Frederico Brito

I don't have a solution to your problem, but I have also noticed some performance issues that I think are tied to the operating system. Old code I wrote ran in 23.2 minutes using Mathematica 9.0 and Windows 7. The exact same code running under Mathematica 10.3 and Windows 10 runs in 35.6 minutes. It is very frustrating especially when I spent so much time optimizing performance under Mathematica 9. I hope you make progress understanding this.

POSTED BY: Todd Allen
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract