Tigres integration

GinFlow is integrated to the Tigres Library. It means that you can run your worflows expressed in Tigres using GinFlow transparently. The following section will guide you through the setup of the GinFlow-Tigres bridge.

Tigres

Tigres distribution and documentation are available in the following link : http://tigres.lbl.gov/documentation.

Note that the bridge has been developed for Tigres 0.1.0

GinFlow-Tigres bridge

Download the GinFlow-Tigres integration from the download page and install it in your python environment.

Test your installation

In this section we will test the bridge on a simple Tigres workflow. In the GinFlow-Tigres bridges you will find some examples under the tests directory.  We will first try to run a Tigres Workflow without GinFlow and with GinFlow.

Run a workflow without GinFlow

# Move to the test subdirectory of the GinFlow-Tigres integration
cd test/templates

# Execute the sequence example without GinFlow
python hello_world_sequence.py EXECUTION_LOCAL_THREAD

At this point, if you get any error please refer to the Tigres Documentation to fix your Tigres installation.

Run a workflow with GinFlow

# Move to the test subdirectory of the GinFlow-Tigres integration
cd test/templates

# Execute the sequence example with GinFlow
GINFLOW_PATH=[absolute path to GinFlow jar] python hello_world_sequence.py EXECUTION_LOCAL_THREAD

You should see some new traces to the screen, but the same final output as before.

Note that by default the workflow is run on GinFlow using the centralized executor.

Change the executor to SSH

In order to change the executor to SSH, change the “ginflow.yaml” file provided accordingly to your local machine configuration. The executor is then specified using another environment variable :

# Execute the sequence example with GinFlow
GINFLOW_PATH=[absolute path to GinFlow jar] EXECUTOR=ssh python hello_world_sequence.py EXECUTION_LOCAL_THREAD

How is it working ?

If you open one of the example file, you will see in the beginning :

# Enable execution Ginflow at the template level
if os.environ.get('GINFLOW_PATH') != None:
  import hoclwms_tigres.override

The purpose of the code is to load some functions of the GinFlow-Tigres bridge if the GINFLOW_PATH is set. These functions will override the default behaviour of Tigres and send the template executions to GinFlow.

Comments are closed.