[Haskell-cafe] Find out which part of code are causing parallelism?
ducis_cn at 126.com
Fri Dec 28 08:19:09 UTC 2018
I am working on parallelising some program, however I just found out that without inserting any parallism manually
the program is already parallelised, presumably by some of the libraries referenced, as long as I enable -threaded
and +RTS -N8.
Unfortunately this parallism are actually slowing down my program, probably due to being of too fine granularity.
For example, with +RTS -N8 I have
47.03user 38.06system 0:21.68elapsed 392%CPU
While with +RTS -N1 I have
16.57user 0.45system 0:17.02elapsed 100%CPU
In .prof file I can't find whether a function fired a spark or how much 'system' time a function used.
Nor can I find any names of functions/modules browsing through eventlog with ghc-events.
Is there a way to find out which functions/modules are causing any parallelism at all?
I am also trailing the post with the imports I used in case anyone immediately recognises parallelism by default in the package.
import GHC.Generics (Generic, Generic1)
import Data.Vector.Unboxed(fromList, (!))
import qualified Data.Vector as V
import qualified Data.Map as M
import qualified Data.Set as S
import Control.Applicative ((<$>), (<$), (<|>))
import GHC.Read (readLitChar)
import qualified Data.DList as D
import qualified Data.HashMap.Lazy as H
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe