Does Clang v5.0.0 OpenMP Implementation recognize OMP_PLACES=threads env variable?
Clang v5.0.0 is stated to be based on OpenMP 3.1 and *some* 4.0. Did it pick up OpenMP 4.0’s introduction of the “OMP_PLACES=threads” environment variable?
The information transmitted in this electronic mail (e-mail) is the property of Belvedere Trading LLC. This e-mail is intended only for the person or entity to which it is addressed and may contain material that is confidential, privileged or otherwise protected
by law. Any review, retention, retransmission, dissemination or other use of, or taking any action in reliance upon, this information by persons or entities other than the intended recipient is STRICTLY PROHIBITED. If you received this e-mail in error, please
alert the sender by reply e-mail and then delete this e-mail and any attachments in their entirety, whether in electronic or hard copy format.
All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. Emails are not secure and cannot be guaranteed to be error free as
they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by email.
Re: Does Clang v5.0.0 OpenMP Implementation recognize OMP_PLACES=threads env variable?
On 2018-09-20 19:56, Dawson, Mark via cfe-dev wrote:
> Clang v5.0.0 is stated to be based on OpenMP 3.1 and *SOME* 4.0. Did
> it pick up OpenMP 4.0’s introduction of the “OMP_PLACES=threads”
> environment variable?
Yes, the LLVM OpenMP runtime supports Thread Affinity as introduced by
OpenMP 4.0. However one possible problem might be that the library can't
determine your machine's hardware topology (mapping of OS processors to
threads, cores, sockets...). This should work fine for x86_64 and PPC64
on Linux and probably on Windows. Any other combination might require
changes to the detection routines.
You can run your program with KMP_AFFINITY=verbose which should give
enough details to understand what the library does. I'd experiment with
setting the variables (OMP_PLACES, OMP_PROC_BIND) to different values
and see what happens.