[petsc-users] Input and output distributions of vectors for PCShellSetApply 'apply' routine

Barry Smith bsmith at mcs.anl.gov
Mon Mar 7 11:32:40 CST 2011


On Mar 6, 2011, at 11:03 PM, Jack Poulson wrote:

> Sorry to hit the list so quickly again, but the PCShellSetApply documentation doesn't say anything about how the 'xin' and 'xout' vectors will be distributed, or if it's up to the user to determine it. 
> 
> Given that a distributed Mat implies a right and left vector distribution, I would assume that the 'xin' should be distributed like the 'left' vector distribution for a left preconditioner. 
> 
> Is it up to the application routine to determine the 'xout' vector distribution? If so, is there a performance penalty for making it something other than the 'right' vector distribution implied by the matrix registered with the KSP? If not, what distribution does it need to be?

    The PCShell doesn't determine the vector layouts at all. That is determined by the KSP that is using the PC. So basically your PC should handle any distribution; if your PCShell can only handle certain distributions then you need to make sure that the Vecs and Mats you provide to KSP or SNES (or TS) match what the PCShell needs.

   Barry

> 
> Jack



More information about the petsc-users mailing list