[petsc-users] Persistence of sparse matrices.

Don Pellegrino don at drexel.edu
Mon Jan 25 17:40:05 CST 2010

On Mon, Jan 25, 2010 at 12:25 PM, Matthew Knepley <knepley at gmail.com> wrote:
> I think you want to Viewer technology.

Thanks for pointing me at the PetscViewer functions.  I wrote a quick
test case to write a sparse matrix to an HDF5 file
 Unfortunately I receive the following run-time error:

[0]PETSC ERROR: --------------------- Error Message
[0]PETSC ERROR: No support for this operation for this object type!
[0]PETSC ERROR: Viewer type hdf5 not supported by SeqAIJ matrices!
[0]PETSC ERROR: Petsc Release Version 3.0.0, Patch 10, Tue Nov 24
16:38:09 CST 2009
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR: ./updator on a linux-gnu named coffee by don Mon Jan
25 18:28:31 2010
[0]PETSC ERROR: Libraries linked from
[0]PETSC ERROR: Configure run at Mon Jan 25 17:57:35 2010
[0]PETSC ERROR: Configure options --with-hdf5=1 --with-hdf5-dir=/usr
[0]PETSC ERROR: MatView_SeqAIJ() line 625 in src/mat/impls/aij/seq/aij.c
[0]PETSC ERROR: MatView() line 643 in src/mat/interface/matrix.c

So it seems that writing sparse matrices to HDF5 is not yet
implemented.  I suppose such an implementation should be possible.
For now I'll try a binary viewer as suggested by Barry Smith.

If I were to implement the writer using HDF5 where should I start in
the PETSc source?

More information about the petsc-users mailing list