The OpenMOLE Language
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:
To refer to an .oms in a parent directory, use the parent keyword:
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.