Jupyter-Kale / kale

Jupyter Interactive Workflows for High Performance Computing
Other
15 stars 3 forks source link

Parsl bash #52

Open OliverEvans96 opened 6 years ago

OliverEvans96 commented 6 years ago

Add the ability to run Kale CommandLineTasks via Parsl. Bash and Python tasks can now be run seamlessly in the same workflow, and data can be passed between them (at least Bash -> Python. Python -> Bash probably doesn't work yet.)

I've chosen to use parsl's Python tasks and the subprocess module to execute kale CommandLineTasks in order to use parsl's AppFutures, which seem to be available only to Python tasks. Relying only on DataFutures from parsl bash tasks, it seems that dependencies can be communicated only through file existence, whereas I wanted to retain dependency based on process completion.

It is not yet possible to create a Kale CommandLineTask from a parsl bash task. Despite the previous paragraph, it should be straightforward to extract the data from a parsl bash task to create a kale CommandLineTask, but they will still be run as parsl python tasks upon execution, so data dependencies will be dropped.

See Parsl Bash.ipynb for a demo.