Thanks, I applied the patch and it now works perfectly. Best,
Gianluca On Wed, Jul 15, 2015 at 4:44 PM, Barry Smith <[email protected]> wrote: > > Thanks for reporting this. > > Yikes, this is a bug that crept in with the addition of the dim2 option > that was added. I have fixed this in the maint, master, and next branches > and here is the patch > > --- a/src/vec/vec/impls/mpi/pdvec.c > +++ b/src/vec/vec/impls/mpi/pdvec.c > @@ -736,7 +736,7 @@ PetscErrorCode VecView_MPI_HDF5(Vec xin, PetscViewer > viewer) > } > ierr = PetscHDF5IntCast(xin->map->n/bs,count + dim);CHKERRQ(ierr); > ++dim; > - if (bs >= 1 || dim2) { > + if (bs > 1 || dim2) { > count[dim] = bs; > ++dim; > } > @@ -760,7 +760,7 @@ PetscErrorCode VecView_MPI_HDF5(Vec xin, PetscViewer > viewer) > } > ierr = PetscHDF5IntCast(low/bs,offset + dim);CHKERRQ(ierr); > ++dim; > - if (bs >= 1 || dim2) { > + if (bs > 1 || dim2) { > offset[dim] = 0; > ++dim; > } > > > > > On Jul 15, 2015, at 1:25 PM, Gianluca Meneghello <[email protected]> > wrote: > > > > Dear all, > > > > I would like to write a complex Vec to an HDF5 viewer, but I receive an > error. > > > > Is it possible to write complex numbers to an HDF5 viewer? > > > > The error is reproducible on my computer by running > src/vec/vec/examples/tutorials/ex10.c when compiled with > --with-scalar-type=complex (and --download-hdf5 if that is important). I > attach the output of ./ex10 -hdf5. > > > > Thanks for your help, > > > > Gianluca > > > > > > <ex10.log> > >
