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