<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
All,<br>
<br>
I'm working on adding support for matrix products to AIJMKL, and I'm uncertain about some issues surrounding empty matrices. PETSc will happily let me multiply an empty matrix with another (and this arises in the sequential matrix-matrix multiplication routines
when running with multiple MPI ranks and using MPIAIJ), but MKL does not like empty matrices (or matrices with no nonzeros), so I've got code in various places in the existing AIJMKL routines to handle these cases without calling MKL.<br>
<br>
I'm not quite sure what needs to be done in, say, MatMatMultSymbolic_SeqAIJMKL_SeqAIJMKL(). In the SeqAIJ version, if a matrix A is passed in that has zero rows (that is, A->rmap->N = 0), and matrix B has N columns (B->cmap->N = N), then a matrix C with zero
rows and N columns is created. My question boils down to "Does it mean anything in PETSc to have a matrix with 0 rows but a nonzero number of columns"? It is less complicated if I handle the empty matrix cases by creating a matrix with 0 rows and 0 columns,
but I am not sure if this breaks something. (I'm also not sure what a "matrix" with 0 rows even means.) Also not sure if there is any other info that I need to preserve in the result matrix C, of if it is OK to handle the case of any empty A or B by always
producing the same empty matrix C.<br>
<br>
--Richard<br>
</body>
</html>