Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

new multicore programming docs for GCC and Visual Studio

20 views
Skip to first unread message

cynko

unread,
Sep 12, 2008, 7:09:01 AM9/12/08
to
http://www.cilk.com/resources-for-multicoders/for-developers-only/

documentation, code samples, training materials for developers

Cilk++ ships in several months, but the above is a preview of what's coming.


Dmitriy V'jukov

unread,
Sep 12, 2008, 9:27:57 AM9/12/08
to

It seems that you meant '*HPC* multicore programming'. Do you have
anything for development of smart clients, or servers, systems
programming, middleware etc?

Dmitriy V'jukov

cynko

unread,
Sep 16, 2008, 9:50:09 PM9/16/08
to
from the website - I think this is broader than traditional HPC:

"Cilk++ is best suited for applications that meet the following criteria:

1.. Application performance is compute bound
2.. Performance can be improved by accelerating serial (i.e.,
single-threaded) portions of the application"

"Dmitriy V'jukov" <dvy...@gmail.com> wrote in message
news:2dbe1f7f-10dd-4669...@r66g2000hsg.googlegroups.com...

Chris M. Thomasson

unread,
Sep 19, 2008, 5:23:55 AM9/19/08
to
"cynko" <sie...@bugs.com> wrote in message
news:TfWdnRc6MvHJ0FfV...@comcast.com...

What work-stealing algorithm are you using?

gremlin

unread,
Sep 28, 2008, 12:13:07 PM9/28/08
to

"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:07KAk.13389$rV4....@newsfe03.iad...

>
> What work-stealing algorithm are you using?

http://en.wikipedia.org/wiki/Cilk#Work-stealing


Chris M. Thomasson

unread,
Sep 28, 2008, 5:20:48 PM9/28/08
to
"gremlin" <gre...@rosetattoo.com> wrote in message
news:3ZKdnYgjZ86LMELV...@comcast.com...

I am missing something here. Can you point me to the actual algorithm for
the atomic deques? There are several algorihtms out there, but I am
interested in which one Clik uses. Is it the ABP algorithm? Which one is it?
Thanks for your time and help.

Chris M. Thomasson

unread,
Sep 28, 2008, 5:23:00 PM9/28/08
to
"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:FsSDk.4177$Bt7....@newsfe13.iad...

Are you using something like the algorithm in TBB?

gremlin

unread,
Sep 29, 2008, 7:43:44 AM9/29/08
to

"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:JuSDk.4178$Bt7....@newsfe13.iad...

>>
>> I am missing something here. Can you point me to the actual algorithm for
>> the atomic deques? There are several algorihtms out there, but I am
>> interested in which one Clik uses. Is it the ABP algorithm? Which one is
>> it? Thanks for your time and help.
>
> Are you using something like the algorithm in TBB?

http://publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TM-548.pdf

TBB is based on MIT's Cilk work:
http://www.cilk.com/multicore-blog/bid/5607/Cilk-Wins-Most-Influential-PLDI-Paper-Award


Chris M. Thomasson

unread,
Sep 29, 2008, 8:23:10 AM9/29/08
to
"gremlin" <gre...@rosetattoo.com> wrote in message
news:Mfedna7lC4LpIn3V...@comcast.com...

How does the internal low-level impl compare to the following:

http://www.cs.bgu.ac.il/~hendlerd/papers/dynamic-size-deque.pdf

I am looking for raw pseudo-code for atomic deque internal impl details...
AFAICT, this work from SUN would scale better than Clik. Please correct me
if I am way off base here. It seems like spawning a successor thread has
overheads... Humm. Pleas try to bear with me here; okay? Correct my
ignorance on Clik's work-stealing internal impl... Well, let me pick an impl
to focus on... Say, DEC Alpha?

Chris M. Thomasson

unread,
Sep 29, 2008, 8:25:23 AM9/29/08
to
"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:BG3Ek.354$YN3...@newsfe08.iad...

BTW, here is my "fairly" detailed analysis on the inner-workings of SUN's
atomic deque algorithm:

http://groups.google.com/group/comp.programming.threads/browse_frm/thread/8ad297f61b369a41

Dmitriy V'jukov

unread,
Sep 29, 2008, 8:35:27 AM9/29/08
to
On Sep 29, 4:23 pm, "Chris M. Thomasson" <n...@spam.invalid> wrote:

> >> Are you using something like the algorithm in TBB?
>
> >http://publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TM-548.pdf
>
> > TBB is based on MIT's Cilk work:

> >http://www.cilk.com/multicore-blog/bid/5607/Cilk-Wins-Most-Influentia...


>
> How does the internal low-level impl compare to the following:
>
> http://www.cs.bgu.ac.il/~hendlerd/papers/dynamic-size-deque.pdf
>
> I am looking for raw pseudo-code for atomic deque internal impl details...
> AFAICT, this work from SUN would scale better than Clik. Please correct me
> if I am way off base here. It seems like spawning a successor thread has
> overheads... Humm. Pleas try to bear with me here; okay? Correct my
> ignorance on Clik's work-stealing internal impl... Well, let me pick an impl
> to focus on... Say, DEC Alpha?


AFAIK, in early days Cilk's work-stealing deque used mutex-based
pop(). But I remember there was some mentions of non-blocking
algorithms in the Cilk's papers, something like "some people point us
that it's possible to implement work-stealing deque in completely non-
blocking manner". And I don't know whether non-blocking deque was
finally incorporated into Cilk.

If mutex is spin-mutex (i.e. there is only 1 atomic RMW per lock/
unlock) and stealing is rare, then mutex-based deque is nearly the
same as non-blocking deque with 1 RMW... provided that push() doesn't
use mutex. And provided that atomic RMW has the same cost as StoreLoad
memory fence (x86).


Dmitriy V'jukov

Chris M. Thomasson

unread,
Sep 29, 2008, 9:02:31 AM9/29/08
to
[comp.lang.c++ added...

http://groups.google.com/group/comp.programming.threads/browse_frm/thread/e753228b20889a11

]


"Dmitriy V'jukov" <dvy...@gmail.com> wrote in message

news:4306b243-2d28-4ec6...@l42g2000hsc.googlegroups.com...

You mean:

1 atomic RMW and 1 StoreLoad membar for lock
1 atomic RMW and 1 LoadStore membar for unlock

2 atomics, and 2 membars; fairly expensive... Well... You indeed have a good
point in the case that stealing is rare...

Dmitriy V'jukov

unread,
Sep 29, 2008, 9:06:53 AM9/29/08
to
On Sep 29, 5:02 pm, "Chris M. Thomasson" <n...@spam.invalid> wrote:

> You mean:
>
> 1 atomic RMW and 1 StoreLoad membar for lock
> 1 atomic RMW and 1 LoadStore membar for unlock
>
> 2 atomics, and 2 membars; fairly expensive... Well... You indeed have a good
> point in the case that stealing is rare...


No, I mean for spin-mutex:
1 atomic RMW + 1 StoreLoad membar for lock
store-release for unlock

Which for x86 means:
1 atomic RMW for lock (StoreLoad is implied, and so basically
costless)
plain store for unlock (release is implied)


Dmitriy V'jukov

Jean-Marc Desperrier

unread,
Sep 29, 2008, 1:43:26 PM9/29/08
to
Chris M. Thomasson wrote:
> [comp.lang.c++ added...
>
> http://groups.google.com/group/comp.programming.threads/browse_frm/thread/e753228b20889a11
>
> ]

And why not remove fr.comp.lang.c++ ?

Please everyone posting to this thread !

Chris M. Thomasson

unread,
Sep 30, 2008, 6:01:54 AM9/30/08
to
"Dmitriy V'jukov" <dvy...@gmail.com> wrote in message
news:dd05d47f-9502-43a0...@w7g2000hsa.googlegroups.com...

On Sep 29, 5:02 pm, "Chris M. Thomasson" <n...@spam.invalid> wrote:

> > You mean:
> >
> > 1 atomic RMW and 1 StoreLoad membar for lock
> > 1 atomic RMW and 1 LoadStore membar for unlock
> >
> > 2 atomics, and 2 membars; fairly expensive... Well... You indeed have a
> > good
> > point in the case that stealing is rare...


> No, I mean for spin-mutex:
> 1 atomic RMW + 1 StoreLoad membar for lock
> store-release for unlock

Ahhh, I fail see spin-mutex and thing adaptive mutex. Sorry for my
confusion.


> Which for x86 means:
> 1 atomic RMW for lock (StoreLoad is implied, and so basically
> costless)

IMHO, its not costless. Not at all...


> plain store for unlock (release is implied)

Indeed.

Chris M. Thomasson

unread,
Sep 30, 2008, 6:09:57 AM9/30/08
to

"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:7ImEk.572$kc....@newsfe12.iad...

> "Dmitriy V'jukov" <dvy...@gmail.com> wrote in message
> news:dd05d47f-9502-43a0...@w7g2000hsa.googlegroups.com...
> On Sep 29, 5:02 pm, "Chris M. Thomasson" <n...@spam.invalid> wrote:
>
>> > You mean:
>> >
>> > 1 atomic RMW and 1 StoreLoad membar for lock
>> > 1 atomic RMW and 1 LoadStore membar for unlock
>> >
>> > 2 atomics, and 2 membars; fairly expensive... Well... You indeed have a
>> > good
>> > point in the case that stealing is rare...
>
>
>> No, I mean for spin-mutex:
>> 1 atomic RMW + 1 StoreLoad membar for lock
>> store-release for unlock
>
> Ahhh, I fail see spin-mutex and thing adaptive mutex.


Let me rephrase...


I see spin-mutex and thought adaptive mutex.


> Sorry for my confusion.

:^/


>> Which for x86 means:
>> 1 atomic RMW for lock (StoreLoad is implied, and so basically
>> costless)
>
> IMHO, its not costless. Not at all...

Bus locking slow-path... Cache locking fast-path...


>> plain store for unlock (release is implied)
>
> Indeed.

Even this operation has excessive costs when compared to an arch that does
not have these implied membars... RMO SPARC has its advantages indeed. TSO
compared to RMO? Which one is more light weight and able to scale... I
personally prefer a fine-grain model over TSO any day...

0 new messages