[petsc-dev] snes_monitor_residual

Barry Smith bsmith at mcs.anl.gov
Wed Dec 21 13:16:40 CST 2016


  How about adding a least some documentation to bin/petsc_gen_xdmf.py


> On Dec 21, 2016, at 1:14 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> On Wed, Dec 21, 2016 at 12:56 PM, Mark Adams <mfadams at lbl.gov> wrote:
> I ran with:
> 
> -snes_monitor_residual hdf5:res.h5
> -snes_monitor_solution hdf5:sol.h5
> 
> and got h5 files that look OK:
> 
> That will stash vectors in the HDF5 file, but you still need to put in the DM as well
> 
>   -dm_view hdf5:ex1.h5
>  -snes_monitor_residual hdf5:ex1.h5::append
>  -snes_monitor_solution hdf5:ex1.h5::append
> 
>     Matt
> 
> -rw-r--r--  1 markadams  staff   19760 Dec 21 13:46 res.h5
> -rw-r--r--  1 markadams  staff   19760 Dec 21 13:46 sol.h5
> 
> but then got this. Am I doing this wrong?
> 
> 13:46 multi-species *+> ~/Codes/landaufem/Plex$ ~/Codes/petsc/bin/petsc_gen_xdmf.py res.h5
> Traceback (most recent call last):
>   File "/Users/markadams/Codes/petsc/bin/petsc_gen_xdmf.py", line 241, in <module>
>     generateXdmf(f)
>   File "/Users/markadams/Codes/petsc/bin/petsc_gen_xdmf.py", line 211, in generateXdmf
>     geom      = h5['geometry']
>   File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/_objects.c:2405)
>   File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/_objects.c:2362)
>   File "/Users/markadams/homebrew/lib/python2.7/site-packages/h5py/_hl/group.py", line 160, in __getitem__
>     oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
>   File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/_objects.c:2405)
>   File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/_objects.c:2362)
>   File "h5py/h5o.pyx", line 190, in h5py.h5o.open (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/h5o.c:3456)
> KeyError: "Unable to open object (Object 'geometry' doesn't exist)"
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener




More information about the petsc-dev mailing list