Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

OpenMP thread priority on OSX

letz
Beginner
595 Views
Hi,

We are experimenting in using OpenMP in "real-time" Audio code on OSX. We would expect worker threads started by OpenMP for a parallel region to get the priority of the master thread (in our case a "time-constraint" thread) but this is not the case.

It this a known problem?

Thanks.

Stephane Letz
0 Kudos
3 Replies
Gergana_S_Intel
Employee
595 Views

Hi Stephane,

I don't think we'll be able to help here, since this forum is focused on cluster applications, but I'm moving your question to the threading forum. Perhaps they'll be able to help you with your query.

Regards,
~Gergana

0 Kudos
Bartlomiej
New Contributor I
595 Views
AFAIK OpenMP lacks any priority-controlling tools. OMP is desinged as a relatively high-level API for multi-processing, particularly parallel computations; not for general-purpose threads. I'm afraid such details are implementation-dependent.
If you need priorities you should use a lower-level library, like Pthreads or native threads of your OS.

0 Kudos
TimP
Honored Contributor III
595 Views
Without full knowledge of the situation, I would expect the OpenMP threads to get the priority of the process from which OpenMP is first invoked. If a thread were opened directly outside OpenMP, e.g. by pthreads, I suppose OpenMP would not be aware of its priority nor would it count it when determining how many threads to open or which affinities to set. If you started OpenMP threads from within a thread, if OpenMP were aware of the parent thread, it would not even use multiple threads unless OMP_NESTED were set.
0 Kudos
Reply