[yt-users] Trouble with h5py + FLASH

Nathan Goldbaum goldbaum at ucolick.org
Wed Nov 2 17:06:07 PDT 2011


In fact, it looks like upgrading to h5py 2.0 actually broke my ability to read FLASH files - yt crashes whenever I try to directly access the data through a FLASHStaticOutput object. I've pasted a script that exhibits the problem as well as the corresponding crash traceback.

If I go back to h5py1.3.1 the same script does not crash.

-Nathan

Nathan Goldbaum
Graduate Student
Astronomy & Astrophysics, UCSC
goldbaum at ucolick.org
http://www.ucolick.org/~goldbaum

On Nov 2, 2011, at 10:41 AM, Nathan Goldbaum wrote:

> Hi Matt,
> 
> Thanks for the suggestion.  Unfortunately, h5py still crashes:  http://paste.yt-project.org/show/1907/
> 
> Nathan Goldbaum
> Graduate Student
> Astronomy & Astrophysics, UCSC
> goldbaum at ucolick.org
> http://www.ucolick.org/~goldbaum
> 
> On Nov 2, 2011, at 5:13 AM, Matthew Turk wrote:
> 
>> Hi Nathan, John,
>> 
>> This bug is annoying.  Any chance you could try with the latest
>> install script, which uses h5py 2.0?  If you re-run the install script
>> in place it should simply update the out-of-date dependencies.
>> 
>> Thanks,
>> 
>> Matt
>> 
>> On Wed, Nov 2, 2011 at 2:12 AM, John ZuHone
>> <jzuhone at milkyway.gsfc.nasa.gov> wrote:
>>> Hi Nathan,
>>> 
>>> I would suspect that your grid data is probably fine, yes. I'm pretty sure the relevant data structures are essentially identical.
>>> 
>>> Happy FLASH-ing!
>>> 
>>> Best,
>>> 
>>> John
>>> 
>>> On Nov 2, 2011, at 2:10 AM, Nathan Goldbaum wrote:
>>> 
>>>> Thanks for looking into this, John.  Adding those two lines fixes my problem.
>>>> 
>>>> No worries about yt not supporting FLASH2 particle data - as you can see it's not a problem to read it in directly.
>>>> 
>>>> I haven't had any problems reading in my FLASH2 AMR data using yt.  I get results that are consistent with my old IDL scripts so I don't think there are any conversion issues.
>>>> 
>>>> On Nov 1, 2011, at 11:00 PM, John ZuHone wrote:
>>>> 
>>>>> Hi Nathan,
>>>>> 
>>>>> You'd have to double-check with Matt, but as I recall we didn't design the yt interface to support FLASH2 data. Now, I wouldn't be surprised if it does for the most part, since the grid data is written in almost exactly the same format by design to ease people switching over to FLASH3.
>>>>> 
>>>>> The particles, however, are a different story. In FLASH2, the particles are a composite HDF5 data structure of ints and doubles, whereas in FLASH3 they are a 2D array of doubles. In the latter case, simplicity was chosen over design sophistication. I know for a fact that yt only supports particle data in FLASH3.
>>>>> 
>>>>> I'm looking at this file of yours now... I was not aware that the way compound data types work in HDF5 that you get Python dictionaries when you read them in. That is a lot simpler than what I have to do to read FLASH3 particles.
>>>>> 
>>>>> In any case, I reproduce the error you get. If you add the lines
>>>>> 
>>>>> del ParticleData
>>>>> del f
>>>>> 
>>>>> after your "f.close()" call, I no longer get the error. This is what we had to do with the previous issue you mentioned. For some reason the FLASH files are sometimes a bit picky about having all objects allocated from the previous read deleted before accessing the file again.
>>>>> 
>>>>> Best,
>>>>> 
>>>>> John
>>>>> 
>>>>> 
>>>> 
>>>> _______________________________________________
>>>> 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
>> 
>> !DSPAM:10175,4eb1340175682950323881!
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20111102/4536f2f5/attachment.htm>


More information about the yt-users mailing list