[Bug libgomp/59546] wrong behavior with reduction
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 18 12:45:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59546
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
i is uninitialized before the reduction, so if you add some number of threads
to an uninitialized value, you can get pretty much anything.
Also, there is no guarantee !$omp parallel will create exactly
omp_get_max_threads () threads, that is just maximum for the number of threads,
it can depend on env vars etc.
More information about the Gcc-bugs
mailing list