OK, making things easier and flexible, I only did 1) Move test to MatGetFactor()
2) Test: complex build && ftype==CHOLESKY||ICC: if (mat->hermitian) throw an "not supported" error MatIsSymmetric() is either expensive or not supported, and users may apply Cholesky or ICC to almost symmetric matrix, so I will not change existing way for real build. Hong On Fri, Sep 29, 2017 at 1:48 PM, Jed Brown <[email protected]> wrote: > Barry Smith <[email protected]> writes: > > > 1) The test is definitely in the wrong place. If we are testing and > erroring if using Cholesky and mat is not marked as symmetric or hermitian > the test should be in MatGetFactor() not in a particular implementation. > > > > 2) It is a tough call if we should do this check or not. There are > good arguments in both directions. > > > > One thing we could do is if the matrix is not marked as > symmetric/hermitian is we could just check at that point (but expensive) or > we could just check in debug mode. > > > > But I think we should require the user to set the flag (note for SBAIJ > the flag for symmetric (or hermitian? which one) should be automatically > set at creation). > > So what's the approach if the user wants to do Cholesky on the nearby > symmetric matrix defined by the upper triangular part? Now they'll need > to create that matrix explicitly? It's certainly relevant for a > nearly-symmetric matrix, either due to a weak transport process or > implementation of boundary conditions. > >
