[Bug libfortran/108336] Repeatable random_numbers with openmp

2023-01-08 Thread gareth.davies.ga.code at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108336 --- Comment #6 from Gareth Davies --- (In reply to anlauf from comment #4) > There is one flaw with the testcase: when OMP_NUM_THREADS > n1, > array elements threadval(n1+1:OMP_NUM_THREADS) are filled with > undefined values. Yes, my bad in

[Bug fortran/108336] Repeatable random_numbers with openmp

2023-01-08 Thread gareth.davies.ga.code at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108336 --- Comment #2 from Gareth Davies --- (In reply to Andrew Pinski from comment #1) > Most likely there is only one seed per program so the random # generator is > using locks. So the order is dependent on which thread calls the function. > >

[Bug fortran/108336] New: Repeatable random_numbers with openmp

2023-01-08 Thread gareth.davies.ga.code at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108336 Bug ID: 108336 Summary: Repeatable random_numbers with openmp Product: gcc Version: 11.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran