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

Analabha Roy hariseldon99 at gmail.com
Sun Sep 8 11:34:19 CDT 2013


On Sep 8, 2013 8:39 PM, "Barry Smith" <bsmith at mcs.anl.gov> wrote:
>
>
> 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).

It's sparse, but will binary output be cross platform portable?

>    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/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130908/27d25a94/attachment.html>


More information about the petsc-users mailing list