Most of the time, model code is not designed to be portable. For now, OpenMOLE handles Java, Scala, NetLogo and R (in the near future) via specific Tasks, but it is still far from covering the languages used to develop models around the world.

Meanwhile, you have to package your code using CARE, as explained in the Native Packaging section. The following contents expose how to handle your packaged model within OpenMOLE.

Notice the lines in between the CARE info messages: these are the log messages of our initial code. Everything is ok so far.
The packaging has created two files: cpp.tgz.bin and results.txt, respectively the CARE archive and the results file.

Running it in OpenMOLE

We will now use OpenMOLE's ExplorationTask to run the model several times with different input values, with this script:

The results files, called something like cpp2.01.0.txt, are located in the directory where we uploaded our CARE packaged code.

This is not a smart move if you have a lot of file to manage, so we should put them in a result dedicated directory, in order to compress the whole thing at the end of the experiment and download the resulting archive.
To do that, let's replace the CopyFileHook line by the following: