reading matrices in the smart way

Matthew Knepley knepley at gmail.com
Fri Mar 7 18:09:47 CST 2008


On Fri, Mar 7, 2008 at 6:02 PM, Gideon Simpson <grs2103 at columbia.edu> wrote:
> Suppose I've dumped a seqaij matrix to binary, and I now want to read
>  it in and do something with it, perhaps in a distributed manner.  When
>  I execute MatLoad, I need to give it a matrix type, and I am wondering
>  what the smart thing is to do.  I'd like it to work both when I am
>  testing it serially and running it on a cluster.  Assuming I still
>  want AIJ format, should I set it to MATAIJ?  Can I feed it a command

Yes, this will just do the right thing.

>  line option to override whatever I hardcode it to?
>
>  i.e., if I code
>
>  MatLoad(viewer, MATSEQAIJ, &A);
>
>  but run the executable
>  ./ex -mattload_type mpaij
>
>  will it run as though it were with MATMPIAIJ?

Yes.

   Matt

>  -gideon
>
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener




More information about the petsc-users mailing list