ParallelTable[onePathList[s, parametri], {s, {1, 2, 3, 4}}]; // AbsoluteTiming
{14.771845, Null}
Table[onePathList[s, parametri], {s, {1, 2, 3, 4}}]; // AbsoluteTiming
{14.649838, Null}
I am also watching on the ParallelKernelStatus window and on the TaskManager (I am on a Windows 7 machine with 8 physical cores) and there is zero sign of the parallel kernel running. On the other hand, 4 of them do start up when evaluating the ParallelTable cell the first time. (I have default options in config, and limited to 4 cores by licence).
The function onePathList is defined in a package (see below for details)
The vector "parametri" is a vector of real numbers, e.g.
parametri={333.333,333.333,116.667,1,0,1,18,0.001}
Any help greatly appreciated, thanks
PS Function definitions from package
onePathList[σ_, params_] :=
With[{Tmax = params[[7]], dt = params[[8]]},
RandomFunction[proc[σ, params], {0, Tmax, dt}]["PathStates"]]
proc[σ_, params_] := With[{x0 = params[[6]]},
ItoProcess[{totForce[x, t, params], σ}, {x, x0}, t]]
totForce[x_, t_, params_] :=
With[{a = params[[1]],
b = params[[2]], \[ScriptCapitalA] = params[[3]], ω =
params[[4]], α = params[[5]]}, (a x -
b x^3 + \[ScriptCapitalA] Sin[ω t + α])]
parametri? Could you give an example so that your code can be run? – Sjoerd C. de Vries May 21 '14 at 18:19DistributedContexts:>$DistributedContextswith$DistributedContexts:=$Context, which distributes definitions of all symbols in the current context, but does not distribute definitions of symbols from packages." – Sjoerd C. de Vries May 21 '14 at 18:24