[yt-users] h5py problem

John ZuHone jzuhone at cfa.harvard.edu
Wed Jul 6 12:26:23 PDT 2011


Hi all,

I've discovered that the h5py crash is actually happening while I am attempting to write to a new HDF5 file using data from the other file. 

But it's even more simple than that: it turns out that all I have to do is simply open the parameter file, access some data within it, and then attempt to write the other file with junk data to cause the crash. 

I have stripped down the offending script to a very bare-bones version that leaves most of the stuff I'm doing out but still results in a crash:

http://paste.enzotools.org/show/1730/

Other scripts seem to be able to handle this data fine, so I don't know what's going on. 

Best,

John

On Jul 5, 2011, at 8:03 PM, Cameron Hummels wrote:

> Are you actively trying to create hdf5 files?  I know hdf5 won't
> overwrite an existing file by default, so perhaps if you've already
> created files in your loop, then try to run it again with those files
> still present, it will bail like this. 
> 
> If that isn't the case, I'm not sure.  If you could send your script, or
> pastebin it, that might provide more insight.
> 
> Cameron
> 
> On 07/05/2011 05:34 PM, John ZuHone wrote:
>> Hi all,
>> 
>> I  have a loop that goes over a list of filenames I've generated, loads parameter files for them, passes each pf object to a procedure which grabs data from the file, and then loops back over. After the first iteration, I get this crash:
>> 
>> Traceback (most recent call last):
>>  File "/local/data/duce2/zuhone/src/ctools/filter_particle_velocities.py", line 91, in <module>
>>    main()
>>  File "/local/data/duce2/zuhone/src/ctools/filter_particle_velocities.py", line 68, in main
>>    compute_turb_vels(pf, numVelCells, xp, yp, zp, vxp, vyp, vzp)
>>  File "/local/data/duce2/zuhone/src/ctools/compute_turb_vels.py", line 15, in compute_turb_vels
>>    leaf_grids = [g for g in pf.h.grids if len(g.Children) == 0]
>>  File "/local/data/duce2/zuhone/opt/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 163, in hierarchy
>>    self, data_style=self.data_style)
>>  File "/local/data/duce2/zuhone/opt/yt-x86_64/src/yt-hg/yt/frontends/flash/data_structures.py", line 73, in __init__
>>    self._handle = h5py.File(self.hierarchy_filename)
>>  File "/local/data/duce2/zuhone/opt/yt-x86_64/lib/python2.7/site-packages/h5py-1.3.1-py2.7-linux-x86_64.egg/h5py/highlevel.py", line 797, in __init__
>>    self.fid = self._generate_fid(name, mode, plist)
>>  File "/local/data/duce2/zuhone/opt/yt-x86_64/lib/python2.7/site-packages/h5py-1.3.1-py2.7-linux-x86_64.egg/h5py/highlevel.py", line 842, in _generate_fid
>>    fid = h5f.create(name, h5f.ACC_EXCL, fapl=plist)
>>  File "h5f.pyx", line 87, in h5py.h5f.create (h5py/h5f.c:1378)
>> h5py._stub.IOError: File exists (File accessability: Unable to open file)
>> 
>> It does not matter where in the list of files I start, so it's not due to a single bad file. It's like it doesn't detect the file it's trying to read somehow, so it tries to create it, but then it finds out it already exists, and then aborts. Very odd. 
>> 
>> Best,
>> 
>> John ZuHone
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> 
> 
> -- 
> Cameron Hummels
> PhD Candidate, Astronomy Department of Columbia University
> Public Outreach Director, Astronomy Department of Columbia University
> NASA IYA New York State Student Ambassador
> http://outreach.astro.columbia.edu 
> PGP: 0x06F886E3

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20110706/65eb690a/attachment.htm>


More information about the yt-users mailing list