<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
  #pfptBannerkrlw69y { all: revert !important; display: block !important; 
    visibility: visible !important; opacity: 1 !important; 
    background-color: #D0D8DC !important; 
    max-width: none !important; max-height: none !important }
  .pfptPrimaryButtonkrlw69y:hover, .pfptPrimaryButtonkrlw69y:focus {
    background-color: #b4c1c7 !important; }
  .pfptPrimaryButtonkrlw69y:active {
    background-color: #90a4ae !important; }
</style>

<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
 On Thu, Jan 18, 2024 at 3: 08 PM Matthew Knepley <knepley@ gmail. com> wrote: On Thu, Jan 18, 2024 at 1: 20 PM Mark Adams <mfadams@ lbl. gov> wrote: I had this working at one point. Should I add PetscViewerHDF5PushTimestepping? I don't
</div>
<!-- Preheader Text : END -->

<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>

<!--[if ((ie)|(mso))]>
  <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
    <table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
      <table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
        <tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
          This Message Is From an External Sender
        </td></tr>
        <tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
          This message came from outside your organization.
        </td></tr>

      </table>

    </td></tr></table>
  </td></tr></table>
<![endif]-->

<![if !((ie)|(mso))]>
  <div dir="ltr"  id="pfptBannerkrlw69y" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
    <div id="pfptBannerkrlw69y" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
      <div id="pfptBannerkrlw69y" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
        This Message Is From an External Sender
      </div>
      <div id="pfptBannerkrlw69y" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
      </div>

    </div>

    <div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
  </div>
<![endif]>

<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->

<!-- BaNnErBlUrFlE-BoDy-end -->
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 18, 2024 at 3:08 PM Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br></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 dir="ltr">On Thu, Jan 18, 2024 at 1:20 PM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">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 had this working at one point.<div><br></div><div>Should I add <span style="color:rgb(80,0,80)">PetscViewerHDF5PushTimesteppin</span><span style="color:rgb(80,0,80)">g? </span></div><div><span style="color:rgb(80,0,80)">I don't create a viewer now, but I could make one.</span></div></div></blockquote><div><br></div><div>That will make it work. The real fix would be to check at swarm.c:45 to see whether timestepping is set.</div></div></div></blockquote><div><br></div><div>Did you fix this? I do see PetscCall(PetscViewerHDF5SetTimestep(viewer, seqnum)); at swarm.c:45</div><div><br></div><div>But, I still need to comment out the check to get this to work.</div><div><br></div><div>Thanks,</div><div>Mark </div><div><br></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 class="gmail_quote"><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><span style="color:rgb(80,0,80)">Thanks,</span></div><div><span style="color:rgb(80,0,80)">Mark</span></div></div><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 18, 2024 at 11:26 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></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 dir="ltr">On Thu, Jan 18, 2024 at 10:08 AM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">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://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!cD7sluQj9NiJty0xU3K76VpLTY-Rrg5Yt76rcjqqqRBJrORnOfs8HUpFGI3GWx5NmacCoQMG4Rzh9rws_R_xRvs$" 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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cD7sluQj9NiJty0xU3K76VpLTY-Rrg5Yt76rcjqqqRBJrORnOfs8HUpFGI3GWx5NmacCoQMG4Rzh9rws_GyIuzA$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cD7sluQj9NiJty0xU3K76VpLTY-Rrg5Yt76rcjqqqRBJrORnOfs8HUpFGI3GWx5NmacCoQMG4Rzh9rws_GyIuzA$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div></div>