<div dir="ltr">Dear PETSc team,<div><br></div><div>What is the difference between the following two methods to get the local dimensions of a square matrix A? If they do the same, which one is recommended? Should I use MPI_Scan after both?</div><div><br></div><div>1)</div><div><br></div><div>PetscInt local_size = PETSC_DECIDE;<br></div><div><br></div><div>MatSetSizes(A, local_size, local_size, N, N);<br></div><div><br></div><div><br></div><div>2)</div><div><br></div><div><div>PetscInt local_size = PETSC_DECIDE;</div></div><div><br></div><div><div>PetscSplitOwnership(PETSC_COMM_WORLD, &local_size, &N);</div></div><div><br></div><div><div>MPI_Scan(&local_size, &end_row, 1, MPIU_INT, MPI_SUM, PETSC_COMM_WORLD);</div><div>begin_row = end_row - local_size;</div></div><div><br></div><div><br></div><div>Thanks in advance,</div><div>Massoud</div></div>