<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 22, 2016 at 7:30 AM, Mark Adams <span dir="ltr"><<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="m_2915844142326891994gmail-"><div><br></div></span><div>That will stash vectors in the HDF5 file, but you still need to put in the DM as well</div><div><br></div><div> -dm_view hdf5:ex1.h5</div><div> -snes_monitor_residual hdf5:ex1.h5::append</div><div><div> -snes_monitor_solution hdf5:ex1.h5::append</div></div></div></div></div></blockquote><div><br></div></span><div>I tried:</div><div><br></div><div><div>#PETSc Option Table entries:</div><div>-dm_view hdf5:res.h5<br></div><div>-snes_monitor_residual hdf5:res.h5::append<br></div></div><div><br></div><div>And see this:<br></div><div> ...</div><div><div>#End of PETSc Option Table entries</div><div>There is one unused database option. It is:</div><div>Option left: name:-dm_view value: hdf5:res.h5</div></div><div><br></div><div>And, of course, I get the same bad h5 file as before. In other codes I have had to add code. I tried simply adding </div><div><br></div><div>ierr = DMViewFromOptions(ctx->dm,<wbr>NULL,"-dm_view");CHKERRQ(ierr)<wbr>;</div></div></div></div></blockquote><div><br></div><div>1) You need this in the code. Its in all my examples.</div><div><br></div><div>2) Did you put it before the vec views? Otherwise, it need 'append'.</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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>before the solve, but that did not change anything (same bad h5 file) other than remove the 'options left' warning.</div></div></div></div></blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I tried to clone the code that I use for printing vectors manually by adding this before the solve:</div><div><br></div><div><div> ierr = DMViewFromOptions(ctx->dm,<wbr>NULL,"-dm_view");CHKERRQ(ierr)<wbr>;</div><div> ierr = PetscOptionsGetViewer(PETSC_<wbr>COMM_SELF,NULL,"-snes_monitor_<wbr>residual",&viewer,&fmt,&flg);<wbr>CHKERRQ(ierr);</div><span class=""><div> if (flg) {</div><div><span class="m_2915844142326891994gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>ierr = PetscViewerPushFormat(viewer,<wbr>fmt);CHKERRQ(ierr);</div><div> }</div></span></div><div><br></div><div>But got this error in the solve:</div><div><br></div><div><div> 0 SNES Function norm 4.438513482798e+01 </div><div>HDF5-DIAG: Error detected in HDF5 (1.8.12) MPI-process 0:</div><div> #000: H5L.c line 824 in H5Lexists(): unable to get link info</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #001: H5L.c line 2765 in H5L_exists(): path doesn't exist</div><div> major: Symbol table</div><div> minor: Object already exists</div><div> #002: H5Gtraverse.c line 861 in H5G_traverse(): internal path traversal failed</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #003: H5Gtraverse.c line 596 in H5G_traverse_real(): can't look up component</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #004: H5Gobj.c line 1156 in H5G__obj_lookup(): can't locate object</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #005: H5Gstab.c line 907 in H5G__stab_lookup(): not found</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #006: H5B.c line 366 in H5B_find(): can't lookup key in leaf node</div><div> major: B-Tree node</div><div> minor: Object not found</div><div> #007: H5Gnode.c line 545 in H5G_node_found(): unable to protect symbol table node</div><div> major: Symbol table</div><div> minor: Unable to load metadata into cache</div><div> #008: H5AC.c line 1329 in H5AC_protect(): H5C_protect() failed.</div><div> major: Object cache</div><div> minor: Unable to protect metadata</div><div> #009: H5C.c line 3574 in H5C_protect(): can't load entry</div><div> major: Object cache</div><div> minor: Unable to load metadata into cache</div><div> #010: H5C.c line 7954 in H5C_load_entry(): unable to load entry</div><div> major: Object cache</div><div> minor: Unable to load metadata into cache</div><div> #011: H5Gcache.c line 169 in H5G_node_load(): bad symbol table node signature</div><div> major: Symbol table</div><div> minor: Unable to load metadata into cache</div><div>HDF5-DIAG: Error detected in HDF5 (1.8.12) MPI-process 0:</div><div> #000: H5D.c line 334 in H5Dopen2(): not found</div><div> major: Dataset</div><div> minor: Object not found</div><div> #001: H5Gloc.c line 430 in H5G_loc_find(): can't find object</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #002: H5Gtraverse.c line 861 in H5G_traverse(): internal path traversal failed</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #003: H5Gtraverse.c line 596 in H5G_traverse_real(): can't look up component</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #004: H5Gobj.c line 1156 in H5G__obj_lookup(): can't locate object</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #005: H5Gstab.c line 907 in H5G__stab_lookup(): not found</div><div> major: Symbol table</div><div> minor: Object not found</div><div> #006: H5B.c line 366 in H5B_find(): can't lookup key in leaf node</div><div> major: B-Tree node</div><div> minor: Object not found</div><div> #007: H5Gnode.c line 545 in H5G_node_found(): unable to protect symbol table node</div><div> major: Symbol table</div><div> minor: Unable to load metadata into cache</div><div> #008: H5AC.c line 1329 in H5AC_protect(): H5C_protect() failed.</div><div> major: Object cache</div><div> minor: Unable to protect metadata</div><div> #009: H5C.c line 3574 in H5C_protect(): can't load entry</div><div> major: Object cache</div><div> minor: Unable to load metadata into cache</div><div> #010: H5C.c line 7954 in H5C_load_entry(): unable to load entry</div><div> major: Object cache</div><div> minor: Unable to load metadata into cache</div><div> #011: H5Gcache.c line 169 in H5G_node_load(): bad symbol table node signature</div><div> major: Symbol table</div><div> minor: Unable to load metadata into cache</div></div><div> ...</div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">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></div>