|
| 1 | + |
| 2 | +This is the location for common shell scripting tools for the CANDLE Supervisor Workflows. |
| 3 | + |
| 4 | +== Entry points |
| 5 | + |
| 6 | +Each CANDLE workflow is invoked with a shell script, typically called +site_workflow.sh+, where the +site+ is +theta+, +titan+, etc. In this document we will call this the workflow_sh script. |
| 7 | + |
| 8 | +=== Purpose |
| 9 | + |
| 10 | +The purpose of these scripts is: |
| 11 | + |
| 12 | +. Determining the run directory, which is the +TURBINE_OUTPUT+ directory used by Swift/T. |
| 13 | + |
| 14 | +. Set key environment variables for Python, R, etc. These include +PYTHONPATH+, +LD_LIBRARY_PATH+, etc. |
| 15 | + |
| 16 | +. Set key environment variables and Swift/T options for the system scheduler. These include +PROCS+, +WALLTIME+, +QUEUE+, +PROJECT+, etc. |
| 17 | + |
| 18 | +. Obtain application parameters and pass to the +swift-t+ command line. These are currently specified in a special section of the workflow_sh. These arguments are conventionally stored in a Bash variable +CMD_LINE_ARGS+, and passed to +swift-t+. |
| 19 | + |
| 20 | +. Record what happened. This involves writing additional logs into the TURBINE_OUTPUT directory, particularly to capture settings and provenance that Swift/T cannot. |
| 21 | + |
| 22 | +=== Future ideas |
| 23 | + |
| 24 | +Deduplication (https://github.com/ECP-CANDLE/Supervisor/issues/20[#20]). The current scripts flex the previously developed EMEWS templates, which make it easy to rapidly develop many workflows; additionally, they are highly linear, readable scripts. However, they duplicate a great deal of code, making Supervisor development more difficult. |
| 25 | + |
| 26 | +. Source reusable settings. |
| 27 | +.. Write key environment variables once for each system. E.g., https://github.com/ECP-CANDLE/Supervisor/blob/master/workflows/common/sh/langs-cori.sh[langs-cori.sh] |
| 28 | +.. Same for scheduler settings, module settings. |
| 29 | +. Create a new workflow_sh for each workflow. This script will take the +site+ as an argument and source the appropriate settings files. |
| 30 | +. Put application parameters in a separate file. This can be Bash-formatted for compatibility now, but may become something else. |
| 31 | +. Install EQ/Py, EQ/R from Git and put in a common location, maintained by Wozniak. |
| 32 | +. Test scripts. Each workflow directory will have a +test/+ subdirectory. This will contain enough bootstrapping code so that it can run and do something small without user configuration. This will build on the daily testing scripts that Brettin has started. |
| 33 | + |
| 34 | +== Other shell tools |
| 35 | + |
| 36 | +=== ML wrappers |
| 37 | + |
| 38 | +E.g., site_run_model.sh |
0 commit comments