[m-users.] mmc option parallel

Matthias G├╝demann matthias.guedemann at googlemail.com
Mon Mar 16 05:38:31 AEDT 2015

Hi all,

when I use the option '--parallel' for mmc, but did not explicitely
specify a parallel grade, the compilation fails with:

mercury_compile: error: the Mercury standard library cannot be found in grade asm_fast.par.gc.

This is unsuprising, as this grade is not installed (does is even

I fixed this locally by adding

    % The pthreads headers on some architectures (Solaris, Linux)
    % don't work with -ansi.
    option_implies(parallel, ansi_c, bool(no), !Globals),
->  option_implies(parallel, stack_segments, bool(yes), !Globals), <-

in handle_options.m for the convert_options_to_globals predicate. This
change seems to work with 14.01.1.

Yet, I am fully aware that this is the *wrong solution*. It adds 'stseg'
to any parallel grade, even for hlc.par, where is does not make any

I still think that selecting a valid parallel grade for asm_fast would
be a better idea than failing on compilation when specifying the
'parallel' option without explicit parallel grade. IIRC, I never had a
low-level parallel grade without '.stseg', therefore I propose adding
the 'stack_segments' option to parallel, low-level C target.

best regards

More information about the users mailing list