-Nx option appears to have gone

Asked by Russel Winder

I had understood that using the options +RTS -N8 -RTS on invocation of a Haskell executable compiled with ghc would make the executable use 8 OS threads. I am fairly sure I used this on Hardy or Gutsy, however this options fails to work on Intrepid. Had the threading option not been compiled into the Intrepid version? What will happen for the Jaunty version?

In this day and age of multicore machines not having the -N option to Haskell executables make Haskell useless.


Question information

English Edit question
Ubuntu ghc6 Edit question
No assignee Edit question
Solved by:
Russel Winder
Last query:
Last reply:
Revision history for this message
Russel Winder (russel) said :

OK, my apologies, this was my fault. I have just noticed that my SCons script was not puting the -threaded option to the compilation. Silly me.

However there is a real problem with the Control.Parallel.par operation on Intrepid, it appears not to be using the OS threads on offer from the -N option.

I am using the compile:

  ghc -o pi_haskell_parallel --threaded pi_haskell_parallel.hs -L/usr/lib/parallel- -lHSparallel-

and then:

  ./application +RTS -N8

but the application remains single threaded :-(

Revision history for this message
Russel Winder (russel) said :

The solution to the problem is to remove all the GHC Ubuntu packages (which are GHC 6.8 and so far out of date as to be more or less useless for any multicore parallel programming) and to install the Linux binary distribution of GHC 6.10 from the Haskell website. Now when I do:

  ./application +RTS -N8

I get all 8 processors hard at work.