<div class="gmail_quote">On Wed, Dec 28, 2011 at 08:11, Alexander Grayver <span dir="ltr"><<a href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#ffffff" text="#000000">I tried LU, the result is the same (attached). The matrix is
recognized as a symmetric, even though I put in the code:<br>
ierr = MatSetOption(A,MAT_SYMMETRIC,PETSC_FALSE);<br>
ierr = MatSetOption(A,MAT_SPD,PETSC_FALSE);<br>
<br>
Seems like internal check? <br>
I checked positive-definiteness of the matrix in matlab (using
[L,p,s] = chol(A); test) and it's not SPD. <br>
So it seems like PaStiX is not very robust. This case is not one
inch close to the bad cases I used MUMPS with. </div></blockquote></div><br><div>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.</div>
<div><br></div><div><div><font face="'courier new', monospace">$ hg diff src/mat/impls/aij/mpi/pastix/pastix.c </font></div><div><font face="'courier new', monospace"><div>--- a/src/mat/impls/aij/mpi/pastix/pastix.c</div>
<div>+++ b/src/mat/impls/aij/mpi/pastix/pastix.c</div><div>@@ -446,16 +446,6 @@</div><div> ierr = PetscMalloc((lu->n)*sizeof(PetscInt) ,&(lu->invp));CHKERRQ(ierr);</div><div> }</div><div> </div><div>- if (isSym) {</div>
<div>- /* On symmetric matrix, LLT */</div><div>- lu->iparm[IPARM_SYM] = API_SYM_YES;</div><div>- lu->iparm[IPARM_FACTORIZATION] = API_FACT_LDLT;</div><div>- } else {</div><div>- /* On unsymmetric matrix, LU */</div>
<div>- lu->iparm[IPARM_SYM] = API_SYM_NO;</div><div>- lu->iparm[IPARM_FACTORIZATION] = API_FACT_LU;</div><div>- }</div><div>-</div><div> /*----------------*/</div><div> if (lu->matstruc == DIFFERENT_NONZERO_PATTERN){</div>
<div> if (!(isSeqAIJ || isSeqSBAIJ)) {</div><div>@@ -529,7 +519,7 @@</div><div> </div><div> PetscFunctionBegin;</div><div> lu->iparm[IPARM_FACTORIZATION] = API_FACT_LU;</div><div>- lu->iparm[IPARM_SYM] = API_SYM_YES;</div>
<div>+ lu->iparm[IPARM_SYM] = API_SYM_NO;</div><div> lu->matstruc = DIFFERENT_NONZERO_PATTERN;</div><div> F->ops->lufactornumeric = MatFactorNumeric_PaStiX;</div><div> PetscFunctionReturn(0);</div>
<div>@@ -545,7 +535,7 @@</div><div> </div><div> PetscFunctionBegin;</div><div> lu->iparm[IPARM_FACTORIZATION] = API_FACT_LLT;</div><div>- lu->iparm[IPARM_SYM] = API_SYM_NO;</div><div>+ lu->iparm[IPARM_SYM] = API_SYM_YES;</div>
<div> lu->matstruc = DIFFERENT_NONZERO_PATTERN;</div><div> (F)->ops->choleskyfactornumeric = MatFactorNumeric_PaStiX;</div><div> PetscFunctionReturn(0);</div></font></div></div>