On Apr 8, 2009, at 3:11 AM, Jed Brown wrote: > On Tue 2009-04-07 21:02, Barry Smith wrote: >> >> Jed, >> >> Please remind me of what the simplest fix is? Can we just zero the >> vector before the scatter for the MatMult and MatMultTranspose? >> What about for MatMultAdd and MatMultTransposeAdd, does anything >> need to >> be done? > > The simplest fix is to zero the vector before and always use > ADD_VALUES.
Why ADD_VALUES? I don't see that as being any more "correct" then INSERT_VALUES in the case when two different x locations are assigned to a single y location. Perhaps the matrix class based on the scatter should have an option allowing the user to determine add or insert? MatScatterSetType()? Barry > > I pushed this a week ago and cited this thread in the commit message, > see 6d3d60abcf7d. It's just worth remembering that it can be > optimized > if someone ever finds that this is a bottleneck. > > Jed