On Fri, Jul 28, 2017 at 12:02 PM, Stefano Zampini <[email protected] > wrote:
> MatShift, MatZeroEntries…. there are for sure others that modify the > entries. I would suggest you to quickly go over the online Mat pages. > > Just a curiosity: Why the inspector should care about the magnitude of the > entries? > If it’s clear in the code how to change the entry of the CSR that the > inspector uses (not the CSR itself, just the values), then the missing > functions can be fixed later. > The inspector shouldn't care, of course, at all about the magnitude of the entries since it is only looking at the sparsity pattern. Unfortunately, the the MKL sparse inspector-executor routines store things in an internal representation that I cannot modify; I just have to tell MKL to rebuild the data structure. It doesn't use the A,I,J arrays that PETSc has after these are used by mkl_sparse_optimize(). --Richard > > > > On Jul 28, 2017, at 9:58 PM, Barry Smith <[email protected]> wrote: > > > > > >> On Jul 28, 2017, at 12:50 PM, Richard Tran Mills <[email protected]> > wrote: > >> > >> Folks, > >> > >> I've been debugging my rmills/add-aijmkl branch, and I found that one > bug I had was related to what happens when I am using the MKL sparse > inspector-executor routines inside an AIJMKL matrix and then MatScale is > called on the matrix. MatScale modifies the entries of the matrix, thereby > invalidating the internal representation that the MKL routines use. > Currently, I've set things up so that the MKL representation is only > updated in MatAssemblyEnd_SeqAIJMKL and MatDuplicate_SeqAIJMKL. Looks like > I also need a MatScale_SeqAIJMKL that will update the MKL representation > when needed. Are there other routines that may modify the matrix entries > without invoking MatAssemblyEnd? > > > > There is no general "rule"; generally any method that could result in > a different nonzero pattern results in calls to the MatAssemblyEnd... but > otherwise they likely do not call it. MatDiagonalScale() is a candidate. > > > > Barry > > > >> > >> --Richard > > > >
