[petsc-users] sources of floating point randomness in JFNK in serial

Barry Smith bsmith at petsc.dev
Wed May 3 22:05:05 CDT 2023


  Do they start very similarly and then slowly drift further apart? That is the first couple of KSP iterations they are almost identical but then for each iteration get a bit further. Similar for the SNES iterations, starting close and then for more iterations and more solves they start moving apart. Or do they suddenly jump to be very different? You can run with -snes_monitor -ksp_monitor 

> On May 3, 2023, at 9:07 PM, Mark Lohry <mlohry at gmail.com> wrote:
> 
> This is on a single MPI rank. I haven't checked the coloring, was just guessing there. But the solutions/residuals are slightly different from run to run.
> 
> Fair to say that for serial JFNK/asm ilu0/gmres we should expect bitwise identical results?
> 
> 
> On Wed, May 3, 2023, 8:50 PM Barry Smith <bsmith at petsc.dev <mailto:bsmith at petsc.dev>> wrote:
>> 
>>   No, the coloring should be identical every time. Do you see differences with 1 MPI rank? (Or much smaller ones?).
>> 
>> 
>> 
>> > On May 3, 2023, at 8:42 PM, Mark Lohry <mlohry at gmail.com <mailto:mlohry at gmail.com>> wrote:
>> > 
>> > I'm running multiple iterations of newtonls with an MFFD/JFNK nonlinear solver where I give it the sparsity. PC asm, KSP gmres, with SNESSetLagJacobian -2 (compute once and then frozen jacobian).
>> > 
>> > I'm seeing slight (<1%) but nonzero differences in residuals from run to run. I'm wondering where randomness might enter here -- does the jacobian coloring use a random seed?
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230503/9f274c28/attachment.html>


More information about the petsc-users mailing list