Hi all,
I'm new on OpenMp and i would like to know if it's possible to make a communication between threads using messages in OpenMP. I've been reading many manuals but didn't find anything.
Thanks for help.
Ibai
if (omp_get_thread_num() != 0) {
...
}
ejd wrote:Ibai -
OpenMP doesn't have a facility to have multiple threads wait for some condition in a "nice" manner. You can use a shared variable and see if the value has changed, but it requires the threads to be active (and waste resource). You can also use locks, but then not all threads will restart immediately. This is a case where some functionality is really missing from OpenMP for it to really do what you want in a "nice" manner. You have to remember though, that OpenMP was originally designed to allow a user to add parallelism incrementally to their "workshared" program. Personally, I would say that this really meant loop based. With each release of a new spec, the types of programs that OpenMP can handle is increasing - but it still isn't the right thing for all types of parallel programs.
Users browsing this forum: Google [Bot] and 3 guests