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?
Thanks very much.


Best,
Chih-Hao



On Mar 16, 2016, at 12:47 PM, Jed Brown 
<[email protected]<mailto:[email protected]>> wrote:

Chih-Hao Chen 
<[email protected]<mailto:[email protected]>> writes:

Hello Matt,


Thanks for the information.
After using -log_summary to print out for both cases, I found both of 
them(openMpi and Mvapich2) give same performance.

On the other hand, I still cannot get clear ideas how to get the returned 
subKsps by the function of  getASMSubKSP.
It seems the return subKsp are saved in a list of KSP objects.
So I used :

subksp = pc.getASMSubKsp()
subksp[0].setType(‘richardson')
subksp[1].setType(‘richardson’)

with 2 processors.
But it showed "list index out of range”.

If you do ASM with one subdomain per process, then of course only
subksp[0] is valid.  ASM can also be run with multiple subdomains per
process, it just isn't the default.

As you said on each rank, I can get the local KSPs.
Would you mind telling me how to get them?

You got them.

Reply via email to