[petsc-users] Get LU decomposition of a rectangular matrix

Natacha BEREUX natacha.bereux at gmail.com
Mon Mar 12 04:35:09 CDT 2018


Dear Petsc user's

I am trying to use SuperLU_dist to compute LU decomposition of a non-square
matrix.

My purpose is to build a basis of the nullspace of a matrix C . This matrix
stores constraints (i.e. linear relationships between degrees of freedom):
it is thus rectangular (size 9 x 33) and not square
I need to get the L U factors of C^T which is a tall skinny matrix.
It is possible when using directly SuperLu or SuperLU_dist
But when I use Petsc interface to SuperLU I get the following error :

[0]PETSC ERROR: Invalid argument
[0]PETSC ERROR: Must be square matrix, rows 9 columns 33
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for
trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.8.3, Dec, 09, 2017
[0]PETSC ERROR: #1 MatGetOrdering() line 243 in
/home/H03755/Librairies/petsc-3.8.3/src/mat/order/sorder.c
[0]PETSC ERROR: #2 PCSetUp_LU() line 84 in
/home/H03755/Librairies/petsc-3.8.3/src/ksp/pc/impls/factor/lu/lu.c
[0]PETSC ERROR: #3 PCSetUp() line 924 in
/home/H03755/Librairies/petsc-3.8.3/src/ksp/pc/interface/precon.c
[0]PETSC ERROR: #4 KSPSetUp() line 381 in
/home/H03755/Librairies/petsc-3.8.3/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #5 KSPSolve() line 612 in
/home/H03755/Librairies/petsc-3.8.3/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #6 User provided function() line 0 in User file

The use of non-square matrices is forbidden.

Is there a way to specify that I want to use a rectangular matrix ? How can
I proceed to call SuperLU through PETSc with a rectangular matrix ?

Thanks a lot for your help
Best regards,

Natacha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180312/e5a42e2b/attachment.html>


More information about the petsc-users mailing list