<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
So if I understood it right, I put diff you gave in file
pastix_patch in petsc-dev dir and called:<br>
<br>
lib/petsc-dev> patch -Np1 < pastix_patch<br>
<br>
And built petsc again. Now <br>
<br>
lib/petsc-dev> hg diff
src/mat/impls/aij/mpi/pastix/pastix.c <br>
diff -r 3286696bb4a0 src/mat/impls/aij/mpi/pastix/pastix.c<br>
--- a/src/mat/impls/aij/mpi/pastix/pastix.c Tue Dec 27 11:43:50
2011 -0600<br>
+++ b/src/mat/impls/aij/mpi/pastix/pastix.c Wed Dec 28 16:05:21
2011 +0100<br>
@@ -446,16 +446,6 @@<br>
ierr = PetscMalloc((lu->n)*sizeof(PetscInt)
,&(lu->invp));CHKERRQ(ierr);<br>
}<br>
<br>
- if (isSym) {<br>
- /* On symmetric matrix, LLT */<br>
- lu->iparm[IPARM_SYM] = API_SYM_YES;<br>
- lu->iparm[IPARM_FACTORIZATION] = API_FACT_LDLT;<br>
- } else {<br>
- /* On unsymmetric matrix, LU */<br>
- lu->iparm[IPARM_SYM] = API_SYM_NO;<br>
- lu->iparm[IPARM_FACTORIZATION] = API_FACT_LU;<br>
- }<br>
-<br>
/*----------------*/<br>
if (lu->matstruc == DIFFERENT_NONZERO_PATTERN){<br>
if (!(isSeqAIJ || isSeqSBAIJ)) {<br>
@@ -529,7 +519,7 @@<br>
<br>
PetscFunctionBegin;<br>
lu->iparm[IPARM_FACTORIZATION] = API_FACT_LU;<br>
- lu->iparm[IPARM_SYM] = API_SYM_YES;<br>
+ lu->iparm[IPARM_SYM] = API_SYM_NO;<br>
lu->matstruc = DIFFERENT_NONZERO_PATTERN;<br>
F->ops->lufactornumeric = MatFactorNumeric_PaStiX;<br>
PetscFunctionReturn(0);<br>
@@ -545,7 +535,7 @@<br>
<br>
PetscFunctionBegin;<br>
lu->iparm[IPARM_FACTORIZATION] = API_FACT_LLT;<br>
- lu->iparm[IPARM_SYM] = API_SYM_NO;<br>
+ lu->iparm[IPARM_SYM] = API_SYM_YES;<br>
lu->matstruc = DIFFERENT_NONZERO_PATTERN;<br>
(F)->ops->choleskyfactornumeric = MatFactorNumeric_PaStiX;<br>
PetscFunctionReturn(0);<br>
<br>
<br>
So I guess it's patched correctly?<br>
Because I don't see much difference in output. Please find it
attached. <br>
Did I make something wrong?<br>
<br>
Regards,<br>
Alexander<br>
<br>
On 28.12.2011 15:26, Jed Brown wrote:
<blockquote
cite="mid:CAM9tzSnq7L=dWozJi7-=7wHP_WyyuHMYHL9iJwY+WBN_6KWPnA@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Wed, Dec 28, 2011 at 08:11, Alexander
Grayver <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
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>
</blockquote>
<br>
</body>
</html>