The OpenMOLE Language

Contents

The OpenMOLE console language is an extension of the Scala language designed for distributed computing. It supports all the scala constructs and additional operators and classes especially designed to compose workflows. OpenMOLE workflows expose explicit parallel aspect of the workload that can be delegated to distributed computing environments in a transparent manner. The philosophy of OpenMOLE is test small (on your computer) and scale for free (on remote distributed computing environments).

A good way to get a first glimpse at what OpenMOLE can do is to read this research paper.

OpenMOLE scripts 🔗

The OpenMOLE scripts are stored in the GUI in .oms files. They can eventually be split into several different files. To import the content of an .oms file (let say MyExp.oms) in a given .oms file located in the same directory:
import _file_.MyExp._
To refer to an .oms in a parent directory, use the parent keyword:
import _parent_._file_.MyExp._

Basic scala constructs 🔗

You need only a very basic understanding of the scala language in order to design OpenMOLE workflows.
val a = 1 // declares a variable a of type Int
val b = "Text" // declares a variable a of type String
val c = if(condition) 5 else 10 // declare a variable c of type Int, the value of c depends on the condition

Construct objects 🔗

OpenMOLE takes advantage of the object oriented aspect of scala. It proposes a set of objects that you can build and assemble together to specify your workflow. In general, an object is instantiated using the "new" keyword:
val f = new File("/tmp/file.txt")

In OpenMOLE we have choosen to use factories instead of directly constructing objects, that's why most of the OpenMOLE scripts doesn't contain the "new" keyword at all.

For instance: val l = File("/tmp/file.txt")

Under the hood, it calls a method that is in charge of building the file.")

Named parameters 🔗

Functions calls generally require the parameters to be provided in a predefined order. In scala you can get rid of this ordering constraint by using named parameters. OpenMOLE scripts will often make use of this pattern:
val t = SomeClass(value1, value2, otherParam = otherValue)

It means that value1 and value2 are the values for the first two parameters and that the parameter named otherParam is set to the value otherValue. Unspecified parameters are set to their default value.

Going further 🔗

What you have read so far should be sufficient in order to get started with OpenMOLE. To begin with the OpenMOLE syntax you should have a look at the Getting started. You may also want to look at the Task documentation and other h2ions detailing specific concepts.

Scala is a very nice language with an extensive very well designed standard library. To get more insights on this language, check these links:

API documentation 🔗

You can browse OpenMOLE's automatically generated documentation