On Aug 29, 2008, at 9:11 AM, Isaac Gouy wrote:
The benchmarks game always seems to demand somewhat unnatural acts and
here's another - is there an effective way to /prevent/ ghc using
multiple cores when multiple cores are available? Can we force ghc to
only use one core on the quadcore machine? (Moreover can we do the
same
trick for other languages?)
There is indeed. In fact, GHC-compiled programs will only use multiple
processors if you explicitly tell them to. To make use of two
processors, for instance, you have to pass the flags '+RTS -N2' to the
compiled executable when you run it. This tells it to schedule its
internal threads on two OS threads, which the OS will presumably run
on two processors if possible.
Aaron
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe