[Haskell-cafe] Re: Waiting for thread to finish

Dan Weston westondan at imageworks.com
Tue Nov 27 20:21:32 EST 2007

Silly or not, if I compile with -threaded, I always link in the 
one-liner C file:

   char *ghc_rts_opts = "-N2";

so I don't have to remember at runtime whether it should run with 2 
cores or not. This just changes the default to 2 cores, so I am still 
free to run on only one core with the runtime flags +RTS -N1, though I 
rarely need to.



Brad Clow wrote:
> Silly mistake. I had compiled with -threaded, but forgot the +RTS -N2.
> However, I have a more complex app, where I haven't forgotton to use
> the right flags :-) and the utilisation of cores is very poor. I am
> thinking it is due to laziness. I am currently wondering how GHC
> handles the case where the function that is being forked uses lazy
> arguments?
> On Nov 28, 2007 10:54 AM, Spencer Janssen <sjanssen at cse.unl.edu> wrote:
>> Did you compile with -threaded, and run with +RTS -N2?
> Regards
> brad

More information about the Haskell-Cafe mailing list