Re: [Haskell-cafe] Problems with threading?

--- On Thu, 6/10/10, Louis Wasserman
Date: Thursday, June 10, 2010, 1:32 AM
Yeah, Control.Parallel would be nice to have. Heck, ideally I could get > the whole Haskell Platform, which would be a reasonable comparison to the huge Java and C++ libraries accessible to those languages.
Out of curiosity, though, Haskell's thread-ring implementation just tumbled down the rankings http://shootout.alioth.debian.org /u64q/program.php?test=threadring&lang=ghc&id=3. Previously, it'd been > doing most of its work on a single core, now it's spread out. Any ideas > for fixin' it? (I'm going to to try using forkOnIO.)
There are 4 sets of "rankings" so - http://shootout.alioth.debian.org/u64/program.php?test=threadring&lang=ghc&id=3 I have been wondering what approach is recommended when one part of a program would be a lot faster with -threaded but other parts of the program would be a lot faster without -threaded. I can see that the C++ and Fortran and ... programmers would just wrap part of their program source code with a pragma.

There are 4 sets of "rankings" so -
http://shootout.alioth.debian.org/u64/program.php?test=threadring&lang=ghc&id=3
Yes, but Haskell used to be doing much better specifically on the u64q, which was why I was surprised.

wasserman.louis:
There are 4 sets of "rankings" so -
http://shootout.alioth.debian.org/u64/program.php?test=threadring&lang=ghc& id=3
Yes, but Haskell used to be doing much better specifically on the u64q, which was why I was surprised.
Oh, indeed, http://shootout.alioth.debian.org/u64q/performance.php?test=threadring Something broke. Simon Marlow described how best to parallelize this problem extensively in: http://www.haskell.org/~simonmar/bib/multicore-ghc-09_abstract.html So I'd suggest doing what he says. In particular, use thread pinning to improve locality. -- Don

--- On Thu, 6/10/10, Don Stewart
From: Don Stewart
Subject: Re: [Haskell-cafe] Problems with threading? To: "Louis Wasserman" Cc: igouy2@yahoo.com, "Haskell Café List" Date: Thursday, June 10, 2010, 11:36 AM wasserman.louis: There are 4 sets of "rankings"
so -
http://shootout.alioth.debian.org/u64/program.php?test=threadring〈=ghc& id=3
Yes, but Haskell used to be doing much better
specifically on the u64q, which
was why I was surprised.
Oh, indeed,
http://shootout.alioth.debian.org/u64q/performance.php?test=threadring
Something broke.
Simon Marlow described how best to parallelize this problem extensively in:
http://www.haskell.org/~simonmar/bib/multicore-ghc-09_abstract.html
So I'd suggest doing what he says.
In particular, use thread pinning to improve locality.
-qw -qm ? How's that going to work out when applied to the other Haskell programs?

igouy2:
Simon Marlow described how best to parallelize this problem extensively in:
http://www.haskell.org/~simonmar/bib/multicore-ghc-09_abstract.html
So I'd suggest doing what he says.
In particular, use thread pinning to improve locality.
-qw -qm ?
How's that going to work out when applied to the other Haskell programs?
I'm sure it does bad things to them. -- Don

--- On Thu, 6/10/10, Don Stewart
Simon Marlow described how best to parallelize
From: Don Stewart
Subject: Re: [Haskell-cafe] Problems with threading? To: "Isaac Gouy" Cc: "Louis Wasserman" , "Haskell Café List" Date: Thursday, June 10, 2010, 12:54 PM igouy2: this problem extensively in:
http://www.haskell.org/~simonmar/bib/multicore-ghc-09_abstract.html
So I'd suggest doing what he says.
In particular, use thread pinning to improve locality.
-qw -qm ?
How's that going to work out when applied to the other Haskell programs?
I'm sure it does bad things to them.
Yep, earlier in the week I measured the programs using +RTS -N4 -qw -qm which is why I wonder how you would approach programs that have a mix of performance characteristics? Maybe there aren't large Haskell programs like that?

igouy2:
In particular, use thread pinning to improve locality.
-qw -qm ?
How's that going to work out when applied to the other Haskell programs?
I'm sure it does bad things to them.
Yep, earlier in the week I measured the programs using +RTS -N4 -qw -qm which is why I wonder how you would approach programs that have a mix of performance characteristics? Maybe there aren't large Haskell programs like that?
Partioning different parallel components of the application has been studied in large scale systems. I'm not aware of work done on this in Haskell yet. If different phases of a algorithm need to use more or less parallelism, that's certainly a lot easier (mixtures of forkOnIO and (forkIO or par)). -- Don
participants (3)
-
Don Stewart
-
Isaac Gouy
-
Louis Wasserman