Ok, with
N = 40
noise = 0.1
ps = [noise]
u0s = ones(Float64, N)
tend = 10000.0
ttrans = 0.0
noise_seed = 1
alg = EM()
dt = 0.01
Δt = 10.0
W = WienerProcess(0.0, zeros(length(u0s)))
prob_independent_noise = SDEProblem(system!, noise!, u0s, (0.0, tend), ps, noise=W)
Profile.Allocs.clear()
a = Profile.Allocs.@profile solve(prob_independent_noise, alg; dt, saveat=ttrans:Δt:tend, seed=noise_seed);
PProf.Allocs.pprof()
I got this flame graph:
As far as I understood, there are unnecessary allocations. The source for a few of the calls:





