[petsc-users] Questions about ASM in petsc4py

Chih-Hao Chen chih-hao.chen2 at mail.mcgill.ca
Wed Mar 16 12:30:39 CDT 2016


Hello Jed,


Thanks very much, and you are correct.
I will check the related material you suggested.
Cheers.


Best,
Chih-Hao
> On Mar 16, 2016, at 1:15 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Chih-Hao Chen <chih-hao.chen2 at mail.mcgill.ca> writes:
> 
>> Hello Jed,
>> 
>> 
>> Thanks for the information.
>> In ex8.c about ASM example,
>> we can use “FOR” loop to get the subKsp from each domain with :
>> ierr = PCASMGetSubKSP(kspPc, &nlocal, &first, &subksp)
>> where subksp can be accessed through its index like subksp[i].
>> 
>> Do yo mean if I run two subdomains with two processors successfully,
>> then I would be able to use subksp[1] to get 2nd subKsp from the 2nd processor?
>> Am I correct?
> 
> It sounds like you are not familiar with how distributed memory/MPI
> works.  Each process has a separate address space, so there is no way
> that rank 0 can have a serial object that lives on rank 1.  It would be
> well worth your time to check out the tutorials or other MPI resources
> to get the hang of thinking in distributed memory.



More information about the petsc-users mailing list