[petsc-dev] PCApplyTranspose in BiCG

Alexander Grayver agrayver at gfz-potsdam.de
Wed Apr 18 09:51:06 CDT 2012


Are there other methods affected by that?
Now it seems to be not easy to say whether solver just doesn't converge 
or it's wrong because of that issue.

On 18.04.2012 15:26, Barry Smith wrote:
> On Apr 18, 2012, at 7:55 AM, Alexander Grayver wrote:
>
>>>> Jed,
>>>>
>>>> Thank you.
>>>> TFQMR works well now, however TCQMR doesn't. Although latter was working before I updated petsc-dev. Might be same issue?
>>>     Please clarify. When was TCQMR working and when did it stop working? Was TCQMR working before you just updated in the last 24 hours?  Did TCQMR work a long time ago (like TFQMR worked a long time ago?)?
>> Barry, that looks weird, but seems to be true:
>>
>> HG revision: a4dae06b4d05ef5b78a9a9aa2cbc31b2b158834f HG Date: Wed Feb 08 11:29:52 2012 -0600 --- TFQMR works, TCQMR does not
>> HG revision: 59ca71b85d784abbe22f12c34ffcb2ccc6dc68b0 HG Date: Tue Mar 20 01:05:13 2012 -0500 --- TFQMR does not work, TCQMR works
>> HG revision: 8f37c498b7b419ef0db5fb335a07c874e6dfe6d9 HG Date: Tue Apr 17 21:06:44 2012 -0500 --- TFQMR works, TCQMR does not
>>
>     Not weird at all, makes perfect sense.  Some inner products in TCQMR must be coded "backwards" (that is with the two vector arguments flipped) from what PETSc expects. When we accidently flipped the roles of the two arguments that triggered TCQMR to start working.  There are three inner products in TCQMR
>
>      ierr   = VecDot(v0,y,&dp11);CHKERRQ(ierr);
>      ierr   = VecDot(v0,u,&dp2);CHKERRQ(ierr);
>      alpha  = dp11 / dp2;                          /* alpha = v0'*y/v0'*u */
>      deltmp = alpha;
>      ierr   = VecCopy(y,z);CHKERRQ(ierr);
>      ierr   = VecAXPY(z,-alpha,u);CHKERRQ(ierr); /* z = y - alpha u */
>      ierr   = VecDot(v0,u,&rho);CHKERRQ(ierr);
>
> hence 8 possible combinations of orders for the vector arguments to the three calls. Now one could try to understand the algorithm for complex numbers to determine the correct orderings or one could simply try them :-)
>
>
>      Barry
>
>
>> Alexander
>>
>>>      Barry


-- 
Regards,
Alexander




More information about the petsc-dev mailing list