Discussion:
[petsc-users] MUMPS with symmetric matrices
Gianluca Meneghello
2015-11-04 20:18:39 UTC
Permalink
Dear all,

I am trying to solve a linear system for a symmetric matrix with MUMPS.

Is there a way to tell MUMPS that the matrix is indeed symmetric?

The way I build the matrix is

Mat A,AT,ATA
MatHermitianTranspose(A,MAT_INITIAL_MATRIX,&AT);
MatMatMult(AT,A,MAT_INITIAL_MATRIX,7,&ATA);
MatSetOption(ATA,MAT_SYMMETRY_ETERNAL,PETSC_TRUE);

but MUMPS returns

L U Solver for unsymmetric matrices

Of course, any suggestion of a better/more efficient way to build ATA or
store only half of it, that is more than welcome.

Thanks for your help,

Gianluca
Jed Brown
2015-11-04 20:46:35 UTC
Permalink
Post by Gianluca Meneghello
Dear all,
I am trying to solve a linear system for a symmetric matrix with MUMPS.
Is there a way to tell MUMPS that the matrix is indeed symmetric?
The way I build the matrix is
Mat A,AT,ATA
MatHermitianTranspose(A,MAT_INITIAL_MATRIX,&AT);
MatMatMult(AT,A,MAT_INITIAL_MATRIX,7,&ATA);
MatSetOption(ATA,MAT_SYMMETRY_ETERNAL,PETSC_TRUE);
but MUMPS returns
L U Solver for unsymmetric matrices
You're probably using -pc_type lu rather than -pc_type cholesky.
Post by Gianluca Meneghello
Of course, any suggestion of a better/more efficient way to build ATA or
store only half of it, that is more than welcome.
Where does A come from?

There is MatTransposeMatMult()
Gianluca Meneghello
2015-11-04 21:06:15 UTC
Permalink
That is correct... I will try with -pc_type cholesky and use
MatTransposeMatMult.

Using cholesky I do not need to specify mumps as a solver, am I right?

A is a linearization of the Navier Stokes equation.

Thanks!

Gianluca
Post by Jed Brown
Post by Gianluca Meneghello
Dear all,
I am trying to solve a linear system for a symmetric matrix with MUMPS.
Is there a way to tell MUMPS that the matrix is indeed symmetric?
The way I build the matrix is
Mat A,AT,ATA
MatHermitianTranspose(A,MAT_INITIAL_MATRIX,&AT);
MatMatMult(AT,A,MAT_INITIAL_MATRIX,7,&ATA);
MatSetOption(ATA,MAT_SYMMETRY_ETERNAL,PETSC_TRUE);
but MUMPS returns
L U Solver for unsymmetric matrices
You're probably using -pc_type lu rather than -pc_type cholesky.
Post by Gianluca Meneghello
Of course, any suggestion of a better/more efficient way to build ATA or
store only half of it, that is more than welcome.
Where does A come from?
There is MatTransposeMatMult()
Jed Brown
2015-11-04 21:16:35 UTC
Permalink
Post by Gianluca Meneghello
That is correct... I will try with -pc_type cholesky and use
MatTransposeMatMult.
Using cholesky I do not need to specify mumps as a solver, am I right?
Of course you do.
Post by Gianluca Meneghello
A is a linearization of the Navier Stokes equation.
Of the differential operator, its inverse, or a map from some parameters
to observations?
Gianluca Meneghello
2015-11-04 23:37:47 UTC
Permalink
It is a discretization of the differential operator, of which I would need
the inverse (or LU decomposition). My goal is frequency response
(resolvant) analysis of the linearized Navier-Stokes operator.

There was a reason I was not using MatTransposeMatMult, that is the matrix
is complex and I would need MatTransposeHemitianMatMult (or something like
that). It seems to me that is not available (or does MatTransposeMatMult
compute the Hermitian transpose?)

Any suggestion is of course welcome!

Thanks

Gianluca
Post by Jed Brown
Post by Gianluca Meneghello
That is correct... I will try with -pc_type cholesky and use
MatTransposeMatMult.
Using cholesky I do not need to specify mumps as a solver, am I right?
Of course you do.
Post by Gianluca Meneghello
A is a linearization of the Navier Stokes equation.
Of the differential operator, its inverse, or a map from some parameters
to observations?
Gianluca Meneghello
2015-11-05 00:18:33 UTC
Permalink
I have just read that there is no special algorithm for Hermitian matrices
in MUMPS (sorry, I meant Hermitian, not symmetric... the matrix is complex).

Sorry for this. In any case, if there is any suggestion it is more than
welcome!

Thanks for your help and your work,

Gianluca
Post by Gianluca Meneghello
It is a discretization of the differential operator, of which I would need
the inverse (or LU decomposition). My goal is frequency response
(resolvant) analysis of the linearized Navier-Stokes operator.
There was a reason I was not using MatTransposeMatMult, that is the
matrix is complex and I would need MatTransposeHemitianMatMult (or
something like that). It seems to me that is not available (or does
MatTransposeMatMult compute the Hermitian transpose?)
Any suggestion is of course welcome!
Thanks
Gianluca
Post by Jed Brown
Post by Gianluca Meneghello
That is correct... I will try with -pc_type cholesky and use
MatTransposeMatMult.
Using cholesky I do not need to specify mumps as a solver, am I right?
Of course you do.
Post by Gianluca Meneghello
A is a linearization of the Navier Stokes equation.
Of the differential operator, its inverse, or a map from some parameters
to observations?
Loading...