Parallel processing and the -Nn flag
When I follow the Parallel Processing with Haskell tutorial (http://www.yellosoft.us/parallel-processing-with-haskell), it instructs users to run Haskell parallel programs with syntax like:
$ ./maths +RTS -N2
Where the -Nn flag informs the Haskell system that the computer has n cores. Modern video games are able to automatically determine the number of cores on a computer by some method of extracting such details; there's no reason Haskell can't do the same, so that the user doesn't have to specify it manually.
This is important because specifying the wrong number of cores either leads the program to run slowly, or even crash. If Haskell detected the number of cores and the user still specified a manual value, it could correct the user's mistake in much the same way that the Haskell type system does inference and corrects the user's mistake.
Specs at time of this behavior:
- GHC 7.0.3
- Haskell Platform 2011.2.0.1
- Windows 7 Professional x86 and x64
- Ubuntu 12.04 x86 and x64
- Mac OS X 10.8.1 Mountain Lion (triple booting with rEFIt)
- !MacBook Pro 2009
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Runtime System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |