Richard Tran Mills <[email protected]> writes: > Hi Folks, > > I am still slogging away at debugging my AIJMKL matrix class using the > PETSc test suite. In some cases, such as mat/examples/tests/ex160.c, I am > seeing a failure of the mkl_sparse_optimize() call inside MatAssembly. > Digging into this, it appears that the problem is that the A array (the > nonzero values) for the matrix is NULL -- understandably, > mkl_sparse_optimize() does not like this. I've verified that this isn't due > to some bug my matrix class has introduced, as running the same example > with just plain SeqAIJ matrices and stepping through it with the debugger, > I still see the same NULL value for A. > > I am assuming that this is intended behavior, and what one might expect if > one, say, calls MatAssemblyBegin/End without ever doing an MatSetValues? > Looks like I need to simply check to see if A is NULL and not do the > mkl_sparse_optimize() step if so. I already had a check in there for a > matrix with no columns, as I believe I encountered that case (but with A > pointing to allocated memory). (And maybe I should check for a matrix with > no rows?) Are these the things I should be testing for, or is there > something nicer that I should be checking to see if the matrix to be > "assembled" doesn't actually consist of any matrix?
nnz=0? I hate to depend on malloc(0) and the like returning NULL.
signature.asc
Description: PGP signature
