<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi all,</div><div><br></div>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. <div><br></div><div>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. </div><div><br></div><div>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:</div><div><br></div><div><a href="http://paste.enzotools.org/show/1730/">http://paste.enzotools.org/show/1730/</a></div><div><br></div><div>Other scripts seem to be able to handle this data fine, so I don't know what's going on. </div><div><br></div><div>Best,</div><div><br></div><div>John</div><div><br><div><div>On Jul 5, 2011, at 8:03 PM, Cameron Hummels wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Are you actively trying to create hdf5 files?  I know hdf5 won't<br>overwrite an existing file by default, so perhaps if you've already<br>created files in your loop, then try to run it again with those files<br>still present, it will bail like this. <br><br>If that isn't the case, I'm not sure.  If you could send your script, or<br>pastebin it, that might provide more insight.<br><br>Cameron<br><br>On 07/05/2011 05:34 PM, John ZuHone wrote:<br><blockquote type="cite">Hi all,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Traceback (most recent call last):<br></blockquote><blockquote type="cite">  File "/local/data/duce2/zuhone/src/ctools/filter_particle_velocities.py", line 91, in <module><br></blockquote><blockquote type="cite">    main()<br></blockquote><blockquote type="cite">  File "/local/data/duce2/zuhone/src/ctools/filter_particle_velocities.py", line 68, in main<br></blockquote><blockquote type="cite">    compute_turb_vels(pf, numVelCells, xp, yp, zp, vxp, vyp, vzp)<br></blockquote><blockquote type="cite">  File "/local/data/duce2/zuhone/src/ctools/compute_turb_vels.py", line 15, in compute_turb_vels<br></blockquote><blockquote type="cite">    leaf_grids = [g for g in pf.h.grids if len(g.Children) == 0]<br></blockquote><blockquote type="cite">  File "/local/data/duce2/zuhone/opt/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 163, in hierarchy<br></blockquote><blockquote type="cite">    self, data_style=self.data_style)<br></blockquote><blockquote type="cite">  File "/local/data/duce2/zuhone/opt/yt-x86_64/src/yt-hg/yt/frontends/flash/data_structures.py", line 73, in __init__<br></blockquote><blockquote type="cite">    self._handle = h5py.File(self.hierarchy_filename)<br></blockquote><blockquote type="cite">  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__<br></blockquote><blockquote type="cite">    self.fid = self._generate_fid(name, mode, plist)<br></blockquote><blockquote type="cite">  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<br></blockquote><blockquote type="cite">    fid = h5f.create(name, h5f.ACC_EXCL, fapl=plist)<br></blockquote><blockquote type="cite">  File "h5f.pyx", line 87, in h5py.h5f.create (h5py/h5f.c:1378)<br></blockquote><blockquote type="cite">h5py._stub.IOError: File exists (File accessability: Unable to open file)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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. <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Best,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">John ZuHone<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">yt-users mailing list<br></blockquote><blockquote type="cite"><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br></blockquote><blockquote type="cite"><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br></blockquote><blockquote type="cite"><br></blockquote><br>-- <br>Cameron Hummels<br>PhD Candidate, Astronomy Department of Columbia University<br>Public Outreach Director, Astronomy Department of Columbia University<br>NASA IYA New York State Student Ambassador<br><a href="http://outreach.astro.columbia.edu">http://outreach.astro.columbia.edu</a> <br>PGP: 0x06F886E3<br></div></blockquote></div><br></div></body></html>