Commercial Compilers and Parallel Random Numbers
Scott Robert Ladd
coyote@coyotegulch.com
Tue Apr 27 15:09:00 GMT 2004
Lars Segerlund wrote:
> Perhaps it would be better to have a mutex in the random routine ?
> It's an easier implementation.
Most parallel implementations (SPRNG, for example) use separate
generators or states for each thread. These are external, non-standard
generators, similar to the one I use. A mutex or other blocking
mechanism is likely to severely limit the benefit of parallelization.
We could provide a thread-safe RANDOM_NUMBER in the OpenMP library,
though that wouldn't solve the problem for manually-threaded programs
that use random numbers.
..Scott
--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing
More information about the Fortran
mailing list