[m-users.] Parallel Mercury

Paul Bone paul at bone.id.au
Tue Nov 29 11:09:34 AEDT 2016


On Mon, Nov 28, 2016 at 07:03:29PM -0200, Eduardo Costa wrote:
> Well, I discovered the problem. I need to compile the program with:
> 
> mmc --parallel -j4 --grade=asm_fast.par.gc fibgc.m -o fib.x

I was just about to offer this suggestion.  The & parallel conjunction
operator is only supported in low level C parallel grades.

I also suggest adding stseg to your grade string, this enables segmented
stacks and can improve performance for many programs, it may degrade
performance for some programs, but only by a small amount.

The --parallel option and the par grade component mean the same thing (this
may change in the future).  If you give a --grade option, you should avoid
giving --parallel or --high-level-code options as they could conflict.

the --make option also gives you an easier way to build your programs.
Simply:

    $ mmc --make --grade=asm_fast.gc.par.stseg -O3 fibgc

Should give you good results.

> Now, Mercury goes faster than C, as before. Thank you, anyway.

No problem.


-- 
Paul Bone
http://paul.bone.id.au


More information about the users mailing list