[petsc-dev] PaStiX solution
Jed Brown
jedbrown at mcs.anl.gov
Wed Dec 28 08:26:20 CST 2011
On Wed, Dec 28, 2011 at 08:11, Alexander Grayver <agrayver at gfz-potsdam.de>wrote:
> I tried LU, the result is the same (attached). The matrix is recognized as
> a symmetric, even though I put in the code:
> ierr = MatSetOption(A,MAT_SYMMETRIC,PETSC_FALSE);
> ierr = MatSetOption(A,MAT_SPD,PETSC_FALSE);
>
> Seems like internal check?
> I checked positive-definiteness of the matrix in matlab (using [L,p,s] =
> chol(A); test) and it's not SPD.
> So it seems like PaStiX is not very robust. This case is not one inch
> close to the bad cases I used MUMPS with.
>
Just for kicks, can you try making the change below and re-running your
tests with LU? This is code that the PaStiX developers sent, but it doesn't
make sense to me as written.
$ hg diff src/mat/impls/aij/mpi/pastix/pastix.c
--- a/src/mat/impls/aij/mpi/pastix/pastix.c
+++ b/src/mat/impls/aij/mpi/pastix/pastix.c
@@ -446,16 +446,6 @@
ierr = PetscMalloc((lu->n)*sizeof(PetscInt)
,&(lu->invp));CHKERRQ(ierr);
}
- if (isSym) {
- /* On symmetric matrix, LLT */
- lu->iparm[IPARM_SYM] = API_SYM_YES;
- lu->iparm[IPARM_FACTORIZATION] = API_FACT_LDLT;
- } else {
- /* On unsymmetric matrix, LU */
- lu->iparm[IPARM_SYM] = API_SYM_NO;
- lu->iparm[IPARM_FACTORIZATION] = API_FACT_LU;
- }
-
/*----------------*/
if (lu->matstruc == DIFFERENT_NONZERO_PATTERN){
if (!(isSeqAIJ || isSeqSBAIJ)) {
@@ -529,7 +519,7 @@
PetscFunctionBegin;
lu->iparm[IPARM_FACTORIZATION] = API_FACT_LU;
- lu->iparm[IPARM_SYM] = API_SYM_YES;
+ lu->iparm[IPARM_SYM] = API_SYM_NO;
lu->matstruc = DIFFERENT_NONZERO_PATTERN;
F->ops->lufactornumeric = MatFactorNumeric_PaStiX;
PetscFunctionReturn(0);
@@ -545,7 +535,7 @@
PetscFunctionBegin;
lu->iparm[IPARM_FACTORIZATION] = API_FACT_LLT;
- lu->iparm[IPARM_SYM] = API_SYM_NO;
+ lu->iparm[IPARM_SYM] = API_SYM_YES;
lu->matstruc = DIFFERENT_NONZERO_PATTERN;
(F)->ops->choleskyfactornumeric = MatFactorNumeric_PaStiX;
PetscFunctionReturn(0);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111228/cb3b16fb/attachment.html>
More information about the petsc-dev
mailing list