Building and running a simple example

Some simple examples are available in trunk/testing/pacml. Create a new environment variable called MULTIMLTON, that points to the multiMLton binary. For convenience, add


export MULTIMLTON=<multiMLtonRoot>/trunk/build/bin/mlton

to your .bashrc file. Here, <multiMLtonRoot> corresponds to the directory where multiMLton source can be found. A Makefile is provided for building the tests. A make without arguments builds all of the tests in the directory. Individual tests, say test1_parasite.sml, can be built by


make test1_parasite-amd64


This program can be run by invoking


./test1_parasite-amd64 @MLton number-processors 1 enable-timer 20000 --


Runtime options

New @MLton parameters have been added to multiMLton for controlling parallel execution.

  1. (1)number-processors <n> - number of processors to be used for running the program. Default is 1.

  2. (2)enable-timer <microsecs> - Timer interval in micro seconds. Timer is disabled by default.

    MultiMLton implementation provides an implementation of Asynchronous CML (ACML) for programming multicore systems. ACML is an extension of CML and provides lightweight threading, first class channels and composable asynchronous events. At its core, ACML uses a novel threading abstraction called parasitic threads. MultiMLton uses Spoonhower’s shared heap implementation for multicore MLton.

    MultiMLton is built upon base MLton release 20100608. Hence, if the parallel features of multiMLton are not used, MultiMLton should behave similar to single core MLton 20100608, except for a few unsupported features documented below.