[Haskell-cafe] Unable to get parallelism using `par`
brandon_m_moore at yahoo.com
Thu Feb 17 18:20:18 CET 2011
>From: C K Kashyap <ckkashyap at gmail.com>
>I tried the first example from "A tutorial on Parallel and Concurrent
>programming in Haskell" but I cant seem to get sparks to get converted to OS
>Below is the program I am using.
>I did ghc --make -threaded program.hs
>./program +RTS -N2
>I don't see any speed gain compared to N1.
>Am I missing something?
If you are using ghc 7.01, you need to compile with -rtsopts for the compiled
program to parse +RTS options. I don't know of any way to provide a default
value at compile time.
Also, in general a program might not run faster with speculation, so if you want
check if several threads are used, check if CPU time used is over 100%.
More information about the Haskell-Cafe