[petsc-dev] petsc-dev: ASM with sbaij matrix and block size=1 broken?
Matthew Knepley
knepley at gmail.com
Sun Nov 6 14:45:43 CST 2011
On Sat, Nov 5, 2011 at 5:44 PM, Brad Aagaard <baagaard at usgs.gov> wrote:
> On 11/5/11 10:25 AM, Jed Brown wrote:
>
>> On Sat, Nov 5, 2011 at 11:13, Brad Aagaard <baagaard at usgs.gov
>> <mailto:baagaard at usgs.gov>> wrote:
>>
>> The error is in our inner solve (associated with computing the
>> adjustment to the solution based on the friction criterion) for
>> cases where not all processors have points on the fault. On
>> processors without points on the fault the block size is -1 and the
>> local size is 0. For processors with points on the fault, the block
>> size is 3.
>>
>>
>> How is this happening? MatSetBlockSize_MPISBAIJ raises an error if you
>> try to change the block size. Are you messing with the PetscLayout
>> directly or something?
>>
>>
>> I tried altering DMMeshCreateMatrix so that it uses a block size of
>> 1 if bs==-1, but I still get the error. Does the block size need to
>> be consistent across all processors, even those a local size of 0?
>> Alternatively, is the local size of 0 causing problems?
>>
>>
>> Yes, bs must be the same.
>>
>> Since bs must be set for PetscLayoutSetUp() to succeed, the fact that
>> you have bs=-1 means that function wasn't called. It could be memory
>> corruption or it could be some manual fiddling with the PetscLayout.
>> Somehow, you have bypassed several guards in the code that are supposed
>> to cause errors with invalid input like this.
>>
>> The local size of 0 should not cause a problem.
>>
>
> It looks like Matt is calling Sieve layout stuff in DMMeshCreateMatrix().
> I don't see any calls to MatSetBlockSize.
This is now fixed.
Problem: MatSetBlocksize() would check that blocksize was identical over
all processes, but the blocksize passed
into Mat***SetPreallocation() was not checked.
Soluion: Put the check into the preallocation functions.
Matt
>
> Brad
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111106/80008985/attachment.html>
More information about the petsc-dev
mailing list