[petsc-users] Persistence of sparse matrices.

Barry Smith bsmith at mcs.anl.gov
Mon Jan 25 11:27:39 CST 2010


   You can use MatView() with a PETSc binary viewer and MatLoad() to  
get it back in. This is pretty efficient for sequential matrices and  
works ok for parallel matrices with a few processors.  If it becomes a  
bottleneck (which is unlikely) the sequential view/load can likely be  
improved a bit more.


    Barry

On Jan 25, 2010, at 11:23 AM, Don Pellegrino wrote:

> I would like to create a persistent sparse matrix.  PETSc's
> MatCreateSeqAIJ appears to be a useful way to instantiate a sparse
> matrix structure in memory
> [http://cluster.ischool.drexel.edu/~st96wym4/flumap/cgit/cgit.cgi/exp007/tree/src/assign/assign_blast_scores.c?id=72edf83cbac32ea26f056ae85373ad7179707333 
> ].
> I would like to be able to write the structure out to disk and reload
> it during later runs so that I can grow it incrementally.  My project
> makes use of HDF5 and that seems to be a feasible technology for
> saving and loading the matrix.  Are routines for saving and loading a
> sparse matrix already available or would I need to write my own?



More information about the petsc-users mailing list