<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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="gmail-"><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><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,NULL,"-dm_view");CHKERRQ(ierr);<br></div><div><br></div><div>before the solve, but that did not change anything (same bad h5 file) other than remove the 'options left' warning.</div><div><br></div><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,NULL,"-dm_view");CHKERRQ(ierr);</div><div>      ierr = PetscOptionsGetViewer(PETSC_COMM_SELF,NULL,"-snes_monitor_residual",&viewer,&fmt,&flg);CHKERRQ(ierr);</div><div>      if (flg) {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>ierr = PetscViewerPushFormat(viewer,fmt);CHKERRQ(ierr);</div><div>      }</div></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>