[m-rev.] diff: fix unintuitive option behavior

Paul Bone pbone at csse.unimelb.edu.au
Thu Jan 27 11:42:39 AEDT 2011


On Wed, Jan 26, 2011 at 02:14:45PM +1100, Zoltan Somogyi wrote:
> compiler/options.m:
> 	Change the options controlling implicit parallelism from being
> 	optimization options, which are reset to default values every time
> 	you specify -ON, to misc options, which are not.
> 
> doc/user_guide.text:
> 	Document the above.
> 
> 	Comment out the documentation of an option that does not (yet) exist.
> 
> Zoltan.
> 
> @@ -9379,10 +9351,38 @@
>  the typechecker will not process the predicate or function any further.
>  
>  @sp 1
> + at item --control-granularity
> + at findex --control-granularity
> +Don't try to generate more parallelism than the machine can handle,
> +which may be specified at runtime or detected automatically.
> +(see the @samp{-P} option in the @samp{MERCURY_OPTIONS} environment variable.)
> +
> + at sp 1
> + at item --distance-granularity @var{distance_value}
> + at findex --distance-granularity
> +Control the granularity of parallel execution
> +using the specified distance value.
> +
> + at c Maybe this options *should* exist, but at the moment, it doesn't.
> + at c @sp 1
> + at c @item --parallelism-target @var{num_cpus}
> + at c @findex --parallelism-target
> + at c Specifies the number of CPUs of the target machine,
> + at c for use by --control-granularity option.
> +

Control granularity is controlled by a runtime option.  --parallelism-target
doesn't make sense for it because it can be controlled at runtime and
auto-detected by the number of processors the OS thinks exist (or -P )

It probably does make sense for distance granularity.  It's been a while since
I read about distance granularity so I've forgotten the more specific details.

(Nothing needs to change in this patch, just a comment for what we might do in
the future).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20110127/490e7377/attachment.sig>


More information about the reviews mailing list