<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Developers,<br><div><br></div><div>John just noticed that the matrix assembly was slow when having sufficient amount of off-diagonal entries. It was not a MPI issue since I was  able to reproduce the issue using two cores on my desktop, that is, "mpirun -n 2".</div><div><br></div><div>I turned  on a profiling, and 99.99% of the time was spent on PetscSortIntWithArrayPair (recursively calling).   It took THREE MINUTES  to get the assembly done. And then changed to use the option "-matstash_legacy" to restore </div><div>the code to the old assembly routine, and the same code took ONE SECOND to get the matrix assembly done. </div><div><br></div><div>Should write any better sorting algorithms?</div><div><br></div><div><br></div><div>Fande,</div></div></div></div></div>