<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 24, 2014 at 5:29 PM, subramanya sadasiva <span dir="ltr"><<a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Hi Matt, <br>That did not help.</div></div></blockquote><div><br></div><div>That's not enough description to fix anything, and fixing it will require programming.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr"> Is there any other way to output the mesh to something that paraview can view? I tried outputting the file to a vtk file using <br>ex12 -dm_view vtk:my.vtk:ascii_vtk <br><br>which, I saw in another post on the forums, but that did not give me any output. <br></div></div></blockquote><div><br></div><div>This is mixing two different things. PETSc has a diagnostic ASCII vtk output, so the type would be ascii, not vtk,</div><div>and format ascii_vtk . It also has a production VTU output, which is type vtk with format vtk_vtu.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr"><br>Subramanya<br><br><div><hr>Date: Wed, 24 Sep 2014 17:19:51 -0500<br>Subject: Re: [petsc-users] Generating xdmf from h5 file.<br>From: <a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a><br>To: <a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a><br>CC: <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br><br><div dir="ltr"><div><div>On Wed, Sep 24, 2014 at 5:08 PM, subramanya sadasiva <span dir="ltr"><<a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Hi, <br>i was trying to use petsc_gen_xdmf.py to convert a h5 file to a xdmf file. The h5 file was generated by snes/ex12 which was run as, <br><br>ex12 -dm_view hdf5:my.h5 <br><br>When I do, <br>petsc_gen_xdmf.py my.h5 <br><br>I get the following error, <br><br> File "/home/ssadasiv/software/petsc/bin/pythonscripts/petsc_gen_xdmf.py", line 220, in <module><br> generateXdmf(sys.argv[1])<br> File "/home/ssadasiv/software/petsc/bin/pythonscripts/petsc_gen_xdmf.py", line 208, in generateXdmf<br> time = np.array(h5['time']).flatten()<br> File "/usr/lib/python2.7/dist-packages/h5py/_hl/group.py", line 153, in __getitem__<br> oid = h5o.open(<a href="http://self.id" target="_blank">self.id</a>, self._e(name), lapl=self._lapl)<br> File "h5o.pyx", line 173, in h5py.h5o.open (h5py/h5o.c:3403)<br>KeyError: "unable to open object (Symbol table: Can't open object)"<br><br>I am not sure if the error is on my end. This is on Ubuntu 14.04 with the serial version of hdf5. I built petsc with --download-hdf5, is it necessary to use the same version of hdf5 to generate the xdmf file? <br></div></div></blockquote><div><br></div><div>That code is alpha, and mainly built for me to experiment with an application here, so it is not user-friendly. In your</div><div>HDF5 file, there is no 'time' since you are not running a TS. This access to h5['time'] should just be protected, and</div><div>an empty array should be put in if its not there.</div><div><br></div><div> Matt</div><div> </div><blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr">Thanks<span><font color="#888888"><br>Subramanya <br><span class="HOEnZb"><font color="#888888"> </font></span></font></span></div></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener
</font></span></div></div></div> </div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener
</div></div>