<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Does threadscope help? It should be of some use since it is
      designed for debugging parallel programs.<br>
      <br>
      Cheers,<br>
      Vanessa<br>
    </p>
    <div class="moz-cite-prefix">On 12/28/18 2:19 AM, ducis wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:4e36457.7795.167f3e54c2c.Coremail.ducis_cn@126.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
    </blockquote>
  </body>
</html>