Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

OpenMP thread priority on OSX

letz
Beginner
1,052 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
1,052 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
1,052 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
1,052 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