[petsc-users] Question about HDF5 Viewer and Datasets

Barry Smith bsmith at petsc.dev
Tue Jun 23 08:10:52 CDT 2020


   I looked at the code VecView_MPI_HDF5 and VecView_MPI_HDF5_DA  they both seem to use the timestep variable to allow putting multiple datasets into the fire. Perhaps you forgot call PetscViewerHDF5SetTimestep  for the DMDA case? Otherwise it looks like there must be a bug in VecView_MPI_HDF5_DA where it does not properly save multiple fields. You would need to step through that routine in the debugger.


  Barry

> On Jun 23, 2020, at 7:55 AM, Lucas Banting <bantingl at myumanitoba.ca> wrote:
> 
> Hello,
> 
> I am trying to use the HDF5 viewer to store the solution of my system at every iteration. 
> I am storing the solutions in order to compare two different results, one from an old sequential program and one from a new parallel program that is parallelized using the DMDA structure.
> I am using matlab to compare the results.
> 
> In the sequential program, the vector for the solution is just a simple one dimensional vector made from VecCreate. In the parallel program, the vector is made from DMCreateGlobalVector.
> 
> In both versions of the program, I create the viewer as:
> 
> call PetscViewerHDF5Open(PETSC_COMM_WORLD,"filename.hdf5",&
>                         FILE_MODE_WRITE,hdf5viewer,ierr)
> 
> When I load the files into MATLAB after words, the sequential program creates a new dataset each iteration, while the parallel version using DMCreateGlobalVector only stores a single dataset.
> Is there a way I can force both viewers to create a new dataset in the same way each time vecview is called? Or is there someway I can manually create a new dataset?
> 
> I am using Open MPI 3.1.4, Petsc 3.12.4, Intel Fortran 2019.5, and hdf5/1.10.5.
> 
> Thanks,
> 
> Lucas Banting

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200623/ec33e003/attachment.html>


More information about the petsc-users mailing list