haskell-multicore

Multi-Core Haskell on Windows

I've been reading a number of tutorials on Haskell. However, I have not been able to get the compiled application to run on a multicore (I have an Intel Quad Core) on windows (32 bit). I have tried a number of things: ghc -O2 --make A.hs -threaded ./real-par +RTS -N2 ./real-par +RTS -N4 But no luck. The compiled application runs ...

multicore programming in Haskell - Control.Parallel

I'm trying to learn how to use the Control.Parallel module but I think I didn't get it right. I'm trying to run the following code (fibs.hs): import Control.Parallel fib :: Int -> Int fib 0 = 0 fib 1 = 1 fib n = p `par` (q `pseq` (p + q)) where p = fib (n-1) q = fib (n-2) main = print $ fib 30 I compiled this w...

Multithreaded Haskell

Hi I'm learning Haskell and I'd like to write some multithreaded programs now to see the performance gains from that in a functional language. I can find some references to it on the internet but never a proper introduction to it. Can anyone point me to a guide which is understandable for someone who knows the syntax fairly well, but is ...

parallel haskell (ghc 6.10.4) doesn't accept -N greater than -N1

I'm trying to run parallel code in GHC 6.10.4 (from MacPorts) on OS X 10.5 I'm building with -threaded, in my makefile: GHC=ghc -prof -auto-all -O -threaded glicko: glicko.hs Lib.hs $(GHC) --make -main-is Glicko glicko.hs lib.hs When I invoke ./glicko +RTS -N or ./glicko +RTS -N1 the code runs, but seems to only use one CPU...

Get number of RTS threads in Haskell program?

Is there an IO action that gives me the number of OS threads the RTS was initialized with? It would be nice to be able to use this as an argument to the parBuffer function from the Control.Parallel.Strategies module. ...