1. petsc
  2. PETSc
  3. petsc-3.3

Commits

Satish Balay  committed 4c843c9

[petsc-maint #141119] MatGetRowMax error for parallel runs

  • Participants
  • Parent commits 19ff02d
  • Branches default

Comments (0)

Files changed (1)

File src/mat/impls/aij/mpi/mpiaij.c

View file
 
   PetscFunctionBegin;
   ierr = PetscMalloc2(n,PetscInt,&diagIdx,n,PetscInt,&offdiagIdx);CHKERRQ(ierr);
-  ierr = VecCreateSeq(((PetscObject)A)->comm, n, &diagV);CHKERRQ(ierr);
-  ierr = VecCreateSeq(((PetscObject)A)->comm, n, &offdiagV);CHKERRQ(ierr);
+  ierr = VecCreateSeq(PETSC_COMM_SELF, n, &diagV);CHKERRQ(ierr);
+  ierr = VecCreateSeq(PETSC_COMM_SELF, n, &offdiagV);CHKERRQ(ierr);
   ierr = MatGetRowMax(mat->A, diagV,    diagIdx);CHKERRQ(ierr);
   ierr = MatGetRowMax(mat->B, offdiagV, offdiagIdx);CHKERRQ(ierr);
   ierr = VecGetArray(v,        &a);CHKERRQ(ierr);