[petsc-dev] Examples broken
Satish Balay
balay at mcs.anl.gov
Wed Feb 15 10:01:42 CST 2012
On Wed, 15 Feb 2012, Barry Smith wrote:
>
> On Feb 15, 2012, at 9:28 AM, Jose E. Roman wrote:
>
> > With the latest petsc-dev I get the following error in many examples (e.g. src/ksp/ksp/examples/tutorials/ex12.c ):
> >
> > [0]PETSC ERROR: Object is in wrong state!
> > [0]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatGetOwnershipRange()!
> >
> > I guess the idea is to add MatSetUp() in all examples? Or will this error be removed eventually?
>
> It looks like you need to as the message says either do the preallocation or call MatSetUp(). The problem is that delaying the setup may mean that it tries to do it in MatSetValues() which is not collective so one may get a hang. Previously MatGetOwnershipRange() was sometimes a collective on the first call (if no preallocation or setup was done), now it is never a collective.
>
The breakage is in petsc examples.
I fixed some [haven't pushed yet]. Will try to fix as many as I can find - and push today..
Satish
More information about the petsc-dev
mailing list