Thank you so much! I'm going with -matload_block_size for the short term 
solution. It works!

Chun

-----Original Message-----
From: petsc-users-bounces at mcs.anl.gov 
[mailto:[email protected]] On Behalf Of Satish Balay
Sent: Tuesday, May 05, 2009 12:09 PM
To: PETSc users list
Subject: RE: AIJ and BAIJ convertion

On Tue, 5 May 2009, Hong Zhang wrote:

> 
> 
> On Tue, 5 May 2009, SUN Chun wrote:
> 
> > Thanks Hong and Satish,
> > 
> > Unfortunately I did use MatCreateMPIAIJ. It's difficult to change that part
> > of my code.
> > Plus I have matrices dumped out with AIJ format and I want to read it as
> > BAIJ. It seems that I have no option other than MatCreateMPIBAIJ then
> > MatSetBlockSize then add entries one by one...?

> You can call
> ierr = MatLoad(fd,MATBAIJ,&newbaijmat);CHKERRQ(ierr);
> and run your code with '-matload_block_size 6'.
> In this way, a new baij matrix is created with bs=6.

Also the call to MatCreateMPIAIJ() can be substituted with calls to
MatCreate(), MatSetType(MATMPIAIJ),MatSetSizes() etc..] without
changing the rest of the code..

Satish

Reply via email to