Matrix convergence.
Barry Smith
bsmith at mcs.anl.gov
Fri Mar 3 13:41:19 CST 2006
Add the additional option -pc_type asm
On Fri, 3 Mar 2006, billy at dem.uminho.pt wrote:
>
> It has improved but the residual is still over the tolerance I want, which is 1E-6.
>
> Number of iterations: 500 Residual: +5.450688E-04
>
> Billy.
>
>
> Quoting Barry Smith <bsmith at mcs.anl.gov>:
>
>>
>> You did not type it right -sub_pc_type lu not -pc_type lu
>>
>>
>> On Fri, 3 Mar 2006, billy at dem.uminho.pt wrote:
>>
>>>
>>> This is what I get:
>>>
>>> [0]PETSC ERROR: MatLUFactorSymbolic() line 2159 in
>> src/mat/interface/matrix.c
>>> [0]PETSC ERROR: No support for this operation for this object type!
>>> [0]PETSC ERROR: Matrix type mpiaij symbolic LU!
>>> [0]PETSC ERROR: PCSetUp_LU() line 252 in src/ksp/pc/impls/factor/lu/lu.c
>>> [0]PETSC ERROR: PCSetUp() line 798 in src/ksp/pc/interface/precon.c
>>> [0]PETSC ERROR: KSPSetUp() line 234 in src/ksp/ksp/interface/itfunc.c
>>> [0]PETSC ERROR: KSPSolve() line 334 in src/ksp/ksp/interface/itfunc.c
>>>
>>>
>>> Quoting Barry Smith <bsmith at mcs.anl.gov>:
>>>
>>>>
>>>> Run the parallel PETSc job with -ksp_type gmres -ksp_gmres_restart
>> 200
>>>> -sub_pc_type lu
>>>>
>>>>
>>>> On Fri, 3 Mar 2006, billy at dem.uminho.pt wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I tried to solve the 18x18 matrix with laspack and the results are the
>>>> following:
>>>>>
>>>>> Solver: GMRES, Preconditioning: NULL, Iterations: 500, Residual:
>> 6.16E-2
>>>>> Solver: GMRES, Preconditioning: SSOR, Iterations: 500, Residual:
>> 6.57E-2
>>>>> Solver: GMRES, Preconditioning: ILU, ERROR
>>>>>
>>>>> Solver: BiCGSTAB, Preconditioning: NULL, Iterations: 101, Residual:
>>>> 8.88E-7
>>>>> Solver: BiCGSTAB, Preconditioning: SSOR, Iterations: 36, Residual:
>>>> 9.87E-7
>>>>> Solver: BiCGSTAB, Preconditioning: ILU, ERROR
>>>>>
>>>>>
>>>>> Billy.
>>>>>
>>>>>
>>>>> Quoting Barry Smith <bsmith at mcs.anl.gov>:
>>>>>
>>>>>>
>>>>>> Billy,
>>>>>>
>>>>>> Most likely there is something wrong with the matrix being
>>>>>> generated. I would first look at the matrix entries and make
>>>>>> sure they make sense. Then I would solve the linear systems
>>>>>> with a direct solver -pc_type lu (on one processor and make
>>>>>> sure the solutions are reasonable and your simulation has
>>>>>> "correct" answers).
>>>>>>
>>>>>> It is possible the parallel matrix generation is wrong,
>>>>>>
>>>>>> Barry
>>>>>>
>>>>>>
>>>>>> On Thu, 2 Mar 2006, billy at dem.uminho.pt wrote:
>>>>>>
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>
>>>>>>> I have been testing my parallel implementation with a 2D case. I have
>>>> used
>>>>>> the
>>>>>>> following grids with 2 and 4 processes: 4x4, 10x10, 16x16 and 18x18.
>>>>>>>
>>>>>>> It works for the first three (max. number of iterations to converge
>>>> aprox.
>>>>>> 70)
>>>>>>> but when I increase to 18x18 the matrix does not converge. I have
>>>> increased
>>>>>> the
>>>>>>> maximum number of iterations and I have used GMRES, BiCGSTAB with
>>>>>>> preconditioners ASM, JACOBI, etc.
>>>>>>>
>>>>>>> With KSPType = GMRES and PCType = ASM:
>>>>>>> Number of iterations: 500 Residual: +1.420471E-01
>>>>>>>
>>>>>>> With KSPType = GMRES and PCType = JACOBI:
>>>>>>> Number of iterations: 500 Residual: +2.351882E-02
>>>>>>>
>>>>>>> With KSPType = BCGS and PCType = ASM:
>>>>>>> Number of iterations: 136 Residual: +3.911446E+04
>>>>>>>
>>>>>>> With KSPType = BCGS and PCType = NULL:
>>>>>>> Number of iterations: 157 Residual: +3.254728E+03
>>>>>>>
>>>>>>> Is it normal that the convergence detiorates so much with such a
>> slight
>>>>>> increase
>>>>>>> in the dimension of the matrix? Is there any optimization parameter
>> that
>>>> I
>>>>>> may
>>>>>>> be missing?
>>>>>>>
>>>>>>>
>>>>>>> Billy.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
>
More information about the petsc-users
mailing list