[petsc-users] default orthogonalization in gmres

Barry Smith bsmith at mcs.anl.gov
Mon Jul 15 19:45:05 CDT 2013


  Umut,

    Compare http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/impls/gmres/borthog2.c.html#KSPGMRESClassicalGramSchmidtOrthogonalization to http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/impls/gmres/borthog.c.html#KSPGMRESModifiedGramSchmidtOrthogonalization

note the first performs all the inner products and then all the axpy updates. The second performs a single inner product and update in a loop. The memory access pattern (and amount of communication needed for the inner products) is very different in the two cases.

   Barry


On Jul 15, 2013, at 5:38 PM, Umut Tabak <u.tabak at tudelft.nl> wrote:

> On 07/15/2013 11:57 PM, Jed Brown wrote:
>> 
>> It's not a factor of 2, it's a factor of k where k is the size of the
>> subspace.  Classical Gram-Schmidt needs one reduction per iteration
>> (normalization can be hidden), but modified needs k reductions.
> Dear Jed,
> 
> Could you please explain a bit more on what you mean by
> 
> + reduction
> + normalization can be hidden
> 
> On a problem that I am working on, cgs and mgs have a subtle difference. I would like to learn more about these details.
> 
> More specifically, I would like to A orthonormalize a block of vectors, say for a block size of 4, however I can not form A explicitly because then it becomes large and dense. But it can be formed by a matrix vector operation. Due this reason, cgs and mgs is a little different for me, this is the source of the discussion.
> 
> Best,
> Umut
> 
> 



More information about the petsc-users mailing list