[Bug fortran/31234] Thread-safety of random_number should be documented.

dfranke at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Mar 21 14:11:00 GMT 2007



------- Comment #1 from dfranke at gcc dot gnu dot org  2007-03-21 14:11 -------
Brooks, maybe not. 
Thread safety, in the context it was asked for, still needs to be proved.
Having mutexes within the code is fine to save the states from overwriting each
other (it is an unexpected serialisation point, though). Nevertheless, as
RANDOM_NUMBER is expected to give uniformely distributed numbers from 0.0 to
1.0 on a single thread, this needs not to be the case if multiple threads draw
from the same series as currently implemented. 

I'll run some tests as soon as possible and report back to the mailing list.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31234



More information about the Gcc-bugs mailing list