[petsc-users] Questions about ASM in petsc4py
Chih-Hao Chen
chih-hao.chen2 at mail.mcgill.ca
Wed Mar 16 12:03:59 CDT 2016
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 <jed at jedbrown.org<mailto:jed at jedbrown.org>> wrote:
Chih-Hao Chen <chih-hao.chen2 at mail.mcgill.ca<mailto:chih-hao.chen2 at mail.mcgill.ca>> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160316/3dc88f13/attachment.html>
More information about the petsc-users
mailing list