# Manipulate aborts

I'm studying a stochastic equation and I need to check periodicity in time of the PDF of the solution values for different noises and would like to use Manipulate.

I need a relatively high number of different noises for statistics but even with 100 different evaluation of noise Manipulate aborts. Is it a problem of data volume or did I make some stupid error? And is there a way around it?

Here is the code.

Remove[data]
force[x_] := (a x - b x^3)
drive[t_] := \[ScriptCapitalA] Sin[2 π (ω t + α)]

ClearAll[paramrule, forceRule]
forceRule = {ϵ -> 0.003, a -> 1, b -> 1, \[ScriptCapitalA] -> 0.35, ω -> ϵ/(2 π), α -> 0};
paramrule =
Join[
forceRule,
{σ -> 0.2, Subscript[x, 0] -> -1.5, Subscript[T, range] -> {0., 15000, 0.1}}]

{ϵ -> 0.003, a -> 1, b -> 1, \[ScriptCapitalA] -> 0.35, ω -> ϵ/(2 π), α -> 0, σ -> 0.2,

Subscript[x, 0] -> -1.5, Subscript[T, range] -> {0., 15000, 0.1}}
proc := ItoProcess[{force[x] + drive[t], σ}, {x, Subscript[x, 0]}, t] //. paramrule

data = RandomFunction[proc, Subscript[T, range] , 100] //. paramrule

Manipulate[
Histogram[data["SliceData", t], {-2, 2, 0.1}, "PDF"],
{t, 10000, 11000, 10},
SaveDefinitions -> True]

-
Try adding SynchronousUpdating -> False to the end of the Manipulate. With SynchronousUpdating -> True (the default), Manipulate only is allowed about 5 seconds before timing out. –  bill s Feb 12 at 23:45
@bills Thanks. It seems to work, fingers crossed –  anna Feb 13 at 0:30
@bills It doesn't work if I increase the number of different noises, e.g. from 100 to 500: the kernel quits –  anna Feb 13 at 1:38
If the kernel is quitting then it is may be a memory problem not a computation time problem. Can you calculate the 500 when it's not inside a Manipulate? –  bill s Feb 13 at 4:30
As bill s already said, this looks like a memory problem or some unhandled mathematica error. To check for the first one try bill s's solution and also watch the memory usage of the MathKernel Process with an appropriate System Monitoring tool. –  Wizard Feb 13 at 9:17
show 1 more comment