Re: [petsc-users] Orthogonalization of a (sparse) PETSc matrix

2023-08-29 Thread Thanasis Boutsikakis
Thanks Jose, This works indeed. However, I was under the impression that this conversion might be very costly for big matrices with low sparsity and it would scale with the number of non-zero values. Do you have any idea of the efficiency of this operation? Thanks > On 29 Aug 2023, at 19:13,

Re: [petsc-users] Orthogonalization of a (sparse) PETSc matrix

2023-08-29 Thread Barry Smith
Ah, there is https://petsc.org/release/manualpages/Mat/MATSOLVERSPQR/#matsolverspqr See also https://petsc.org/release/manualpages/Mat/MatGetFactor/#matgetfactor and https://petsc.org/release/manualpages/Mat/MatQRFactorSymbolic/ > On Aug 29, 2023, at 1:17 PM, Jed Brown wrote: > > Suite

Re: [petsc-users] Error while building PETSc with MATLAB

2023-08-29 Thread Satish Balay via petsc-users
Well - you sent in libmesh log not petsc's configure.log/make.log for petsc-3.17 Anyway - with petsc-3.13 - you have: Matlab: Includes: -I/usr/local/MATLAB/R2020b/extern/include /usr/local/MATLAB/R2020b MatlabEngine: Library: -Wl,-rpath,/usr/local/MATLAB/R2020b/sys/os/glnxa64:/usr/l

Re: [petsc-users] Orthogonalization of a (sparse) PETSc matrix

2023-08-29 Thread Jed Brown
Suitesparse includes a sparse QR algorithm. The main issue is that (even with pivoting) the R factor has the same nonzero structure as a Cholesky factor of A^T A, which is generally much denser than a factor of A, and this degraded sparsity impacts Q as well. I wonder if someone would like to c

Re: [petsc-users] Orthogonalization of a (sparse) PETSc matrix

2023-08-29 Thread Jose E. Roman
The result of bv.orthogonalize() is most probably a dense matrix, and the result replaces the input matrix, that's why the input matrix is required to be dense. You can simply do this: bv = SLEPc.BV().createFromMat(A.convert('dense')) Jose > El 29 ago 2023, a las 18:50, Thanasis Boutsikakis

Re: [petsc-users] Orthogonalization of a (sparse) PETSc matrix

2023-08-29 Thread Barry Smith
Are the nonzero structures of all the rows related? If they are, one could devise a routine to take advantage of this relationship, but if the nonzero structures of each row are "randomly" different from all the other rows, then it is difficult to see how one can take advantage of the sparsit

Re: [petsc-users] Error while building PETSc with MATLAB

2023-08-29 Thread Matthew Knepley
On Tue, Aug 29, 2023 at 9:08 AM Satish Balay via petsc-users < petsc-users@mcs.anl.gov> wrote: > Send configure.log, make.log from both petsc-3.13 and 3.17 [or 3.19]. > > [you can gzip them to make the logs friendly to mailing list - or send > them to petsc-maint] > > And does test suite work with

[petsc-users] Orthogonalization of a (sparse) PETSc matrix

2023-08-29 Thread Thanasis Boutsikakis
Hi all, I have the following code that orthogonalizes a PETSc matrix. The problem is that this implementation requires that the PETSc matrix is dense, otherwise, it fails at bv.SetFromOptions(). Hence the assert in orthogonality(). What could I do in order to be able to orthogonalize sparse matr

Re: [petsc-users] Error while building PETSc with MATLAB

2023-08-29 Thread Satish Balay via petsc-users
Send configure.log, make.log from both petsc-3.13 and 3.17 [or 3.19]. [you can gzip them to make the logs friendly to mailing list - or send them to petsc-maint] And does test suite work with 3.17? [or 3.19?] Satish On Tue, 29 Aug 2023, INTURU SRINIVAS 20PHD0548 via petsc-users wrote: > I am