On Wed, Jun 9, 2010 at 12:02 AM, Andreas Hauffe <span dir="ltr">&lt;<a href="mailto:andreas.hauffe@tu-dresden.de">andreas.hauffe@tu-dresden.de</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I tried to find out if the matrix gets corrupted in the multiple process case.<br>
So I wrote both matrices (single/multiple process) to an ASCII file. Both<br>
files contained the same matrix. The diff command printed no difference.<br>
<br>
I use a MPISBAIJ matrix. So I think it is impossible to create an unsymmetric<br>
matrix. Is this right?<br></blockquote><div><br></div><div>Write the matrix as a PETSc binary and send it to <a href="mailto:petsc-maint@mcs.anl.gov">petsc-maint@mcs.anl.gov</a>.</div><div><br></div><div>   Thanks,</div>
<div><br></div><div>      Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Andreas<br>
<br>
Am Dienstag 08 Juni 2010 17:59:01 schrieb Matthew Knepley:<br>
<div><div></div><div class="h5">&gt; On Tue, Jun 8, 2010 at 12:33 AM, Andreas Hauffe &lt;<br>
&gt;<br>
&gt; <a href="mailto:andreas.hauffe@tu-dresden.de">andreas.hauffe@tu-dresden.de</a>&gt; wrote:<br>
&gt; &gt; Dear all,<br>
&gt; &gt;<br>
&gt; &gt; I want to solve a linear System with a symmetric positive definite<br>
&gt; &gt; matrix. I<br>
&gt; &gt; use the external package MUMPS as solver with the following commands<br>
&gt; &gt;<br>
&gt; &gt;  call KSPCreate(PETSC_COMM_WORLD,ksp,ierr)<br>
&gt; &gt;  call KSPSetOperators(ksp,mat,mat,DIFFERENT_NONZERO_PATTERN,ierr)<br>
&gt; &gt;  call KSPSetType(ksp,KSPPREONLY,ierr)<br>
&gt; &gt;  call KSPGetPC(ksp,prec,ierr)<br>
&gt; &gt;  call PCSetType(prec,PCCHOLESKY,ierr)<br>
&gt; &gt;  call PCFactorSetMatSolverPackage(prec,MAT_SOLVER_MUMPS,ierr)<br>
&gt; &gt;  call KSPSetFromOptions(ksp,ierr)<br>
&gt; &gt;  call KSPSolve(ksp,vec1,vec2,ierr)<br>
&gt; &gt;<br>
&gt; &gt; and give the option &quot;-mat_mumps_sym 1&quot; (symmetric positive definite).<br>
&gt; &gt;<br>
&gt; &gt; If I run the program with one MPI-process everything works fine. For a<br>
&gt; &gt; low number of unknows it also works for more MPI-processes. If I increase<br>
&gt; &gt; the number of unknows (&gt;50000) and use more then one MPI-process on one<br>
&gt; &gt; or more host, I get a MUMPS error that the matrix is singular. With one<br>
&gt; &gt; MPI-process everything is still fine. The critical value for the number<br>
&gt; &gt; of unknows depends also on the use of the debug-version or<br>
&gt; &gt; non-debug-version of PETSc. If I do not use the option &quot;-mat_mumps_sym 1&quot;<br>
&gt; &gt; everything also works.<br>
&gt;<br>
&gt; It sounds like your matrix is not actually symmetric on multiple processes:<br>
&gt;<br>
&gt; <a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpa" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpa</a><br>
&gt;ges/Mat/MatIsSymmetric.html<br>
&gt;<br>
&gt;     Matt<br>
&gt;<br>
&gt; &gt; Right now the finite element assembling process (MatSetValue) is only<br>
&gt; &gt; done with rank 0. So the hole matrix gets all its values only from rank<br>
&gt; &gt; 0.<br>
&gt; &gt;<br>
&gt; &gt; Could someone explain this behaviour? Where is my error?<br>
&gt; &gt;<br>
&gt; &gt; Btw, I am currently using PETSc 3.0 since I work with SLEPc as well.<br>
&gt; &gt;<br>
&gt; &gt; Thank you very much,<br>
&gt; &gt; --<br>
&gt; &gt; Andreas Hauffe<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; -------------------------------------------------------------------------<br>
&gt; &gt;--------------------------- Technische Universität Dresden<br>
&gt; &gt; Institut für Luft- und Raumfahrttechnik / Institute of Aerospace<br>
&gt; &gt; Engineering<br>
&gt; &gt; Lehrstuhl für Luftfahrzeugtechnik / Chair of Aircraft Engineering<br>
&gt; &gt;<br>
&gt; &gt; D-01062 Dresden<br>
&gt; &gt; Germany<br>
&gt; &gt;<br>
&gt; &gt; phone   : (++49)351 463 38496<br>
&gt; &gt; fax     : (++49)351 463 37263<br>
&gt; &gt; mail    : <a href="mailto:andreas.hauffe@tu-dresden.de">andreas.hauffe@tu-dresden.de</a><br>
&gt; &gt; Website : <a href="http://tu-dresden.de/mw/ilr/lft" target="_blank">http://tu-dresden.de/mw/ilr/lft</a><br>
&gt; &gt;<br>
&gt; &gt; -------------------------------------------------------------------------<br>
&gt; &gt;---------------------------<br>
<br>
<br>
<br>
--<br>
Andreas Hauffe<br>
<br>
----------------------------------------------------------------------------------------------------<br>
Technische Universität Dresden<br>
Institut für Luft- und Raumfahrttechnik / Institute of Aerospace Engineering<br>
Lehrstuhl für Luftfahrzeugtechnik / Chair of Aircraft Engineering<br>
<br>
D-01062 Dresden<br>
Germany<br>
<br>
phone   : (++49)351 463 38496<br>
fax     : (++49)351 463 37263<br>
mail    : <a href="mailto:andreas.hauffe@tu-dresden.de">andreas.hauffe@tu-dresden.de</a><br>
Website : <a href="http://tu-dresden.de/mw/ilr/lft" target="_blank">http://tu-dresden.de/mw/ilr/lft</a><br>
----------------------------------------------------------------------------------------------------<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>