[yt-users] Clear memory?

Matthew Turk matthewturk at gmail.com
Thu Sep 1 03:45:25 PDT 2011


Hi Elizabeth,

Serialize shouldn't have much or any effect on the problems you are
describing.  If you can give more information, specifically which
variables seem corrupted, if the derived fields use any external
sources or mutable variables, if you have diagnosed things with other
fields, etc etc, that may help out, however.

-Matt

On Wed, Aug 31, 2011 at 7:40 PM, Elizabeth Tasker <taskere at mcmaster.ca> wrote:
> Hi,
>
> I think this is a related issue, so I'm going to put it on the same thread:
>
> My arrays do not seem to be clearing properly in that, if I repeatedly run
> my analysis script, I start seeing very strange features in my ray objects
> (made from derived fields that I create myself) that I know are wrong. If I
> exit yt and restart, all becomes well again. Adding in:
>
> from yt.config import ytcfg; ytcfg["yt","serialize"] = "False"
>
> doesn't help, so this is possibly a python memory clearing issue, not yt.
>
> Has anyone seen this before? Is there any kind of clear cache for ipython?
>
> Thanks!
>
> Elizabeth
>
>
>
>
> Molly Peeples wrote:
>>
>> Hi Sam,
>>
>> It's working now; thanks!
>>
>> --Molly
>>
>> On Thu, Mar 24, 2011 at 6:41 PM, Sam Skillman <samskillman at gmail.com>
>> wrote:
>>
>>>
>>> Hi Molly,
>>> Looks like there was a missing import.  It should be fixed in now
>>> in 6160341d2e8f.
>>> Best,
>>> Sam
>>>
>>> On Thu, Mar 24, 2011 at 7:17 PM, Molly Peeples <molly at astro.ucla.edu>
>>> wrote:
>>>
>>>>
>>>> Hi Matt,
>>>>
>>>> I think I'm getting a similar thing; I updated yt and now I'm getting
>>>> "global name 'ytcfg' is not defined" when I call PlotCollection.  I've
>>>> tried the removing what's in ~/.yt/ and including the
>>>> ytcfg["yt","serialize"] = "False" but the error is the same.  I put a
>>>> copy of the script and the error at
>>>> http://paste.enzotools.org/show/1540/
>>>>
>>>> Thanks,
>>>> --Molly
>>>>
>>>> On Thu, Mar 24, 2011 at 1:24 PM, Matthew Turk <matthewturk at gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>> Hi Elizabeth,
>>>>>
>>>>> My mistake; .harrays were not respecting "serialize".  Fixed in hg.
>>>>>
>>>>> -Matt
>>>>>
>>>>> On Thu, Mar 24, 2011 at 4:09 PM, Elizabeth Tasker <taskere at mcmaster.ca>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> Hi Matt,
>>>>>>
>>>>>> So actually that didn't work. Below, I've not re-run the simulation
>>>>>> but
>>>>>> just
>>>>>> updated my script to move the centre in "pc = PlotCollection(pf,
>>>>>> center=[100,100,100])" to a new location.
>>>>>>
>>>>>> bash-4.0$ ~/yt/yt-2/bin/iyt slice_yt.py
>>>>>>
>>>>>> NeedsDataField                            Traceback (most recent call
>>>>>> last)
>>>>>>
>>>>>> /1/home/taskere/yt/scripts/iyt in <module>()
>>>>>>   23     pf = load(fn)                      24     pc =
>>>>>> PlotCollection(pf,
>>>>>> center=[100,100,100])
>>>>>> ---> 25     p = pc.add_slice("Density", 2)                    26
>>>>>> p.modify["grids"]()
>>>>>> 27
>>>>>> p = pc.add_projection("Density", 2)    etc
>>>>>>
>>>>>> But if I do:
>>>>>>
>>>>>> In [2]: exit()
>>>>>> Do you really want to exit ([y]/n)? y
>>>>>> bash-4.0$ rm -rf *yt
>>>>>> bash-4.0$ rm -rf *harr*
>>>>>> bash-4.0$ ~/yt/yt-2/bin/iyt slice_yt.py
>>>>>>
>>>>>> Then everything works. I've attached my yt script for added
>>>>>> excitement.
>>>>>>
>>>>>> Elizabeth
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Matthew Turk wrote:
>>>>>>
>>>>>>>
>>>>>>> Hi Elizabeth,
>>>>>>>
>>>>>>> There should be a check in the .yt and .harray files for the
>>>>>>> modification time of the simulation using the CurrentTimeIdentifier.
>>>>>>> But if you are running into issues, this should prevent all the .yt
>>>>>>> and .harray files from being looked at:
>>>>>>>
>>>>>>> from yt.config import ytcfg; ytcfg["yt","serialize"] = "False"
>>>>>>>
>>>>>>> Note that this *must* go at the top of your script.
>>>>>>>
>>>>>>> -Matt
>>>>>>>
>>>>>>> On Thu, Mar 24, 2011 at 10:54 AM, Elizabeth Tasker
>>>>>>> <taskere at mcmaster.ca>
>>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Is there any way in yt to get a script to delete (or ignore) all the
>>>>>>>> .yt
>>>>>>>> and
>>>>>>>> .harray files and clear its memory? I run into errors when I'm
>>>>>>>> re-doing a
>>>>>>>> plot or I've re-run the simulation and over-written the last data
>>>>>>>> set
>>>>>>>> I
>>>>>>>> looked at with yt. I have to exit yt, delete the above files by hand
>>>>>>>> and
>>>>>>>> restart, which is a bit of a pain.
>>>>>>>>
>>>>>>>> Elizabeth
>>>>>>>> _______________________________________________
>>>>>>>> yt-users mailing list
>>>>>>>> yt-users at lists.spacepope.org
>>>>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> yt-users mailing list
>>>>>>> yt-users at lists.spacepope.org
>>>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> yt-users mailing list
>>>>>> yt-users at lists.spacepope.org
>>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> yt-users mailing list
>>>>> yt-users at lists.spacepope.org
>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users at lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>>
>>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list