<div dir="ltr">I have a 2 x 2 MatComposite and PCSetup is hanging because this branch below does "NEED" to be checked. This is in matrix.c around line 7500. Barry added this a year ago (and the code has been working so I am puzzled). I commented this code out and it works.<div><br></div><div>The 2nd block here is very small and is all on one processor, so all but one proc have (n == rend-rstart).<br><div><br></div><div>This code seems to work in maint, so I am puzzled. Perhaps this code was merged recently?</div><div>
<p class=""><span class=""></span>Mark</p>
<p class=""><span class=""> if (!iscol || isrow == iscol) {</span></p>
<p class=""><span class=""> PetscBool stride;</span></p>
<p class=""><span class=""> ierr = PetscObjectTypeCompare((PetscObject)isrow,ISSTRIDE,&stride);CHKERRQ(ierr);</span></p>
<p class=""><span class=""> if (stride) {</span></p>
<p class=""><span class=""> PetscInt first,step,n,rstart,rend;</span></p>
<p class=""><span class=""> ierr = ISStrideGetInfo(isrow,&first,&step);CHKERRQ(ierr);</span></p>
<p class=""><span class=""> if (step == 1) {</span></p>
<p class=""><span class=""> ierr = MatGetOwnershipRange(mat,&rstart,&rend);CHKERRQ(ierr);</span></p>
<p class=""><span class=""> if (rstart == first) {</span></p>
<p class=""><span class=""> ierr = ISGetLocalSize(isrow,&n);CHKERRQ(ierr);</span></p>
<p class=""><span class=""> if (n == rend-rstart) {</span></p>
<p class=""><span class=""> /* special case grabbing all rows; NEED to do a global reduction to make sure all processes are doing this */</span></p>
<p class=""><span class=""> if (cll == MAT_INITIAL_MATRIX) {</span></p>
<p class=""><span class=""> *newmat = mat;</span></p>
<p class=""><span class=""> ierr = PetscObjectReference((PetscObject)mat);CHKERRQ(ierr);</span></p>
<p class=""><span class=""> }</span></p>
<p class=""><span class=""> PetscFunctionReturn(0);</span></p>
<p class=""><span class=""> }</span></p>
<p class=""><span class=""> }</span></p>
<p class=""><span class=""> }</span></p>
<p class=""><span class=""> }</span></p>
<p class=""><span class=""> }</span></p></div></div></div>