[petsc-users] PCGASMSetLocalSubdomains

Dmitry Karpeev karpeev at mcs.anl.gov
Mon Feb 20 11:38:20 CST 2012


Okay, thanks.
I'll take a look.

Dmitry.

On Mon, Feb 20, 2012 at 11:30 AM, Hui Zhang <mike.hui.zhang at hotmail.com>wrote:

> For reference, my results are attached.
>
> asm1.txt for asm with 1 process,
> asm2.txt for asm with 2 processes,
> gasm1.txt for gasm with 1 process, (with the iteration numbers different
> from others)
> gasm2.txt for gasm with 2 processes
>
>
>
>
>
>
> thank you,
> Hui
>
> On Feb 20, 2012, at 3:06 PM, Dmitry Karpeev wrote:
>
>
>
> On Mon, Feb 20, 2012 at 12:59 AM, Hui Zhang <mike.hui.zhang at hotmail.com>wrote:
>
>>
>> On Feb 20, 2012, at 12:41 AM, Dmitry Karpeev wrote:
>>
>>
>>
>> On Sun, Feb 19, 2012 at 3:08 PM, Hui Zhang <mike.hui.zhang at hotmail.com>wrote:
>>
>>> I have a new problem: the results from ASM and GASM are different and it
>>> seems
>>> GASM has something wrong with SetModifySubMatrices. Numerical tests are
>>> with
>>> each subdomain supported only by one subdomain. There are no problems
>>> when
>>> I did not modify submatrices.  But when I modify submatrices, there are
>>> problems
>>> with GASM but no problems with ASM.
>>>
>>> For example, I use two subdomains. In the first case each subdomain is
>>> supported by
>>> one processor and there seems no problem with GASM. But when I use run
>>> my program
>>> with only one proc. so that it supports both of the two subdomains, the
>>> iteration
>>> number is different from the first case and is much larger.  On the
>>> other hand
>>> ASM has no such problem.
>>>
>>
>> Are the solutions the same?
>> What problem are you solving?
>>
>>
>> Yes, the solutions are the same. That's why ASM gives the same results
>> with one or
>> two processors. But GASM did not.
>>
> Sorry, I wasn't clear: ASM and GASM produced different solutions in the
> case of two domains per processor?
>
>> I'm solving the Helmholtz equation.  Maybe
>> I can prepare a simpler example to show this difference.
>>
> That would be helpful.
> Thanks.
>
> Dmitry.
>
>>
>>
>> Dmitry.
>>
>>>
>>>
>>> On Feb 15, 2012, at 6:46 PM, Dmitry Karpeev wrote:
>>>
>>> You should be able to.
>>> This behavior is the same as in PCASM,
>>> except in GASM the matrices live on subcommunicators.
>>> I am in transit right now, but I can take a closer look in Friday.
>>>
>>> Dmitry
>>>
>>>
>>>
>>> On Feb 15, 2012, at 8:07, Hui Zhang <mike.hui.zhang at hotmail.com> wrote:
>>>
>>> On Feb 15, 2012, at 11:19 AM, Hui Zhang wrote:
>>>
>>> Hi Dmitry,
>>>
>>> thanks a lot! Currently, I'm not using ISColoring. Just comes another
>>> question
>>> on PCGASMSetModifySubMatrices(). The user provided function has the
>>> prototype
>>>
>>> func (PC pc,PetscInt nsub,IS *row,IS *col,Mat *submat,void *ctx);
>>>
>>> I think the coloumns from the parameter 'col' are always the same as
>>> the rows
>>> from the parameter 'row'. Because PCGASMSetLocalSubdomains() only
>>> accepts
>>> index sets but not rows and columns. Has I misunderstood something?
>>>
>>>
>>> As I tested, the row and col are always the same.
>>>
>>> I have a new question. Am I allowed to SetLocalToGlobalMapping() for the
>>> submat's
>>> in the above func()?
>>>
>>> thanks,
>>> Hui
>>>
>>>
>>> thanks,
>>> Hui
>>>
>>>
>>> On Feb 11, 2012, at 3:36 PM, Dmitry Karpeev wrote:
>>>
>>> Yes, that's right.
>>> There is no good way to help the user assemble the subdomains at the
>>> moment beyond the 2D stuff.
>>> It is expected that they are generated from mesh subdomains.
>>> Each IS does carry the subdomains subcomm.
>>>
>>> There is ISColoringToList() that is supposed to convert a "coloring" of
>>> indices to an array of ISs,
>>> each having the indices with the same color and the subcomm that
>>> supports that color. It is
>>> largely untested, though.  You could try using it and give us feedback
>>> on any problems you encounter.
>>>
>>> Dmitry.
>>>
>>>
>>> On Sat, Feb 11, 2012 at 6:06 AM, Hui Zhang <<mike.hui.zhang at hotmail.com>
>>> mike.hui.zhang at hotmail.com> wrote:
>>>
>>>> About PCGASMSetLocalSubdomains(), in the case of one subdomain
>>>> supported by
>>>> multiple processors, shall I always create the arguments 'is[s]' and
>>>> 'is_local[s]'
>>>> in a subcommunicator consisting of processors supporting the subdomain
>>>> 's'?
>>>>
>>>> The source code of PCGASMCreateSubdomains2D() seemingly does so.
>>>>
>>>> Thanks,
>>>> Hui
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120220/a1a9b1be/attachment.htm>


More information about the petsc-users mailing list