[cfe-dev] [Openmp-dev] [LLVMdev] Future of the LLVM OpenMP runtime

Rick Mann rmann at latencyzero.com
Thu Feb 27 19:30:25 PST 2014


On Feb 27, 2014, at 19:17 , C. Bergström <cbergstrom at pathscale.com> wrote:

> On 02/28/14 10:15 AM, Rick Mann wrote:
>> On Feb 27, 2014, at 19:03 , C. Bergström <cbergstrom at pathscale.com> wrote:
>> 
>>> On 02/28/14 04:20 AM, Rick Mann wrote:
>>>> Tangentially related, I have a question:
>>>> 
>>>> I don't know, well, anything about how OpenMP is implemented. But does it make sense to use Grand Central Dispatch on platforms that support it (instead of, I assume, pthreads)?
>>> We played with implementing OpenMP 3.x tasks on top of libdispatch and while we got it to work - there was some scalability of the scheduling across a lot of cores which would probably need to be addressed. For systems with 4-8 cores I doubt it would ever cause a significant problem though.
>> That's good news. Currently I need OpenMP support in Xcode because I'm incorporating code my colleagues wrote that uses it into the iOS app I write. We have yet to exceed four cores on an iOS device, so that should be okay. Perhaps the runtime can conditionally build to use GCD when targeting iOS or OS X (assuming there's a compelling reason, performance or energy, to do so).
> Maybe you didn't understand 100% - Is the code your colleagues wrote using OpenMP tasks or some other part of the OMP standard? (I suspect it's not using tasks) In which case lowering down to pthreads is probably all that's available.

I'm 100% sure I don't understand 100%. :-)

I asked…I was told the one thing we use a lot is OpenMP parallel for, which we've worked around with a set of macros that uses OpenMP when building with GCC (for our Linux targets) and uses GCD when building for iOS. This mostly works, but every now and again they break the iOS build because a method return something other than void and the macros don't return anything

OpenMP thread-local storage was something they looked into using for some other operation, but haven't actually used yet.

> The good news - libdispatch is portable to almost all platforms (except Windows I think). We got the best scalability off OpenSolaris (RIP)

Well, I wouldn't expect the world who wants to use OpenMP in LLVM also be willing to use libdispatch, so I imagine this would be a selectable implementation thing, and even then, only if there's a compelling reason to use GCD.


-- 
Rick



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140227/daa339dc/attachment.sig>


More information about the cfe-dev mailing list