<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi all,<br><br>I am working on parallelising some program, however I just found out that without inserting any parallism manually<br>the program is already parallelised, presumably by some of the libraries referenced, as long as I enable -threaded<br>and +RTS -N8.<br><br>Unfortunately this parallism are actually slowing down my program, probably due to being of too fine granularity.<br>For example, with +RTS -N8 I have    <br>47.03user 38.06system 0:21.68elapsed 392%CPU<br>While with +RTS -N1 I have<br>16.57user 0.45system 0:17.02elapsed 100%CPU<br><br>In .prof file I can't find whether a function fired a spark or how much 'system' time a function used.<br>Nor can I find any names of functions/modules browsing through eventlog with ghc-events.<br>Is there a way to find out which functions/modules are causing any parallelism at all?<br><br>I am also trailing the post with the imports I used in case anyone immediately recognises parallelism by default in the package.<br>import Control.DeepSeq<br>import GHC.Generics (Generic, Generic1)<br>import Text.Parsec                                                                         <br>import Data.List                                                                           <br>import Data.Vector.Unboxed(fromList, (!))                                                  <br>import qualified Data.Vector as V                                                          <br>import qualified Data.Map as M                                                             <br>import qualified Data.Set as S                                                             <br>import Data.Char                                                                           <br>import Control.Applicative((*>),(<*))                                                      <br>import Test.QuickCheck.Monadic                                                             <br>import Test.QuickCheck                                                                     <br>import Control.Monad                                                                       <br>import Text.Regex                                                   <br>import Control.Applicative ((<$>), (<$), (<|>))        <br>import GHC.Read (readLitChar)                          <br>import Data.Char(isPrint)                              <br>import Text.ParserCombinators.ReadP                                             <br>import Text.Show.Pretty                                                                    <br>import Data.Functor                                                                        <br>import Data.Maybe                                                                          <br>import System.Environment(getArgs)<br>import Text.Read(readMaybe)                                                                <br>import Text.Printf                                                                                <br>import Data.Dynamic                                                                        <br>import Debug.Trace                                                                         <br>import Data.Ratio                                                                            <br>import qualified Data.DList as D                                                           <br>import Control.Monad.Trans.Writer.Strict                                                              <br>import Control.Monad.Trans.Class                                                           <br>import Data.Typeable(Typeable)                                                             <br>import qualified Data.HashMap.Lazy as H                                               <br><br>Best,<br>ducis     <br><br></div></div>