<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi everybody,<br>
<br>
I am trying to follow the advice for output given in the
recent thread on this list
<br>
<br>
<a class="moz-txt-link-freetext"
href="https://lists.mcs.anl.gov/pipermail/petsc-users/2018-February/034546.html">https://lists.mcs.anl.gov/pipermail/petsc-users/2018-February/034546.html</a>
<br>
<br>
At the end of each timestep in my code I do
<br>
<br>
{
<br>
PetscViewer outputToFile;
<br>
char filename[50];
<br>
sprintf(filename,"press%d.h5",ctx.its);
<br>
PetscViewerHDF5Open(PETSC_COMM_WORLD,filename,FILE_MODE_WRITE,&outputToFile);
<br>
DMView(ctx.dap,outputToFile);
<br>
VecView(ctx.p,outputToFile);
<br>
PetscViewerDestroy(&outputToFile);
<br>
}
<br>
<br>
so that I have press%d.h5 files on disk at the end of the
execution with the data from the vector ctx.p (which is associated
to the DMDA ctx.dap).
<br>
<br>
By using h5tovtk of the Debian h5-tools package I had a look at
the files and they seem all right, except that they appear rotated
by 90 degrees when loaded in Paraview, so the output part probably
went ok.<br>
<br>
However the call
<br>
<br>
$ /usr/lib/petsc/bin/petsc_gen_xdmf.py press1.h5
<br>
<br>
gives the error
<br>
<br>
Traceback (most recent call last):
<br>
File "/usr/lib/petsc/bin/petsc_gen_xdmf.py", line 241, in
<module>
<br>
generateXdmf(f)
<br>
File "/usr/lib/petsc/bin/petsc_gen_xdmf.py", line 211, in
generateXdmf
<br>
geom = h5['geometry']
<br>
File "h5py/_objects.pyx", line 54, in
h5py._objects.with_phil.wrapper (<i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>build/h5py-b1xqNM/h5py-2.7.0/h5py<span
class="moz-txt-tag">/</span></i>_objects.c:2842)
<br>
File "h5py/_objects.pyx", line 55, in
h5py._objects.with_phil.wrapper (<i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>build/h5py-b1xqNM/h5py-2.7.0/h5py<span
class="moz-txt-tag">/</span></i>_objects.c:2800)
<br>
File "<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>usr/lib/python2.7/dist-packages/h5py<span
class="moz-txt-tag">/</span></i>_hl/group.py", line 169, in
__getitem__
<br>
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
<br>
File "h5py/_objects.pyx", line 54, in
h5py._objects.with_phil.wrapper (<i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>build/h5py-b1xqNM/h5py-2.7.0/h5py<span
class="moz-txt-tag">/</span></i>_objects.c:2842)
<br>
File "h5py/_objects.pyx", line 55, in
h5py._objects.with_phil.wrapper (<i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>build/h5py-b1xqNM/h5py-2.7.0/h5py<span
class="moz-txt-tag">/</span></i>_objects.c:2800)
<br>
File "h5py/h5o.pyx", line 190, in h5py.h5o.open
(/build/h5py-b1xqNM/h5py-2.7.0/h5py/h5o.c:3736)
<br>
KeyError: "Unable to open object (Object 'geometry' doesn't
exist)"
<br>
<br>
Could you give me any insight on this?
<br>
<br>
(Later I will need to output and visualize in Paraview more than
one Vec and they are associated different DA's. Is creating an h5
file for each DA and output to that DM all the Vec associated to
that DA the preferred way to go?)
<br>
<br>
Best,
<br>
Matteo Semplice <br>
</p>
</body>
</html>