[petsc-dev] use of random numbers in GAMG
Mark Adams
mfadams at lbl.gov
Mon Aug 10 14:35:38 CDT 2015
We have three problems here (at least).
1) I use PETSc's random vectors to compute an eigen estimate.
2) I use srand() to mix up the graph ordering for the MIS.
I could write a hash function like thing that takes the global ID and
generates a (bad) random number. These random number do not have to be
high quality so this should be fine. This should fix these two problems.
The convergence rates will still vary with different number of processors
but it should otherwise be determinant.
3) And a related problem, we do not reuse the eignenestimages in Cheby that
I campute.
Maybe I'm missing something, but we seemed to have lost this when we moved
the eigen estimator for Cheby out of GAMG. Can we attach the eigen
estimates is some universally defined way, have everyone that computes
eigen estimates (of the diagonally preconditioned operator) attach it, and
have Cheby check for it?
Mark
On Sat, Aug 8, 2015 at 4:40 PM, Andrs, David <david.andrs at inl.gov> wrote:
> On Sat, Aug 8, 2015 at 2:29 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>
>> Mark,
>>
>> So GAMG uses random numbers in the implementation, this means
>> identical runs on machines with different random number generates can
>> produce noticeable different convergence histories. This means that the "no
>> change" tests in the nightly tests indicate change (i.e. a problem) when
>> this perhaps not a problem. So it is impossible to trust the results of the
>> tests.
>>
>> Is there anything we can do to alleviate this problem? Are the random
>> number usage fundamental to the algorithm? Should we distribute with PETSc
>> a "random number generator" that will generate the same results on all
>> systems (if that is even possible?)?
>>
>
> We had a similar problem in MOOSE where tests using RNG were returning
> slightly different results. We ended up using mtwist
> <http://www.cs.hmc.edu/~geoff/mtwist.html>, however, the author now
> recommends to use PCG <http://www.pcg-random.org>.
>
> Hope that helps,
> --
> David
>
>
>
>>
>> Thanks
>>
>> Barry
>>
>>
>> Note that on the same machine if you run the same program twice with our
>> default system provided "random number generator" you will get the same
>> result, this is an issue with running on different kinds of machines and
>> getting different results.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150810/53598295/attachment.html>
More information about the petsc-dev
mailing list