+3  A: 

From GHC User guide (version 6.12.1):

Omitting x, i.e. +RTS -N -RTS, lets the runtime choose the value of x itself based on how many processors are in your machine.

I suppose there's no specific reason for this not to be the default, apart from authors' vision of what should defaults be. (Note that this also enables parallel GC, which maybe sometimes isn't what you wish to be by default.)

Roman Cheplyaka
Thanks for pointing that out. It addresses the "number of cores" portion of my question. That is a start. However, I'm more frustrated by having to set flags both to compile AND to run my code.
Tim Perry
While you're developing the program this shouldn't be a big deal and for the final (shipped) binary you can link it with some [static RTS options](http://haskell.org/ghc/docs/6.12.2/html/users_guide/runtime-control.html#rts-hooks) via a .h file with `char *ghc_rts_options = "-N";`
TomMD
@TomMD: That is a useful hack. It would solve the issue I'm currently fighting. If you post that as a solution, I'll accept it. I'm also planning to submit a feature request as Don Steward suggested above.
Tim Perry
+6  A: 

Why can't the run-time executable detect it was compiled with -threaded and use all cores on the system unless otherwise specified?

That's an interesting feature request!

You could ask for it on the GHC feature tracker: http://hackage.haskell.org/trac/ghc/wiki/ReportABug

Don Stewart
Will submit. Thanks for hint.
Tim Perry
Submitted. Ticket #4307.
Tim Perry
Considering that you can do what TomMD suggested should this bug request be considered closed?
Robert Massaioli
I don't think so. After all, I could hack the entire program together in assembly if I wanted to. But I don't want to. I want compiling with -threaded to provide behavior currently enabled by placing "+RTS -N -RTS" on the command line. I think it will be much cleaner that way.
Tim Perry
I agree with Tim on this. While no programmer should be too put-off by having an extra header file, a little more polish doesn't hurt here.
TomMD
So I submitted it and it was closed. Apparently making the runtime less obscure is not a priority of the compiler team. Re-submitted to the runtime team. Hoping for different result. http://hackage.haskell.org/trac/ghc/ticket/4319
Tim Perry
+10  A: 

While you're developing the program the extra +RTS ... shouldn't be a big deal (though I admit it struck me as odd when I first picked up Haskell). For the final (shipped) binary you can link it with static RTS options (GHC manual) by providing a C file containing char *ghc_rts_opts = "-N";.

TomMD
At least, there is a hook. But what an ugly way to specify default RTS options.
gawi