Getting started with OpenMOLE


Romain Reuillon, Mathieu Leclaire
Institut des Systémes Complexes, Paris Île de France

Java7 installation

Linux

Get it from prebuilt OpenJDK packages // details

Windows & Mac

OpenMOLE installation

Getting started

Create a new Groovy Task

Name it javaTask and click on create

Set the pi.jar path in the library tab

Input the command line with a string seed

Create the seed Prototype (Int): click on > prototype from the Groovy Task panel

Create the pi Prototype (Double): click on > prototype from the Groovy Task panel

Set seed as input and pi as output of the Task from the Inputs / Outputs tab

Set a value for seed

The icon turn from white to green (the value is valid)

Close all the open panels

Add the Task on the Scene (right click on the scene)

Create a Display Hook (for displaying the output)

Call it disp, add the pi Prototype (with the + button) and click on create

Add the previously created Hook to the Task by
  • clicking on the right circle of the Task and
  • selecting the disp Hook in the Capsule panel

A blue circle appears on the right circle (meaning that at least one Hook is set)

Build the Mole

Click on start

Create now a new Exploration Task

Name it explore and click on create

Click on sampling.
A new Sampling Compositon shows up and name it replication

Right click on the Sampling scene and add a new Domain.

Click on the domain box that appears: a panel for the domain configuration shows up

Set the Type to Int and the maximum value to 10000 and close this panel.

1) Create a connection from the Domain box the Final stone (Shift + drag)

2) Click on the ? and select the Prototype seed to make it vary on this range

The Prototype seed now varies on [0; 10000]

Select the replication Sampling on the explore Task

Add the explore Task on the Scene and set it as Starting Capsule (right click on it)

Draw a Transition between the explore Task to the input slot of the java Task (Shift + drag)

Build and start the Mole again.
The javaTask is now executed 10000 times.

Create a Multi-thread environment to share the JavaTask execution on several threads

Click on the environment link on the JavaTask (grey cross) and set the threads environment.

The grey cross turns to the green label of the multi-thread environment.

Build and run the Mole again.
A a new environment panel appears...

Create a new Task (of type Average) to compute a mean value of pi.

Set the computation on an Array of pi values (automatically generated) and store it into the Prototype pi

Name the Task meani> and close it

Add the mean Task on the Scene

Connect the javaTask with the meanTask: the workflow is in error ...

[WARNING] Wrong type received at Slot hash of mean, data pi: Array[Double] is expected but pi: double is provided

[WARNING] Wrong type received at Slot hash of mean, data pi: Array[Double] is expected but pi: double is provided

Solution: the data have to be aggregated before the mean Task ...

Right click on the transition between the javaTask and the mean Task and turns it out to Aggregation

The workflow is no longer in error: thanks to the Aggregation transition, an Array of pi values is produced to the mean Task as expected

- Add the display hook on the mean Task to see the computede pi mean value

- Remove the display hook on the java Task to avoid the display of intermediate pi computation values

Build again and rerun the workflow: we obtain a mean value for pi

Desktop Grid daemon installation