Hi everybody!

Here is my problem : I wrote a c++ program on Linux which uses the pthread
library to handle several requests of several clients. Each request executes
an algo in which some parts, some loops, are parallelized with openmp (on 2
processors). I compile my program with gcc 4.3.
With one request, so with one tread created by pthread lib, there is no
problem, the execution is ok, and I have no problem with the openmp
directives. But, when I execute my code with several requests, a deadlock,
or a segmentation fault, occurs at execution, precisely when the second
thread enters an openmp part.
I have already searched for a solution on the web, and on this forum too, I
found some answers saying that there is a problem with gcc 4.2 and 4.3 and
openmp with multithreading, so I try with gcc 4.5 but it doesn't correct the
problem.
There is no error in my code, in the declarations of my variables, in the
openmp directives,... and I really think it is due to gcc because the code
works when I compile it with the intel c compiler.

I hope someone will have a solution :) .
Thanks
-- 
View this message in context: 
http://old.nabble.com/Problem-compiling-a-program-with-openmp-and-multithreading-tp29170883p29170883.html
Sent from the gcc - bugs mailing list archive at Nabble.com.

Reply via email to