ParallelTable doesn't work, but Table does
- To: mathgroup at smc.vnet.net
- Subject: [mg101689] ParallelTable doesn't work, but Table does
- From: Iván Lazaro <gaminster at gmail.com>
- Date: Tue, 14 Jul 2009 05:37:11 -0400 (EDT)
I'm having a problem using ParallelTable, but with Table there is no problem at all. The problem is that the calculation in Table is so long, so I think ParallelTable would make it faster. This is the code I parallelize: DistributeDefinitions[r, A, Variable, JacobianMatrix, CondIni, Ecua, Num, Time, Y, YI9] ParallelTable[ J=JacobianMatrix[Ecua[r2,r3,r4,a12,a13,a14,a21,a23,a24,a31,a32,a34,a41,a42,a43],Variable[]]; E1=Flatten[Transpose[J.Y]]; EQ3=Table[D[Subscript[x, i][t],{t,1}]== Ecua[r2,r3,r4,a12,a13,a14,a21,a23,a24,a31,a32,a34,a41,a42,a43][[i]],{i,1,4}]; EQ9=Table[D[Subscript[x, i][t],{t,1}]==E1[[i-4]],{i,5,20}]; sol=NDSolve[Join[EQ9,EQ3,YI3,YI9],Table[Subscript[x, i][t],{i,1,20}],{t,0,Time},MaxSteps-> Infinity,AccuracyGoal->2]; u=Table[Random[],{4}]; PhiT=Transpose[Table[{Subscript[x, i][t],Subscript[x, i+4][t],Subscript[x, i+8][t],Subscript[x, i+12][t]},{i,5,8}]/.sol/.t-> Time]; ExpLyap=Log[Norm[PhiT.u]]/Time, {a12,0,0.01,0.01},{a13,0,0.01,0.01},{a14,0,0.01,0.01},{a21,0,0.01,0.01},{a23,0,0.01,0.01},{a24,0,0.01,0.01},{a31,0,0.01,0.01},{a32,0,0.01,0.01},{a34,0,0.01,0.01},{a41,0,0.01,0.01},{a42,0,0.01,0.01},{a43,0,0.01,0.01},{r2,0.01,0.02,0.01},{r3,0.01,0.02,0.01},{r4,0.01,0.02,0.01}] If someone has an idea, i would apreciate it.
- Follow-Ups:
- Re: ParallelTable doesn't work, but Table does
- From: Zach Bjørnson <bjornson@mit.edu>
- Re: ParallelTable doesn't work, but Table does