Ticket #1101 (closed merge: fixed)

Opened 5 years ago

Last modified 3 years ago

Parallel/smp Runtime

Reported by: humasect Owned by: igloo
Priority: normal Milestone: 6.6.1
Component: GHCi Version: 6.6
Keywords: smp parallel runtime threaded Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

ghc-6.6: --interactive can't be used with -prof, -ticky, -unreg or -smp.

+RTS -N2 is working fine. But this needs -threaded

Change History

Changed 5 years ago by simonmar

  • type changed from feature request to bug
  • milestone set to 6.6.1

Looks like the error message is misleading; you can indeed use +RTS -N2 with GHCi (althogh I don't think I've ever tried it!).

Changed 5 years ago by humasect

Yes, I almost thought this would do it, there is no error when executing GHCi this way. But actually:

4.12.1. Options to enable SMP parallelism

In order to make use of multiple CPUs, your program must be linked with the -threaded option (see Section 4.10.7, “Options affecting linking”). Then, to run a program on multiple CPUs, use the RTS -N option <cut>

Would this only mean that GHC needs to be instead built with -threaded +RTS -Nx for this ability? We need the computing power over here.

Changed 5 years ago by simonmar

  • owner set to igloo
  • type changed from bug to merge
  • os changed from MacOS X to Multiple

Fixed, you can now say 'ghci -threaded'. The -threaded option doesn't actually do anything, because as you say, what matters is what RTS GHCi itself is linked against, and by default it is linked against the threaded RTS.

To merge:

Tue Jan 16 12:04:09 GMT 2007  Simon Marlow <simonmar@microsoft.com>
  * allow 'ghci -threaded' (fixes #1101)

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Merged to the 6.6 branch.

Changed 5 years ago by humasect

Excellent, works great, thank you both!

Changed 3 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 3 years ago by simonmar

  • os changed from Multiple to Unknown/Multiple
Note: See TracTickets for help on using tickets.