Ticket #5896 (closed bug: fixed)

Opened 15 months ago

Last modified 15 months ago

Three documentations inaccuracies related to concurrency.

Reported by: MikolajKonarski Owned by: simonmar
Priority: normal Milestone: 7.4.2
Component: Documentation Version: 7.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Documentation bug Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

1.

The help info below is wrong. The default is the actual number of cores, or something close.

~/waste/threadscope-sparkgraph-demo75$ ./parlist +RTS -N2 -lg -s -asdfasdf
parlist: unknown RTS option: -asdfasdf
[...]
parlist:   -N<n>     Use <n> processors (default: 1)

2.

Here:

http://www.haskell.org/ghc/docs/latest/html/users_guide/using-smp.html

the first sentence of the following is wrong and could be just removed.

There is no means (currently) by which this value may vary after the program has started.

The current value of the -N option is available to the Haskell program via GHC.Conc.getNumCapabilities, and it may be changed while the program is running by calling GHC.Conc.setNumCapabilities. Note: in the current implementation, the -N value may only be increased, not decreased, by calling GHC.Conc.setNumCapabilities.

3.

Neither here

http://www.haskell.org/ghc/docs/latest/html/users_guide/using-concurrent.html

nor on first page of the docs it refers to:

http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.5.0.0/Control-Concurrent.html

is there any hint about the possibility and advantages of using "-threaded" and "+RTS -N". It may be misleading to the users that specifically seek an information about any extra flags they need to start using multiple cores or non-blocking FFI calls.

Change History

Changed 15 months ago by simonmar

  • owner set to simonmar
  • difficulty set to Unknown
  • milestone set to 7.4.2

Thanks for the report.

Regarding point (1), the help text currently says

  -N<n>     Use <n> processors (default: 1)
  -N        Determine the number of processors to use automatically

I think this is correct, but I can see how it might be misinterpreted. The usage of the word "default" is consistent with the way we use it in the rest of the help text: that is, it refers to the value that the RTS will use in the absence of the option, not in the absence of the *value*. Please feel free to suggest a change that might help.

I'll fix points (2) and (3).

Changed 15 months ago by MikolajKonarski

How about "Use <n> processors (default: 1, unless '-N' is used)"?

Changed 15 months ago by marlowsd@…

commit eeaa573717ddd7a575edc075d869a1dfaadc5ddf

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Mon Feb 27 13:39:50 2012 +0000

    slight tweak to help text (#5896)

 rts/RtsFlags.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Changed 15 months ago by marlowsd@…

commit b1bd566a40d3cfe3db51aa1399b293cdbceff185

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Mon Feb 27 13:17:40 2012 +0000

    Remove documentation that a feature was missing, because it is not. (#5896)

 docs/users_guide/using.xml |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

Changed 15 months ago by simonmar

Fixed. Ian, please merge these two:

commit eeaa573717ddd7a575edc075d869a1dfaadc5ddf

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Mon Feb 27 13:39:50 2012 +0000

    slight tweak to help text (#5896)

commit 151b0dcd4e16e28d76fbdceadeea7287b49b9e29

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Mon Feb 27 13:33:11 2012 +0000

    Mention -threaded in the intro to Concurrent Haskell
    
    And make the docs a bit more concrete.

When merging this patch, merge only the first hunk, not the second:

commit b1bd566a40d3cfe3db51aa1399b293cdbceff185

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Mon Feb 27 13:17:40 2012 +0000

    Remove documentation that a feature was missing, because it is not. (#5896)

Changed 15 months ago by simonmar

  • status changed from new to merge

Changed 15 months ago by pcapriotti

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

Merged as 30fc1dc9549e16d925a59cc79832b120c422b699, 9f19268b00513d46ac52e22f2a12591b489c61a0, c12841b4f8ee1a3cfa51a0bb9181fe4d61c5ecb2.

Note: See TracTickets for help on using tickets.