[petsc-dev] error reading binary file

Mark F. Adams mark.adams at columbia.edu
Tue Jun 12 15:54:21 CDT 2012

On Jun 12, 2012, at 4:25 PM, Jed Brown wrote:

> On Tue, Jun 12, 2012 at 3:18 PM, Mark F. Adams <mark.adams at columbia.edu> wrote:
> This is the calling sequence in ex10:
>       ierr = VecCreate(PETSC_COMM_WORLD,&b);CHKERRQ(ierr);
>         ierr = VecSetFromOptions(b);CHKERRQ(ierr);
>         ierr = VecLoad(b,fd);CHKERRQ(ierr);
> I set the block size for matrices before SetFromOptions.
> How is that? You don't even know the Vec type.

How is what?  The ex10 code or "I set the block size for matrices before SetFromOptions".

This how I create matrices with blocks sizes:

  ierr = MatCreate( wcomm, &Prol ); CHKERRQ(ierr);
  ierr = MatSetSizes(Prol,nloc*bs,nLocalSelected*col_bs,PETSC_DETERMINE,PETSC_DETERMINE); 
  ierr = MatSetBlockSizes( Prol, bs, col_bs ); CHKERRQ(ierr);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120612/b51bdfc1/attachment.html>

More information about the petsc-dev mailing list