BV holds a tall-skinny matrix or collection of vectors with equivalent semantics. If you start with a Mat, you can use:
https://slepc.upv.es/documentation/current/docs/manualpages/BV/BVCreateFromMat.html BVOrthogonalize() computes a QR factorization in blocks or incrementally. https://slepc.upv.es/documentation/current/docs/manualpages/BV/BVOrthogonalize.html The BVOrthogBlockType can be used to select Cholesky QR or TSQR, among others. These have lower communication requirements than Gram-Schmidt. https://slepc.upv.es/documentation/current/docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization For more on BV: https://slepc.upv.es/documentation/current/docs/manualpages/BV/index.html Rakesh Halder <[email protected]> writes: > Hi Jed, > > I can’t find much on computing the QR decomposition in PETSc, are there any > methods in particular? > > I looked at the documentation for BVOrthogonalize() and it seems to be only > for square sequential matrices. > > On Sun, Nov 8, 2020 at 11:34 PM Jed Brown <[email protected]> wrote: > >> Rakesh Halder <[email protected]> writes: >> >> > Hi all, >> > >> > I'm wondering what the recommended method is to solve linear systems >> Ax=b, >> > where A is an N by n matrix (N >> n) and dense. I've used the CGLS and >> LSQR >> > algorithms, but have issues applying any kind of preconditioner. Looking >> at >> > the PETSc documentation, it doesn't look like there are any direct >> solvers >> > for rectangular systems, but only iterative ones which aren't very useful >> > for dense systems. >> >> QR is the standard technique. For a highly parallel implementation, I >> would check out BVOrthogonalize() from SLEPc, which has several good >> options. Arguably, this feature should be migrated to PETSc. >> >> > I'm also wondering if it's best to use a dense or sparse (AIJ) matrix >> > format in general when working with dense matrices. I've just been using >> > sparse matrices, due to being able to preallocate memory. >> > >> > Thanks, >> > >> > Rakesh Halder >>
