[petsc-users] How to write and load a SEQSBAIJ matrix?

Jed Brown jed at 59A2.org
Mon Mar 1 06:07:30 CST 2010


On Mon, 1 Mar 2010 12:21:59 +0100, "Zhifeng Sheng - EWI" <Z.Sheng at tudelft.nl> wrote:
> Dear all
> 
> I am trying to generate a system and save it for later usage...

Just a word of caution: consider providing the function that assembles
the system instead of writing it to a file since this is much faster and
more scalable than writing it to disk.

> but when comes to symmetric SEQSBAIJ matrix, they do work. It seems that MatView does not put any information into the *.info file..

Actually, MatView for SBAIJ just writes the matrix in AIJ format, you
can load it into whatever format you want.  You can specify the format
you want to use in the parameter to MatLoad, or with -matload_type.
Unfortunately, the block size can only be set with the option
-matload_block_size (you cannot set a prefix for this option).  (This
poor interface would be fixed by MatLoadIntoMatrix, but that code has
yet to be written.)

If this does not work for you, you can try to reproduce the loading
problem with src/ksp/ksp/examples/tutorials/ex10.c.

Jed


More information about the petsc-users mailing list