Hi Jean-Claude

One quick thing to try is to put the contents of the loop inside if a function call.  This should make it more obvious to oython's garbage collector that the variables defined inside are temporary.

Nathan

On Sunday, March 2, 2014, Jean-Claude Passy <jcpassy@gmail.com> wrote:
Hi everyone,

I am trying to analyze a unigrid simulation, 512^3 zones. Each dump has a size of ~ 7 GB.
I use the following script to get the angular momenta:

http://paste.yt-project.org/show/4340/

I am running it on a cluster with 1 core and 16GB. It typically runs fine for the first 2 dumps, then crashes on the third one when asking for AngularMomentumZ. I assume that I must not erase variables correctly. Does someone have any suggestion about how to optimize the script?

Also, would that make sense to run the script in parallel or would the root grid be duplicated on all processors?

Sorry for the naive questions, and thanks a lot for the help!
Cheers,

JC