[petsc-users] Petsc HDF5. Storing matrices and adding attributes

Barry Smith bsmith at mcs.anl.gov
Sun Sep 8 10:09:54 CDT 2013


On Sep 8, 2013, at 10:00 AM, Analabha Roy <hariseldon99 at gmail.com> wrote:

> Hi all,
> 
> Firstly:
> I need to store a matrix in HDF5. I was reading through petsc manual pages and examples and only saw information for storing vectors in HDF5. Using MatView() on a HDF5 viewer doesn't work. Is it even possible? 
> 
   Is your matrix dense?  If your matrix is sparse why do you even want to store it? and if you do want to store it why do you want to use HDF5 (it won't be any faster than just using the PETSc binary format). 

   Generally people store vectors in HDF5 because they have some other tool (like a visualization package) that can read HDF5 easily. Don't think that exists for sparse matrices.

   Barry



> For now, I'm working around by extracting the columns from my Mat and storing them as vecs by looping  VecView().
> 
> 
> Secondly:
> Is there a way to add attributes to HDF5 data using the PetSc API? I didn't see any docs on this.
> 
> 
> 
> Thanks in advance,
> AR
> 
> -- 
> ---
> Analabha Roy
> C.S.I.R  Senior Research Associate
> Saha Institute of Nuclear Physics
> Section 1, Block AF
> Bidhannagar, Calcutta 700064
> India
> Emails: daneel at physics.utexas.edu, hariseldon99 at gmail.com
> Webpage: http://www.ph.utexas.edu/~daneel/



More information about the petsc-users mailing list