[petsc-users] Advice Being Sought
Mark F. Adams
mark.adams at columbia.edu
Fri May 3 20:01:09 CDT 2013
Also, another thing to try that should work even with older PETSc versions is:
-mg_levels_ksp_chebyshev_estimate_eigenvalues 0,0.05,0,1.5
The last argument (1.5) is the largest eigenvalue safety factor (1.05 is the default). I would bet that increasing this will keep the code stable for longer. But the most robust thing to do is redo the PC every solve as I mentioned before.
Mark
On May 3, 2013, at 5:35 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> Mark,
>
> Are you going to try this out?
>
> Thanks
>
> Barry
>
> On May 3, 2013, at 9:16 AM, David Scott <d.scott at ed.ac.uk> wrote:
>
>> Barry,
>>
>> On 23/04/2013 02:36, Barry Smith wrote:
>>>
>>> On Apr 22, 2013, at 11:26 AM, David Scott <d.scott at ed.ac.uk> wrote:
>>>
>>>> Thanks for the suggestion.
>>>>
>>>> I had tried '-pc_type gamg -pc_gamg_agg_nsmooths 1' with an earlier version of the code without success. I have tried it again but I get NaN's after only 90 time steps whereas with block Jacobi it runs quite happily for 36,000 time steps and produces physically sensible results.
>>>
>>> David,
>>>
>>> We would be very interested in determining what is "going wrong" with the solver here since we hope to make it robust. Would it be possible for you to use a MatView() and VecView() on the matrix and the right hand side with a binary viewer when it "goes bad" and send us the resulting file?
>>>
>>> Barry
>>>
>>> We'd run the gamg solver on your matrix and track down what is happening.
>>>
>>>
>>
>> I have inserted
>> call PetscViewerBinaryOpen(PETSC_COMM_WORLD, 'DifficultSystem', &
>> FILE_MODE_WRITE, viewer, ierr)
>> call KSPGetOperators(ksp, A, PETSC_NULL_OBJECT, &
>> PETSC_NULL_INTEGER, ierr)
>> call MatView(A, viewer, ierr)
>> call KSPGetRhs(ksp, b, ierr)
>> call VecView(b, viewer, ierr)
>> call PetscViewerDestroy(viewer, ierr)
>> in my code after KSPSolve.
>>
>> You may download the result for the 29th time step from
>> http://www2.epcc.ed.ac.uk/~dscott6/
>>
>> I can generate data for other time steps if necessary.
>>
>> David
>> --
>> Dr. D. M. Scott
>> Applications Consultant
>> Edinburgh Parallel Computing Centre
>> Tel. 0131 650 5921
>>
>> The University of Edinburgh is a charitable body, registered in
>> Scotland, with registration number SC005336.
>
>
More information about the petsc-users
mailing list