<div dir="ltr"><div dir="ltr">On Thu, Jan 18, 2024 at 10:08 AM Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:<br></div><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">I am trying to view a DMSwarm with: -weights_view hdf5:part.h5<div><br></div><div>     Vec f;<br>      PetscCall(DMSetOutputSequenceNumber(sw, 0, 0.0));<br>      PetscCall(DMSwarmCreateGlobalVectorFromField(sw, "w_q", &f));<br>      PetscCall(PetscObjectSetName((PetscObject)f, "particle weights"));<br>      PetscCall(VecViewFromOptions(f, NULL, "-weights_view"));<br>      PetscCall(DMSwarmDestroyGlobalVectorFromField(sw, "w_q", &f));<br></div><div><br></div><div>And I get this error. I had this working once and did not set PetscViewerHDF5PushTimestepping, so I wanted to check.</div></div></blockquote><div><br></div><div>We probably were not checking then. We might have to check there when we set the timestep.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><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>Thanks,</div><div>Mark</div><div><br></div><div><br></div><div>[0]PETSC ERROR: Object is in wrong state<br>[0]PETSC ERROR: Timestepping has not been pushed yet. Call PetscViewerHDF5PushTimestepping() first<br>[0]PETSC ERROR: WARNING! There are unused option(s) set! Could be the program crashed before usage or a spelling mistake, etc!<br>[0]PETSC ERROR:   Option left: name:-options_left (no value) source: command line<br>[0]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Development GIT revision: v3.20.3-461-g585a01bd688  GIT Date: 2024-01-16 23:32:45 +0000<br>[0]PETSC ERROR: ./ex30k on a arch-macosx-gnu-O named MarksMac-302.local by markadams Thu Jan 18 10:05:53 2024<br>[0]PETSC ERROR: Configure options CFLAGS="-g -Wno-deprecated-declarations " CXXFLAGS="-g -Wno-deprecated-declarations " COPTFLAGS=-O CXXOPTFLAGS=-O --with-cc=/usr/local/opt/llvm/bin/clang --with-cxx=/usr/local/opt/llvm/bin/clang++ --download-mpich --with-strict-petscerrorcode --download-triangle=1 --with-debugging=0 --download-hdf5=1 PETSC_ARCH=arch-macosx-gnu-O<br>[0]PETSC ERROR: #1 PetscViewerHDF5SetTimestep() at /Users/markadams/Codes/petsc/src/sys/classes/viewer/impls/hdf5/hdf5v.c:990<br>[0]PETSC ERROR: #2 VecView_Swarm_HDF5_Internal() at /Users/markadams/Codes/petsc/src/dm/impls/swarm/swarm.c:45<br>[0]PETSC ERROR: #3 VecView_Swarm() at /Users/markadams/Codes/petsc/src/dm/impls/swarm/swarm.c:86<br>[0]PETSC ERROR: #4 VecView() at /Users/markadams/Codes/petsc/src/vec/vec/interface/vector.c:806<br>[0]PETSC ERROR: #5 PetscObjectView() at /Users/markadams/Codes/petsc/src/sys/objects/destroy.c:76<br>[0]PETSC ERROR: #6 PetscObjectViewFromOptions() at /Users/markadams/Codes/petsc/src/sys/objects/destroy.c:128<br>[0]PETSC ERROR: #7 VecViewFromOptions() at /Users/markadams/Codes/petsc/src/vec/vec/interface/vector.c:691<br></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>