Propose a modification to the current page

Getting started with OpenMOLE

The big picture

When you build a model, you need to understand the behavior of your parameters in order to know their effect on your model's dynamics and optimize them. OpenMOLE has been built for that!

To summarize, you can design a large scale model exploration reusing legacy code and advanced numeric methods in approximately 10 minutes.

Try it !

You can try OpenMOLE online using the OpenMOLE demonstration website.

Install it !

OpenMOLE requires Java version 8 or above to be set as default on your computer. To make sure of that you can check our FAQ.
Then just extract the archive, available here, somewhere and you're done! OpenMOLE is installed and works out of the box!

Once installed, you can launch OpenMOLE by executing the openmole file in the installation directory (it is called openmole.bat for windozers). It will bring up you web browser. OpenMOLE supports Chrome and Firefox. If you are using another default web browser, please copy paste the OpenMOLE url (http://localhost:port) in one of these browsers.

You should see something like this :

Launching parameters

OpenMOLE proposes several launching options. Execute openmole -h to list all the available options.

OpenMOLE Editor on remote machine

To run OpenMOLE on a remote machine using a web browser, you should run: openmole --remote --port portnumber. On the first run you'll be asked to set a password, then you can remotely connect to OpenMOLE using the url https://remotemachine:portnumber - https:// is important. When you connect you'll be prompted for the password you've entered previously.

OpenMOLE Headless mode

OpenMOLE proposes a headless mode for running scripts. You can enable it thanks to the -s option: ./openmole -s /path/to/you/mole/script
In that case OpenMOLE still asks for your preferences cyphering password. To provide it at launch time use the -pw option: ./openmole -s /path/to/your/mole/script --password password. A better practice is to write this password in a file readable by OpenMOLE only and use ./openmole -s /path/to/your/mole/script --password-file password.txt.

Your first exploration

Let's explore one variable (i.e. iterate within its domain), multiply it by 2 and then display each result. The computation is executed in a multi-threaded environment on the local machine.
In the OpenMOLE interface, first create a file named example.oms (the file extension matters). Open it and write the following:
// Define the variables that are transmitted between the tasks
val i = Val[Double]
val res = Val[Double]

// Define the model, here it is a simple task executing "res = i * 2", but it can be your model
val model =
  ScalaTask("val res = i * 2") set (
    inputs += i,
    outputs += (i, res)

// Define the execution environment, here it is a local execution environment with 4 threads but
// it could be a remote cluster or a grid. The exploration will work the same way whatever the environment
// and no installation step is required on the execution environment.
val env = LocalEnvironment(4)

// Define the design of experiment
  evaluation = model on env hook ToStringHook(),
  sampling = i in (0.0 to 100.0 by 1.0)

You can run it by clicking on the execution button (see the GUI guide).

To distribute the exact same execution to a remote cluster, just switch the environment definition. The only configuration step required for this to work is to have an account on the cluster, and to provide your authentication to OpenMOLE. Configuring authentications is explained in the section dedicated to each environment.
val env = SLURMEnvironment("myLogin", "")

  evaluation = model on env hook ToStringHook() on env,
  sampling = i in (0.0 to 100.0 by 1.0)

Unleash the power of the MOLE

This was just a tiny bit of what OpenMOLE can achieve! Now you might want to discover how to:

Get help

To get help you are more than welcome to contact the OpenMOLE user mailing list. To do so, you should subscribe here, and then you can post your question to the list users. We're also present on the #openmole channel of the ISC-PIF's RocketChat.