Does Clang v5.0.0 OpenMP Implementation recognize OMP_PLACES=threads env variable?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Does Clang v5.0.0 OpenMP Implementation recognize OMP_PLACES=threads env variable?

Yvan Roux via cfe-dev

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?




Confidentiality Notice
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.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Does Clang v5.0.0 OpenMP Implementation recognize OMP_PLACES=threads env variable?

Yvan Roux via cfe-dev
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.

Hope this helps,
Jonas
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev