public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/49231] New: #pragma omp parallel for never returns
@ 2011-05-30 13:05 parviz_fariborz at mentor dot com
  2011-05-30 14:09 ` [Bug libgomp/49231] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: parviz_fariborz at mentor dot com @ 2011-05-30 13:05 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: #pragma omp parallel for never returns
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: parviz_fariborz@mentor.com


Created attachment 24396
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24396
The attached file re-produces the probem that I have reported above

Hi,

The attached program when compiled using gcc 4.4.3 produces the following
output and never returns :

...
===> Fpga: 865, Thread: 6
===> Fpga: 866, Thread: 6
===> Fpga: 867, Thread: 6
===> Fpga: 868, Thread: 6
===> Fpga: 869, Thread: 6
===> Fpga: 870, Thread: 6
===> Fpga: 871, Thread: 6
===> Fpga: 872, Thread: 6
===> Fpga: 873, Thread: 6
===> Fpga: 874, Thread: 6

I have to kill the process to make it exit. 

The same program when compiled using gcc 4.3.3 and run on the same machine
works fine and produces the correct output.

I compile and run the program on a redhat 4 linux machine with the following
specs:

mawhp2:/home/parvizf/tmp=> uname -a
Linux mawhp2 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:33:05 EDT 2009 x86_64 x86_64
x86_64 GNU/Linux

mawhp2:/home/parvizf/tmp=> cat /etc/redhat-release 
Red Hat Enterprise Linux WS release 4 (Nahant Update 8)

Thanks in advance for your help.
-Parviz


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libgomp/49231] #pragma omp parallel for never returns
  2011-05-30 13:05 [Bug libgomp/49231] New: #pragma omp parallel for never returns parviz_fariborz at mentor dot com
@ 2011-05-30 14:09 ` jakub at gcc dot gnu.org
  2011-05-30 15:17 ` parviz_fariborz at mentor dot com
  2011-05-30 16:40 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-30 14:09 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-30 13:15:49 UTC ---
Can't reproduce, tried gcc 4.4.5, 4.6 and 4.7, both -m32 and -m64, gcc and g++,
and various options.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libgomp/49231] #pragma omp parallel for never returns
  2011-05-30 13:05 [Bug libgomp/49231] New: #pragma omp parallel for never returns parviz_fariborz at mentor dot com
  2011-05-30 14:09 ` [Bug libgomp/49231] " jakub at gcc dot gnu.org
@ 2011-05-30 15:17 ` parviz_fariborz at mentor dot com
  2011-05-30 16:40 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: parviz_fariborz at mentor dot com @ 2011-05-30 15:17 UTC (permalink / raw)
  To: gcc-bugs

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

Parviz Fariborz <parviz_fariborz at mentor dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |parviz_fariborz at mentor
                   |                            |dot com

--- Comment #2 from Parviz Fariborz <parviz_fariborz at mentor dot com> 2011-05-30 15:11:16 UTC ---


-Parviz(In reply to comment #1)
> Can't reproduce, tried gcc 4.4.5, 4.6 and 4.7, both -m32 and -m64, gcc and g++,
> and various options.

The compile/link option -static seems to be significant in this case. The
executable built with the following command :

/tools/linux64/gcc-4.4.3/bin/g++ -o omp -g -static -fopenmp -lgomp -lpthread
-I/tools/linux64/gcc-4.4.3/include -L/usr/lib64
-L/tools/linux64/gcc-4.4.3/lib64 omp.cc

Do not work. When I remove the -static option, it does work. Any ideas?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libgomp/49231] #pragma omp parallel for never returns
  2011-05-30 13:05 [Bug libgomp/49231] New: #pragma omp parallel for never returns parviz_fariborz at mentor dot com
  2011-05-30 14:09 ` [Bug libgomp/49231] " jakub at gcc dot gnu.org
  2011-05-30 15:17 ` parviz_fariborz at mentor dot com
@ 2011-05-30 16:40 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-30 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-30 16:30:16 UTC ---
See http://www.akkadia.org/drepper/no_static_linking.html
If you still for whatever weird reason insist to link statically, for NPTL you
need to -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
because if only some objects from libpthread are linked in, it can misbehave in
various ways.  In RHEL6 libpthread.a contains just one object ld -r linked
together the whole normal libpthread.a contents, but in upstream glibc as well
as older RHEL versions (no idea about other distros) you need to link as
mentioned above.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-30 16:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-30 13:05 [Bug libgomp/49231] New: #pragma omp parallel for never returns parviz_fariborz at mentor dot com
2011-05-30 14:09 ` [Bug libgomp/49231] " jakub at gcc dot gnu.org
2011-05-30 15:17 ` parviz_fariborz at mentor dot com
2011-05-30 16:40 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).