Opened 4 years ago

Closed 4 years ago

#4307 closed feature request (wontfix)

Default to all cores for executables compiled with -threaded

Reported by: tim.v2.0 Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.12.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The Haskell wiki shows that you need to both set a compilation flag and a run-time flag to get multi-core support. Why can't the run-time executable detect it was compiled with -threaded and use all cores on the system unless otherwise specified?

I think there should still be flags to turn modify the number of cores used.

Change History (1)

comment:1 Changed 4 years ago by simonmar

  • Resolution set to wontfix
  • Status changed from new to closed

My take on this is that we're not ready to default to using all the cores yet. I'd prefer people to have to ask for it, because often the effect on performance can be surprising. Using all the cores is often not what you want, either.

There are uses for -threaded beyond just multicore: the main ones being able to interact with multi-threaded foreign code and being able to make foreign calls without blocking other Haskell threads.

Note: See TracTickets for help on using tickets.