[Bug libgomp/44342] gfortran and OpenMP: Allocate fails on nested parallelism regions
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon May 31 11:51:00 GMT 2010
------- Comment #1 from jakub at gcc dot gnu dot org 2010-05-31 11:51 -------
This is not a compiler bug.
See OpenMP 3.0 spec, 2.9.2, page 82, lines 9-18.
The guarantee that you are looking at the same thread is there only for
parallels not nested in another parallel, with nested parallels there is no
such guarantee. Note that you use num_threads(2) on the first nested parallel,
so even if the outer parallel is removed, the program would be guaranteed to
work only if it decides to use just 2 threads (say with OMP_NUM_THREADS=2
etc.).
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44342
More information about the Gcc-bugs
mailing list