Re: [petsc-dev] Meaning of PETSc matrices with zero rows but nonzero columns?

2020-06-01 Thread Stefano Zampini
MKL fails on gemms calls too. At least in the past, not sure about the latest version. > On Jun 1, 2020, at 10:48 PM, Jeff Hammond wrote: > > I assume it's MKL sparse that fails for empty matrices, because the BLAS and > LAPACK should follow the Netlib convention. > > I'm sorry that MKL is

Re: [petsc-dev] Meaning of PETSc matrices with zero rows but nonzero columns?

2020-06-01 Thread Jeff Hammond
I assume it's MKL sparse that fails for empty matrices, because the BLAS and LAPACK should follow the Netlib convention. I'm sorry that MKL is unwilling to do nothing for you :-) Jeff On Sat, May 30, 2020 at 4:26 PM Mills, Richard Tran via petsc-dev < petsc-dev@mcs.anl.gov> wrote: > Thanks for

Re: [petsc-dev] Meaning of PETSc matrices with zero rows but nonzero columns?

2020-06-01 Thread Lisandro Dalcin
On Sun, 31 May 2020 at 02:26, Mills, Richard Tran via petsc-dev < petsc-dev@mcs.anl.gov> wrote: > Thanks for the replies, everyone. It suppose is not actually that hard for > me to handle these dimensions properly -- I just hadn't personally > encountered or thought much about when such operations

Re: [petsc-dev] Meaning of PETSc matrices with zero rows but nonzero columns?

2020-05-30 Thread Mills, Richard Tran via petsc-dev
Thanks for the replies, everyone. It suppose is not actually that hard for me to handle these dimensions properly -- I just hadn't personally encountered or thought much about when such operations with empty matrices might arise, and was initially puzzled about what multiplication by an "empty"

Re: [petsc-dev] Meaning of PETSc matrices with zero rows but nonzero columns?

2020-05-30 Thread Stefano Zampini
> On May 31, 2020, at 1:03 AM, Jed Brown wrote: > > Stefano Zampini writes: > >> If A is 0x8 and B is 8x5 then C is correct to be of size 0x5. The rows and >> columns of the resulting matrix have to follow the rules. > > Right, I think if you said C is 0x0 (which seems like Richard's propo

Re: [petsc-dev] Meaning of PETSc matrices with zero rows but nonzero columns?

2020-05-30 Thread Jed Brown
Stefano Zampini writes: > If A is 0x8 and B is 8x5 then C is correct to be of size 0x5. The rows and > columns of the resulting matrix have to follow the rules. Right, I think if you said C is 0x0 (which seems like Richard's proposal), you'd need to relax shape compatibility logic in many plac

Re: [petsc-dev] Meaning of PETSc matrices with zero rows but nonzero columns?

2020-05-30 Thread Stefano Zampini
And MKL has the same issues for dense , see for example here https://gitlab.com/petsc/petsc/-/blob/master/src/mat/impls/dense/seq/dense.c#L2186 If A is 0x8 and B is 8x5 then C is correct to be of size 0x5. The r

Re: [petsc-dev] Meaning of PETSc matrices with zero rows but nonzero columns?

2020-05-30 Thread Mark Adams
Failing for empty matrices sucks of MKL. I don't know of any reason that we care how many columns are in a matrix with no rows. I see no reason not to let it stay the way it is, that is with the number of columns that it should have if it had rows. I would vote for just doing what you need to do to

[petsc-dev] Meaning of PETSc matrices with zero rows but nonzero columns?

2020-05-30 Thread Mills, Richard Tran via petsc-dev
All, 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 M