[petsc-users] vtk output ASCII or binary

Jed Brown jed at jedbrown.org
Thu Mar 6 18:38:57 CST 2014


Xiangdong <epscodes at gmail.com> writes:
> This works fine. However, when I add the option -da_grid_x 8, the same
> error messages pop up.

There was a memory error introduced when Barry changed PetscMPIIntCast
to be better behaved.  For equal-aspect grids, the uninitialized slot
contained the right value by accident.  Thanks.

If you are using PETSc from Git, run "git pull && make", otherwise you
can apply the patch below and rebuild.

commit 334634e2e3b3ad30f394a243f8d8200a86444220
Author: Jed Brown <jed at jedbrown.org>
Date:   Thu Mar 6 17:28:37 2014 -0700

    VecView_MPI_DA: fix gsizes bug (bad conversion in parent commit)
    
    Reported-by: Xiangdong <epscodes at gmail.com>

diff --git a/src/dm/impls/da/gr2.c b/src/dm/impls/da/gr2.c
index f726037..abb8dea 100644
--- a/src/dm/impls/da/gr2.c
+++ b/src/dm/impls/da/gr2.c
@@ -472,7 +472,7 @@ static PetscErrorCode DMDAArrayMPIIO(DM da,PetscViewer viewer,Vec xin,PetscBool
   gsizes[0]  = dof;
   ierr       = PetscMPIIntCast(dd->M,gsizes+1);CHKERRQ(ierr);
   ierr       = PetscMPIIntCast(dd->N,gsizes+2);CHKERRQ(ierr);
-  ierr       = PetscMPIIntCast(dd->P,gsizes+1);CHKERRQ(ierr);
+  ierr       = PetscMPIIntCast(dd->P,gsizes+3);CHKERRQ(ierr);
   lsizes[0]  = dof;
   ierr       = PetscMPIIntCast((dd->xe-dd->xs)/dof,lsizes+1);CHKERRQ(ierr);
   ierr       = PetscMPIIntCast(dd->ye-dd->ys,lsizes+2);CHKERRQ(ierr);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140306/0b8a42ae/attachment.pgp>


More information about the petsc-users mailing list