[Trilinos-Users] Segmentation fault when using setPrecOperator and user defined preconditoner

John Jomo john.jomo at tum.de
Thu Jun 8 04:16:43 EDT 2017


Hallo Mike,

thanks for the tip. Copying the r vector into a temporary vector makes 
everything work as expected.

best regards,

John.


On 08.06.2017 02:25, Heroux, Michael A wrote:
> I mean that some clients of the Epetra_Operator will pass the same pointer in for both the z an r vectors.  If z and r share space, a sweep algorithm such as Gauss-Seidel or triangular solver can be more efficient.  My guess is that your operator will need to copy the input vector r into a temporary vector.  This way, if z and r are the same vector, z will be computed correctly.
>
> I hope this helps.
>
> Mike
>
>> On Jun 6, 2017, at 5:22 PM, ga95gey at mytum.de <john.jomo at tum.de> wrote:
>>
>> Hallo Mike,
>>
>> Thanks for the reply. I, however, did not understand what you mean by the case where z and r are equal.
>>
>> I followed your advice and was able to get rid of the exception. I adapted the Epetra_Operator class by deriving from Epetra_FECRSMatrix and overwritting the ApplyInverse function. The ApplyInverse function in my new class now just calls the Epetra_FeCRSMatrix Apply() function. In this way I can assemble M^-1 and use it to compute z = M^-1 r directly, where M^-1 is stored as a lower triangular matrix.
>>
>> My modifications work perfectly for diagonal scaling but do not seem to work well for more complicated additive Schwarz preconditioners, which appear to need more iterations to converge to my prescribed tolerance than diagonal scaling. This contradict the results I get with my own serial cg Implementation. I use the Az_rhs norm to check convergence.
>>
>> Is this maybe related to the case where z and r are the same?
>>
>> Thanks for the help.
>>
>> Best regards,
>>
>> John.

-- 
John Jomo M.Sc.
Technische Universität München
Computation in Engineering
Simulation in Applied Mechanics - SAM
Arcisstraße 21
80333 München
Tel.:     0049 / 89 / 289 25064
Fax:      0049 / 89 / 289 25051
E-Mail:   john.jomo at tum.de<mailto:john.jomo at tum.de>
Internet: www.cie.bgu.tum.de<http://www.cie.bgu.tum.de/>



More information about the Trilinos-Users mailing list