From: heister Date: Tue, 5 Feb 2013 16:47:49 +0000 (+0000) Subject: use the real communicator in PetscSparseMatrix as returned from PETSc X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21910bb6575f5710de982c1141a40493c0ca6678;p=dealii-svn.git use the real communicator in PetscSparseMatrix as returned from PETSc git-svn-id: https://svn.dealii.org/trunk@28236 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/lac/petsc_sparse_matrix.cc b/deal.II/source/lac/petsc_sparse_matrix.cc index a24996c1ee..53b734e816 100644 --- a/deal.II/source/lac/petsc_sparse_matrix.cc +++ b/deal.II/source/lac/petsc_sparse_matrix.cc @@ -139,8 +139,9 @@ namespace PETScWrappers const MPI_Comm & SparseMatrix::get_mpi_communicator () const { - static const MPI_Comm communicator = MPI_COMM_SELF; - return communicator; + static MPI_Comm comm; + PetscObjectGetComm((PetscObject)matrix, &comm); + return comm; }