#4319: Default to all cores for executables compiled with new flag -multicore
---------------------------------+------------------------------------------
Reporter: tim.v2.0 | Owner:
Type: feature request | Status: new
Priority: normal | Component: Runtime System
Version: 6.12.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
I propose a new flag -multicore, be added to the compiler which will
generate an executable that will use all available cores by default.
Runtime tuning can remain using the +RTS -Nx -RTS.
Currently, the Haskell wiki shows that you need to both set a compilation
flag and a run-time flag to get multi-core support. The compiler flag
-threaded is used to enable several disparate behaviors: multi-core
support, interact with multi-threaded foreign code and make foreign calls
without blocking other Haskell threads. Because of this, it is not always
reasonable to use multiple cores for code compiled with -threaded.
Addition of a new flag will tell the compiler, "yes, make code that uses
all the cores".
If this is considered too lenient, perhaps it could take an argument.
-multicore 50 would use 50% of available cores. -multicore 75 would use
75% of available cores. Etc.
I find Haskell's requirement that I set both compile time and run time
flags to use multiple cores obscure and annoying. It is hardly onerous,
but it could definitely be improved.
This is filed in response to ticket 4307 being closed. Further, it is
filed in response to StackOverflow post
http://stackoverflow.com/questions/3704430/why-do-you-have-to-use-both-a
-compiler-flag-and-a-run-time-flag-to-get-multicore
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4319>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs