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.

http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html#rts-hooks

Dan

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 <[EMAIL PROTECTED]> wrote:

Did you compile with -threaded, and run with +RTS -N2?

Regards
brad



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to