I have run into a very strange bug. It is ne function that is parallelized. This function works perfectly fine with just one thread or when commenting the parallel directive. When there is more than one thread, it seems like the master thread doesn't exit the parallel section. Even if I, inside the parallel section, directly put a single clause that covers the entire "parallel"-code the same error occurs. When I try to debug the program with gdb/eclipse (I can't see the variable values inside parallel scopes) It shows every thread at the end of the function. This I interpreted as if all the threads has executed their designated tasks and parked at the end of the function. So why won't the master thread return from the function?
Also, the for directive gives sigsegv error if I try to set schedule to "dynamic", "guided" or "runtime".
I think it seems like a openmp-error and not an implementation-error. There might be a possibility that another thread executes another openmp-parallelized function in parallel with this function call. Could this be a factor to why it doesn't work?
Has anybody experienced the same behaviour.
Ubuntu 8.04 64-bit on a Intel core2 quad processor. I compile with gcc 4.3.1 and I debug with GDB in eclipse.
I have tried both with omp_dynamic and omp_nested enabled and disabled.