3.9. Setup Task Environment¶
Different applications come with different requirements for the runtime environment. This section describes how the shell environment for a task can be configured.
The task environment is defined via a Python dictionary, as part of the task description:
cud = rp.TaskDescription()
cud.executable = '/bin/echo'
cud.arguments = ['$RP_TASK_ID greets $TEST']
cud.environment = {'TEST' : 'jabberwocky'}
This makes the environment variable TEST available during task execution. Some other variables, such as the RP_TASK_ID above, are set by RP internally and are here used for demonstration.
3.9.1. Running the Example¶
08_task_environment.py.
uses the code above to run a bag of echo commands. Here its output:
3.9.2. What’s Next?¶
The next section describes how to configure a task to run as an MPI application.