Closed crazyfireji closed 1 year ago
Look for type instabilities, e.g., @code_warntype gauss_filter_parallel_1d(ρ1, gl, nhalo)
. There are a few spots where you are using slices that will create copies. Do @views
instead, since these don't allocated. Did you try running with julia --track-allocation=user
flag? This can give you hints as to where you're allocating
Look for type instabilities, e.g.,
@code_warntype gauss_filter_parallel_1d(ρ1, gl, nhalo)
. There are a few spots where you are using slices that will create copies. Do@views
instead, since these don't allocated. Did you try running withjulia --track-allocation=user
flag? This can give you hints as to where you're allocating
thank you so much, I've tried @views and G=nothing ; data =nothing in gauss_filter_parallel_1d(ρ1, gl, nhalo); , but it still allocate memory. I tried julia --track-allication=user, but I got some error, I'll try it again tomorrow.
It was solved, but I have to execute GC.gc() in the end of for n in steps
loop manually.
this is my code:
this is the memory allocated, if allocated memory beyond my cp, it will be killed.