[petsc-users] Multiple vectors read/written into one file in binary/HDF5 format

Li, Zhisong (lizs) lizs at mail.uc.edu
Thu Jun 9 17:05:33 CDT 2011


Hi, Petsc Team,


I know that we can write multiple vectors or matrices into one binary file by doing

   PetscViewerBinaryOpen(COMM, "./vector.dat", FILE_MODE_WRITE, &viewer1);
   VecView(a, viewer1);
   PetscViewerBinaryOpen(COMM, "./vector.dat", FILE_MODE_APPEND, &viewer1);
   VecView(b, viewer1);

But if we want to read from "./vector.dat" and distribute the respective values to vector a and b, how to realize that?  What I previously knew is "one file for one vector only" when reading.


Another question is about the HDF5 format.  I've included "petscsys.h" at the code header.  But when I complied (make file) the code, the error message indicated "undefined reference to PetscViewerHDF5Open".  The error also happens to the example codes for this function.  What's wrong with is?  Is it no more supported?



Thank you.



Zhisong Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110609/34b02da7/attachment.htm>


More information about the petsc-users mailing list