<div dir="ltr"><div><div><div><div><div>Hi all,<br><br></div>I am trying to generate a lot of random numbers to use in a Fokker-Planck simulation. The particles receive random kicks from a normal distribution with a specified statistics. I have some issues here:<br><br></div>- The manual says to NOT use PetscRandomCreate for Monte Carlo simulations because it wouldn't have the same statistics across processors. I assume it would in principle apply to my Fokker-Planck simulation described above too, right?<br><br></div><div>- If I want to generate the random numbers more carefully, it says I have to use PetscRandomRegister, and to check src/sys/random/impls/rand/rand.c for an example, but src/sys/random does not exist in my distribution (obtained with git). How do I find this?<br></div><div><br></div>- There is a speed issue. On my computer, the generator is about 10 times slower than the method numpy.random.rand() of python. Is it expected ? This is alleviated by parallelization, but since I moved to FORTRAN from python in hope of accelerating my code, this is too bad. I consider moving to petsc4py, would it be a good choice?<br><br></div>Thanks in advance<br><br></div>Timothee<br></div>