nine's paper

Nat Tuck nat at ferrus.net
Wed Mar 14 22:38:19 UTC 2012


It's good to see the threading stuff getting worked on.

Here is a benchmark that seems like it would perform terribly with
delegated-to-owner writes for shared data:

Data parallel square matrix multiplication:

Input:
 - Two N*N 2D arrays, A and B.

Output:
 - One N*N 2D array, C.

Algorithm:
 - Spawn one task for each cell (ii, jj) in the output array with the
following function:

    void compute_one_cell(int ii, int jj)
    {
        double sum = 0.0;
        for (int kk = 0; kk < N; ++kk) {
            sum += A[ii, kk] * A[kk, jj];
        }
        C[ii, jj] = sum;
    }

After all tasks are done, the C array should contain the result of
multiplying the matrices A and B. Pick an N that takes several seconds to
run on a single processor and this technique should scale pretty much
perfectly as you add more processors.

In addition to array parallel problems like this one, another good thing to
look at is tree-parallel problems like Merge Sort.

-- Nat

On Thu, Mar 8, 2012 at 8:00 AM, Lucian Branescu
<lucian.branescu at gmail.com>wrote:

> The simple benchmark I see everywhere is a ring benchmark (like
>
> http://muharem.wordpress.com/2007/07/31/erlang-vs-stackless-python-a-first-benchmark/
> )
> In the case of parrot, it could be a ring of threads, each
> incrementing the counter of the thread to its right.
>
> Another common benchmark could be contention. Several threads, some
> reading some writing to a single thread's resource.
>
> Modelling a queue with scheduling might be a more complex example.
>
> On 8 March 2012 09:39, Stefan Seifert <nine at detonation.org> wrote:
> > On Thursday 08 March 2012 09:31:06 Lucian Branescu wrote:
> >> Very interesting. The concept of sending a thread a function to change
> >> itself with is very similar to Clojure's agent send-off.
> >>
> >> I'm curious how this would perform for less obviously parallel
> workloads.
> >
> > If you got a benchmark which is not too difficult to implement in PIR,
> I'd be
> > quite happy to try it. I'm quite curious myself and need benchmarks for
> my
> > paper anyway.
> >
> > Stefan
> > _______________________________________________
> > http://lists.parrot.org/mailman/listinfo/parrot-dev
> >
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20120314/a36153c0/attachment.html>


More information about the parrot-dev mailing list