Computational Science Asked on March 27, 2021
I’m calculating basically a multidimensional random walk problem. To get more accuracy, I need larger systems (more dimensions), which requires longer time. To speed up the calculation, I’m delving into parallel computing for the first time.
I call the fortran random number generator frequently. It occurred to me that I might split the random number generator off from the rest of the program and run it in parallel. Of course, the generated random numbers would be stored in a shared memory location. Does it seem like this could potentially speed up the computation? Does a random number generator take up a large fraction of the CPU in a random walk problem?
The random number generator is rarely the limiting factor in computational science. RNGs are usually quite simple and fast, a few dozen instructions, really. If you are doing anything even remotely complicated in your code with these random numbers, then the bottleneck is there.
Correct answer by Wolfgang Bangerth on March 27, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP