dev [Promethee]

Development

Promethee environment is designed with many extensible features:

Computing code wrapping

In case your code is not supported, you can build your own wrapper.
The wrapper holds two components:
  • one for Promethee computing back-end side, used to support code execution on computing server,
  • the other on user front-end side to support for ergonomics issues with this code.

Back-end side wrapping

  1. The first step is to build a robust script to launch your code on the calculation server running Promethee daemon.
    This script will be called by Promethee daemon when any authorized Promethee front-end will ask for a calculation with this code.
    The script may hold these features:
    • environment variables setting needed for code running,
    • pre-processing of running directory, for instance create directory, move files insides, apply dos2unix command on input files,
    • post-processing of code output for easier parsing by Promethee (grep, awk, sed),
    • cleaning of directory after calculation is done to suppress big files,
    • support for efficient kill running calculation (in case the connected front-end ask for):
      • if your script creates a PID file, all integers written inside will be used as arguments for taskkill or kill -9 commands,
      • if your script creates a KILL.bat or KILL.sh file, it will be launched.
  2. [optional] create a .cplugin.jar back-end plugin to better support progress report or interaction,
  3. Once this script and “cplugin” is available and tested, you have to modify the Promethee daemon configuration in the calculator.xml file holding the list of codes and back-end, so it may look like this:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?> 
    <CALCULATOR spool="/tmp" >
         ...
         <CODE command="mycodescript.bat" name="MyCode" cplugin="file:MyCodePlugin.cplugin.jar" />
         ...
    </CALCULATOR>

Front-end side wrapping

Once the script is built and caculator.xml file is properly configured on back-end side, two levels of wrapping on GUI side are available:
    • simple user interface providing input ASCII dataset parametrization, colorizing, comment support, search, autocomplete …
    • simple script features to access ASCII code output (grep, cut, …)
    • estimated development effort: < 20 hours
  • extended code wrapping providing optionnal extensions:
    • extention of user interface input editor (graphical viewer)
    • optional sandbox and pre-loading of formulas to extend input modeling capabilities,
    • more flexible parsing of code output files (binary, XML, more complicated ASCII, …)
    • estimated development effort: < 100 hours

Algorithm plugin

If the algorithm you need is not supported, you can build your own wrapper. Two levels of wrapping are available:
  • extended algorithm wrapping providing optionnal extensions:
    • wrap any algorithm in any language ([R], Java, Scilab, Matlab, C++, …),
    • extended cntrol of suitability of algorithm (code input and output type),
    • estimated development effort: < 100 hours

Promethee API

Promethee (1.1) environment opens an API to allow external access to grid computing engine and algorithms. This API is for instance, used in the [R]/Promethee wrapper.Two main classes are available:
  • RunShell provides access to the grid computing resources, for a given code and (multiple) variable values. All calculations will be parallely queued in the Promethee grid. An instanciation just requires the name of the code to use, the input file(s) for this code, and the (vector of) variable values.
    JavaDoc
  • DesignShell provides access to the algorithms available in Promethee workbench. It is used through iterations of algorithm design calls, and terminates with an analysis of these iterations results.
    JavaDoc
© IRSN - All right reserved - Legal information