[petsc-dev] strangness in Chebyshev estimate of eigenvalues

Matthew Knepley knepley at gmail.com
Tue May 17 14:31:23 CDT 2016


On Tue, May 17, 2016 at 2:27 PM, Mark Adams <mfadams at lbl.gov> wrote:

> Other than set userandom = PETSC_TRUE, should I do anything else?
>
> I see:
>
> ierr = VecSetRandom(B,cheb->random);CHKERRQ(ierr);
>
> Should I use a special one or change this default to the special one?
>

I think Jed means this:

  Make a special implementation of PetscRandom. The VecSetRandom() function
will
  assign to each row

    v(r) = hash(r)

Then you should be able to use the random eig_est with -petscrandom_type
hashrand

     Matt


> On Tue, May 17, 2016 at 3:19 PM, Matthew Knepley <knepley at gmail.com>
> wrote:
>
>> On Tue, May 17, 2016 at 2:11 PM, Jed Brown <jed at jedbrown.org> wrote:
>>
>>> Barry Smith <bsmith at mcs.anl.gov> writes:
>>> >   Sounds like Jed is saying he is ok with making the default use the
>>> >   random number generator. Do this in a branch and be aware that you
>>> >   have to update a bunch of the test output files to match the new
>>> >   convergence histories introduced by the change.
>>>
>>> Sure, but if it's all the same to you all, let's use a hash.  This guy
>>> seems to have a convenient permutation of 32-bit integers.  (Overkill
>>> for us, but that's not a problem.)
>>>
>>> http://stackoverflow.com/a/12996028/33208
>>>
>>> Use i=(i >> 32)^i for 64-bit input.
>>>
>>
>> Should we just make this another Random implementation which is only for
>> testing?
>>
>>   Matt
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which their
>> experiments lead.
>> -- Norbert Wiener
>>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160517/4a696aac/attachment.html>


More information about the petsc-dev mailing list