Subkernel memory control in Mathematica -
i have similar question as: mathematica running out of memory
i interested in this:
paralleltable[f[i], {i, 0, 14.9, 0.001}]
where f[i]
complicated numerical integral (i haven't yet found easy way reproduce problem without page filling definitions integral).
my problem subkernels blow in memory , have stop evaluation if won't let machine swapping.
but if have stopped evaluation kernels won't give free occupied memory.
clearsystemcache[]
i have tried
parallelevaluate[clearsystemcache[]]
but
parallelevaluate[memoryinuse[]]
stays @
{823185944, 833146832, 812429208, 840150336, 850057024, 834441704, 847068768, 850424224}
it seems memory controlling works main kernel? way shut down kernels , launch them again.
i hope there solutions out there... lot.
memory control works kernel control expressions involving such functions memoryconstrained
, memoryinuse
, clear
, unset
, remove
, $historylength
, clearsystemcache
etc. evaluated. seems in case source of memory leaks not due mathematica's internal caching mechanism (thanks link, btw!).
have tried evaluate $historylength=0;
in subkernels before using them computations? if have not yet, recommend try.
since working numerical integration functions, suggest try optimize usage of them. example, if make numerical integration using ndsolve
, need limited set of calculated points (or 1 point) should use form ndsolve[eqns,y,{x,x_needed_min,x_needed_max}]
(or ndsolve[eqns,y,{x,x_max,x_max}]
) instead of ndsolve[eqns,y,{x,x_min,x_max}]
or ndsolve[eqns,y,{x,0,x_max}]
. can dramatically reduce memory usage in cases! can use eventlocator
memory control.
Comments
Post a Comment