<div dir="ltr"><div dir="ltr">On Wed, Aug 17, 2022 at 8:31 AM Nicholas Arnold-Medabalimi <<a href="mailto:narnoldm@umich.edu">narnoldm@umich.edu</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">Good Morning <br><br>I have been working with the transitive closure to check to see if a node point has a cell that is rooted on a process. However, I think I am having a more fundamental issue. Even just calling the RestoreTransitiveClosure immediately after getting it is throwing a PetscError.(that is removing all the calls between the two closure functions. I'm not exactly sure what is causing the issue. I have used this method previously, except on cell points to get the constituent vertex points. Is there some nuance to using the supports instead of the cones? <br></div></blockquote><div><br></div><div>You should initialize closure = NULL in its declaration.</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 style="color:rgb(255,255,255);background-color:rgb(0,36,81);font-family:Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre-wrap"><div>    

<div style="line-height:19px"><div><span style="color:rgb(187,218,255)">    DMPlexGetDepthStratum</span>(<span style="color:rgb(255,197,143)">dm</span>, <span style="color:rgb(255,197,143)">0</span>, <span style="color:rgb(153,255,255)">&</span><span style="color:rgb(255,157,164)">pStart</span>, <span style="color:rgb(153,255,255)">&</span><span style="color:rgb(255,157,164)">pEnd</span>);
<div style="line-height:19px"><div><span style="color:rgb(187,218,255)">    PetscPrintf</span>(<span style="color:rgb(255,157,164)">PETSC_COMM_WORLD</span>, <span style="color:rgb(209,241,169)">"Pstart: </span>%d<span style="color:rgb(209,241,169)">, Pend: </span>%d<span style="color:rgb(255,197,143)">\n</span><span style="color:rgb(209,241,169)">"</span>, <span style="color:rgb(255,157,164)">pStart</span>, <span style="color:rgb(255,157,164)">pEnd</span>);</div></div></div></div><span style="color:rgb(235,187,255)">    for</span> (<span style="color:rgb(235,187,255)">int</span> <span style="color:rgb(255,157,164)">p</span> <span style="color:rgb(153,255,255)">=</span> <span style="color:rgb(255,157,164)">pStart</span>; <span style="color:rgb(255,157,164)">p</span> <span style="color:rgb(153,255,255)"><</span> <span style="color:rgb(255,157,164)">pEnd</span>; <span style="color:rgb(255,157,164)">p</span><span style="color:rgb(153,255,255)">++</span>)</div><div>    {</div><br><div>        <span style="color:rgb(255,238,173)">PetscInt</span> <span style="color:rgb(255,157,164)">closureSize</span>;</div><div>        <span style="color:rgb(255,238,173)">PetscInt</span> <span style="color:rgb(153,255,255)">*</span><span style="color:rgb(255,157,164)">closure</span>;</div><br><div>        <span style="color:rgb(255,157,164)">ierr</span> <span style="color:rgb(153,255,255)">=</span> <span style="color:rgb(187,218,255)">DMPlexGetTransitiveClosure</span>(<span style="color:rgb(255,197,143)">dm</span>, <span style="color:rgb(255,157,164)">p</span>, <span style="color:rgb(255,157,164)">PETSC_FALSE</span>, <span style="color:rgb(153,255,255)">&</span><span style="color:rgb(255,157,164)">closureSize</span>, <span style="color:rgb(153,255,255)">&</span><span style="color:rgb(255,157,164)">closure</span>);</div><div>        <span style="color:rgb(187,218,255)">CHKERRQ</span>(<span style="color:rgb(255,157,164)">ierr</span>);</div><div>        <span style="color:rgb(187,218,255)">PetscSynchronizedPrintf</span>(<span style="color:rgb(255,157,164)">PETSC_COMM_WORLD</span>, <span style="color:rgb(209,241,169)">"rank:</span>%d<span style="color:rgb(255,197,143)">\n</span><span style="color:rgb(209,241,169)">"</span>, <span style="color:rgb(255,157,164)">rank</span>);</div><div>        <span style="color:rgb(235,187,255)">for</span> (<span style="color:rgb(235,187,255)">int</span> <span style="color:rgb(255,157,164)">i</span> <span style="color:rgb(153,255,255)">=</span> <span style="color:rgb(255,197,143)">0</span>; <span style="color:rgb(255,157,164)">i</span> <span style="color:rgb(153,255,255)"><</span> (<span style="color:rgb(255,197,143)">2</span> <span style="color:rgb(153,255,255)">*</span> <span style="color:rgb(255,157,164)">closureSize</span>); <span style="color:rgb(255,157,164)">i</span> <span style="color:rgb(153,255,255)">=</span> <span style="color:rgb(255,157,164)">i</span> <span style="color:rgb(153,255,255)">+</span> <span style="color:rgb(255,197,143)">2</span>)</div><div>        {</div><div>            <span style="color:rgb(187,218,255)">PetscSynchronizedPrintf</span>(<span style="color:rgb(255,157,164)">PETSC_COMM_WORLD</span>, <span style="color:rgb(209,241,169)">"</span>%d<span style="color:rgb(255,197,143)">\n</span><span style="color:rgb(209,241,169)">"</span>, <span style="color:rgb(255,157,164)">closure</span>[<span style="color:rgb(255,157,164)">i</span>]);</div><div>        }</div><div>        <span style="color:rgb(187,218,255)">PetscSynchronizedFlush</span>(<span style="color:rgb(255,157,164)">PETSC_COMM_WORLD</span>, <span style="color:rgb(187,218,255)">NULL</span>);</div><div>        <span style="color:rgb(255,157,164)">ierr</span> <span style="color:rgb(153,255,255)">=</span> <span style="color:rgb(187,218,255)">DMPlexRestoreTransitiveClosure</span>(<span style="color:rgb(255,197,143)">dm</span>, <span style="color:rgb(255,157,164)">p</span>, <span style="color:rgb(255,157,164)">PETSC_FALSE</span>, <span style="color:rgb(153,255,255)">&</span><span style="color:rgb(255,157,164)">closureSize</span>, <span style="color:rgb(153,255,255)">&</span><span style="color:rgb(255,157,164)">closure</span>);</div><div>        <span style="color:rgb(187,218,255)">CHKERRQ</span>(<span style="color:rgb(255,157,164)">ierr</span>);</div><div>    }</div></div><br>Results in an error when the RestoreTransitiveClosure is called. I have checked and the resulting output for the closures are correct. <br><br>Pstart: 510, Pend: 1532<br>rank:0<br>510<br>1534<br>1535<br>0<br>rank:1<br>492<br>1478<br>1479<br>0<div>[1]PETSC ERROR: 2953<br>--------------------- Error Message --------------------------------------------------------------<br>[1]PETSC ERROR: 491<br>Object is in wrong state<br>[1]PETSC ERROR: Array was not checked out<br>[1]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[1]PETSC ERROR: Petsc Release Version 3.17.4, Aug 01, 2022 <br>[1]PETSC ERROR: /home/narnoldm/code/solver-playground/build/bin/pgrid_c on a  by narnoldm Wed Aug 17 11:18:20 2022<br>[0]PETSC ERROR: [1]PETSC ERROR: Configure options --prefix=/home/narnoldm/code/solver-playground/build/external/PETSc --with-hdf5-dir=/home/narnoldm/code/solver-playground/build/external/HDF5 --with-cgns-dir=/home/narnoldm/code/solver-playground/build/external/CGNS --download-triangle --download-parmetis --download-metis --with-debugging=1<br><br>Any assistance is greatly appreciated.<br><br>Sincerely<br>Nicholas<br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div style="font-family:arial;font-size:small"><font color="#000000">Nicholas Arnold-Medabalimi<br><br></font><span style="font-family:sans-serif;font-size:14px">Ph.D. Candidate</span><font color="#000000"><br>Computational Aeroscience Lab<br>University of Michigan</font></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <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>