Go to the first, previous, next, last section, table of contents.

RTS options for Concurrent/Parallel Haskell

Besides the usual runtime system (RTS) options (section See section Controlling the run-time behaviour of your programs), there are a few options particularly for concurrent/parallel execution.

`-N<N>':
(PARALLEL ONLY) Use `<N>' PVM processors to run this program; the default is 2.
`-C[<us>]':
Sets the context switch interval to <us> microseconds. A context switch will occur at the next heap allocation after the timer expires. With `-C0' or `-C', context switches will occur as often as possible (at every heap allocation). By default, context switches occur every 10 milliseconds. Note that many interval timers are only capable of 10 millisecond granularity, so the default setting may be the finest granularity possible, short of a context switch at every heap allocation.
`-q[v]':
Produce a quasi-parallel profile of thread activity, in the file `<program>.qp'. In the style of `hbcpp', this profile records the movement of threads between the green (runnable) and red (blocked) queues. If you specify the verbose suboption (`-qv'), the green queue is split into green (for the currently running thread only) and amber (for other runnable threads). We do not recommend that you use the verbose suboption if you are planning to use the `hbcpp' profiling tools or if you are context switching at every heap check (with `-C').
`-t<num>':
Limit the number of concurrent threads per processor to <num>. The default is 32. Each thread requires slightly over 1K words in the heap for thread state and stack objects. (For 32-bit machines, this translates to 4K bytes, and for 64-bit machines, 8K bytes.)
`-d':
(PARALLEL ONLY) Turn on debugging. It pops up one xterm (or GDB, or something...) per PVM processor. We use the standard `debugger' script that comes with PVM3, but we sometimes meddle with the `debugger2' script. We include ours in the GHC distribution, in `ghc/utils/pvm/'.
`-e<num>':
(PARALLEL ONLY) Limit the number of pending sparks per processor to `<num>'. The default is 100. A larger number may be appropriate if your program generates large amounts of parallelism initially.
`-Q<num>':
(PARALLEL ONLY) Set the size of packets transmitted between processors to `<num>'. The default is 1024 words. A larger number may be appropriate if your machine has a high communication cost relative to computation speed.


Go to the first, previous, next, last section, table of contents.