[petsc-dev] Bug in MatZeroRows_MPIAIJ

Lisandro Dalcin dalcinl at gmail.com
Wed Jun 22 01:24:39 CDT 2016


On 22 June 2016 at 00:30, Barry Smith <bsmith at mcs.anl.gov> wrote:
>  Why not just remove the first if test (below) and just have the two conditions diag != 0.0 and drag == 0.0
>
>      if ((diag != 0.0) && (mat->A->rmap->N == mat->A->cmap->N)) {
>         ierr = MatZeroRows(mat->A, len, lrows, diag, NULL, NULL);CHKERRQ(ierr);

What about comparing mat->rmap->N and mat->cmap->N, then compare
size(mat->rmap->comm) and size(mat->cmap->comm), and finally compare
(memcmp) mat->rmap-range and mat->rmap-range? If everything matches,
the row&col layout is square, you know that in all processes so no
need to do reductions, and then  you can take the fast path zeroing
rows on the diagonal block mat->A.


-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459



More information about the petsc-dev mailing list