Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-11 Thread Cale Gibbard
Out of interest, have you tried using parListChunk to break the work into larger pieces? It seems rather unlikely to help with this case as the parts are already pretty large, but perhaps it's worth a shot. ___ Haskell-Cafe mailing list Haskell-Cafe@haske

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-11 Thread Sebastian Sylvan
On Fri, Apr 11, 2008 at 10:43 AM, Don Stewart <[EMAIL PROTECTED]> wrote: > sebastian.sylvan: > >On Wed, Apr 9, 2008 at 10:58 PM, Justin Bailey <[EMAIL PROTECTED] > > > >wrote: > > > > On Wed, Apr 9, 2008 at 2:25 PM, Sebastian Sylvan > > <[EMAIL PROTECTED]> wrote: > > > Nope!

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-11 Thread Don Stewart
sebastian.sylvan: >On Wed, Apr 9, 2008 at 10:58 PM, Justin Bailey <[EMAIL PROTECTED]> >wrote: > > On Wed, Apr 9, 2008 at 2:25 PM, Sebastian Sylvan > <[EMAIL PROTECTED]> wrote: > > Nope! > > > > This is GHC 6.8.2 btw, downloaded the binary from the web site, so >

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-10 Thread Sebastian Sylvan
On Wed, Apr 9, 2008 at 11:10 PM, Justin Bailey <[EMAIL PROTECTED]> wrote: > On Wed, Apr 9, 2008 at 3:03 PM, Sebastian Sylvan > <[EMAIL PROTECTED]> wrote: > > Hmm, that's curious. I compile with "ghc --make -threaded partest.hs -o > > par.exe", and then run it with "par.exe +RTS -N2 -RTS". Am I mak

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-09 Thread Justin Bailey
On Wed, Apr 9, 2008 at 3:03 PM, Sebastian Sylvan <[EMAIL PROTECTED]> wrote: > Hmm, that's curious. I compile with "ghc --make -threaded partest.hs -o > par.exe", and then run it with "par.exe +RTS -N2 -RTS". Am I making some > silly configuration error? > Are you running this on windows? Yep, tha

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-09 Thread Sebastian Sylvan
On Wed, Apr 9, 2008 at 10:58 PM, Justin Bailey <[EMAIL PROTECTED]> wrote: > On Wed, Apr 9, 2008 at 2:25 PM, Sebastian Sylvan > <[EMAIL PROTECTED]> wrote: > > Nope! > > > > This is GHC 6.8.2 btw, downloaded the binary from the web site, so it's > > nothing strange. > > On my hyper-threaded CPU, you

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-09 Thread Justin Bailey
On Wed, Apr 9, 2008 at 2:25 PM, Sebastian Sylvan <[EMAIL PROTECTED]> wrote: > Nope! > > This is GHC 6.8.2 btw, downloaded the binary from the web site, so it's > nothing strange. On my hyper-threaded CPU, your original code works fine. With -N2, I see 100% CPU. With N1, only 50%. I am also using G

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-09 Thread Sebastian Sylvan
On Wed, Apr 9, 2008 at 10:22 PM, Justin Bailey <[EMAIL PROTECTED]> wrote: > 2008/4/9 Sebastian Sylvan <[EMAIL PROTECTED]>: > > main = print $ parMap rnf fib $ take 80 $ randomRs (30,35) (mkStdGen > 123) > > Does the strategy "rwhnf" do it for you? > > Justin > Nope! This is GHC 6.8.2 btw, downl

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-09 Thread Justin Bailey
2008/4/9 Sebastian Sylvan <[EMAIL PROTECTED]>: > main = print $ parMap rnf fib $ take 80 $ randomRs (30,35) (mkStdGen 123) Does the strategy "rwhnf" do it for you? Justin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mail

[Haskell-cafe] Control.Parallel.Strategies

2008-04-09 Thread Sebastian Sylvan
Hi, I was toying with the Control.Parallel.Strategies library, but can't seem to get it to actually do anything in parallel! Here's the code: import System.Random import Control.Parallel.Strategies fib :: Int -> Int fib 0 = 1 fib 1 = 1 fib n = fib (n-1) + fib (n-2) main = print $ parMap rnf fib