[petsc-dev] Bug in MatShift_MPIAIJ ?
Jeff Hammond
jeff.science at gmail.com
Thu Oct 22 17:28:06 CDT 2015
Interestingly enough, I just reviewed a paper (that will be presented at an
SC15 workshop) that demonstrated one can detect (potentially with false
positives) such issues using static analysis (in Clang).
Jeff
On Thu, Oct 22, 2015 at 2:33 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> Done
>
> > On Oct 21, 2015, at 8:06 AM, Eric Chamberland <
> Eric.Chamberland at giref.ulaval.ca> wrote:
> >
> > Hi Barry,
> >
> > if I may suggest, is it possible to have this test case added as a
> nightly test since, I don't know but... a matrix with no local lines may be
> something not widely tested...???
> >
> > Thanks!
> >
> > Eric
> >
> > On 20/10/15 10:47 PM, Barry Smith wrote:
> >>
> >> Eric,
> >>
> >> Thanks for the test case. I have determined the problem, it is a
> nasty bug caused by overly convoluted code.
> >>
> >> The MatSeqAIJSetPreallocation() is there because if the matrix had been
> assembled but had no values in it the MatShift_Basic() took forever since
> >> a new malloc needed to be done for each local row. The problem is that
> MatSeqAIJSetPreallocation changed the value of the aij->nonew flag of that
> sequential object, BUT MatAssemblyEnd_MPIA() assumed that the value of this
> flag was identical on all processes. In your case since aij->nz = 0 on your
> matrix with no local rows the value of nonew was changed on one process but
> not on others triggering disaster in the MatAssemblyEnd_MPIA().
> >>
> >> This is now fixed in the maint, master and next branches and will be in
> the next patch release. I have also attached the patch to this email.
> >>
> >> Barry
> >>
> >
>
>
--
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20151022/7d6b586b/attachment.html>
More information about the petsc-dev
mailing list