|
361 | 361 | documented for specific fields elsewhere in this specification. If
|
362 | 362 | a contextual value of 'self' is not documented for a field, it
|
363 | 363 | must be 'null'.
|
364 |
| - * `runtime`: An object containing configuration specific to the Process |
365 |
| - type. Values include `tmpdir`, `outdir`, and values associated with |
366 |
| - [ResourceRequirement](#resourcerequirement). |
367 |
| - Other fields under `runtime` are listed elsewhere in this document. |
| 364 | + * `runtime`: An object containing configuration details. Specific to the |
| 365 | + [Process](#process) type. An implementation may provide may provide |
| 366 | + opaque strings for any or all fields of `runtime`. These must be |
| 367 | + filled in by the platform after processing the Tool but before actual |
| 368 | + execution. Parameter references and expressions may only use the |
| 369 | + literal string value of the field and must not perform computation on |
| 370 | + the contents. |
368 | 371 |
|
369 | 372 | If the value of a field has no leading or trailing non-whitespace
|
370 | 373 | characters around a parameter reference, the effective value of the field
|
|
1429 | 1432 | All files listed in the input object must be made available in the runtime
|
1430 | 1433 | environment. The implementation may use a shared or distributed file
|
1431 | 1434 | system or transfer files via explicit download. Implementations may choose
|
1432 |
| - not to provide access to files not explicitly specified by the input object |
| 1435 | + not to provide access to files not explicitly specified in the input object |
1433 | 1436 | or process requirements.
|
1434 | 1437 |
|
1435 | 1438 | Output files produced by tool execution must be written to the **designated
|
1436 |
| - output directory**. |
1437 |
| -
|
1438 |
| - The initial current working directory when executing the tool must be the |
1439 |
| - designated output directory. |
1440 |
| -
|
1441 |
| - When executing the tool, the child process must not inherit environment |
1442 |
| - variables from the parent process. The tool must execute in a new, empty |
1443 |
| - environment, containing only environment variables defined by |
1444 |
| - [EnvVarRequirement](#envvarrequirement), the default environment of the |
1445 |
| - Docker container specified in [DockerRequirement](#dockerrequirement) (if |
1446 |
| - applicable), and `TMPDIR`. |
1447 |
| -
|
1448 |
| - The `TMPDIR` environment variable must be set in the runtime environment to |
1449 |
| - the **designated temporary directory**. Any files written to the |
1450 |
| - designated temporary directory may be deleted by the workflow platform when |
1451 |
| - the tool invocation is complete. |
| 1439 | + output directory**. The initial current working directory when executing |
| 1440 | + the tool must be the designated output directory. |
| 1441 | +
|
| 1442 | + Files may also be written to the **designated temporary directory**. Any |
| 1443 | + files written to the designated temporary directory may be deleted by the |
| 1444 | + workflow platform immediately after the tool terminates. |
| 1445 | +
|
| 1446 | + When executing the tool, the tool must execute in a new, empty environment |
| 1447 | + with only the environment variables described below; the child process must |
| 1448 | + not inherit environment variables from the parent process except where |
| 1449 | + specified or at user option. |
| 1450 | +
|
| 1451 | + * `HOME` must be set to the designated output directory. |
| 1452 | + * `TMPDIR` must be set to the designated temporary directory. |
| 1453 | + when the tool invocation and output collection is complete. |
| 1454 | + * `PATH` may be inherited from the parent process, except when run in a |
| 1455 | + container that provides its own `PATH`. |
| 1456 | + * Variables defined by [EnvVarRequirement](#envvarrequirement) |
| 1457 | + * The default environment of the container, such as when using |
| 1458 | + [DockerRequirement](#dockerrequirement) |
1452 | 1459 |
|
1453 | 1460 | An implementation may forbid the tool from writing to any location in the
|
1454 | 1461 | runtime environment file system other than the designated temporary
|
1455 | 1462 | directory and designated output directory. An implementation may provide
|
1456 |
| - read-only input files, and disallow in-place update of input files. |
| 1463 | + read-only input files, and disallow in-place update of input files. The |
| 1464 | + designated temporary directory and designated output directory may reside |
| 1465 | + on different mount points on different file systems. |
| 1466 | +
|
| 1467 | + The `runtime` section available in [parameter references](#parameterreferences) |
| 1468 | + and [expressions](#expressions) contains the following fields. As noted |
| 1469 | + earlier, an implementation may perform deferred resolution of runtime fields by providing |
| 1470 | + opaque strings for any or all of the following fields; parameter references |
| 1471 | + and expressions may only use the literal string value of the field and must |
| 1472 | + not perform computation on the contents. |
| 1473 | +
|
| 1474 | + * `runtime.outdir`: an absolute path to the designated output directory |
| 1475 | + * `runtime.tmpdir`: an absolute path to the designated temporary directory |
| 1476 | + * `runtime.cores`: number of CPU cores reserved for the tool process |
| 1477 | + * `runtime.ram`: amount of RAM in mebibytes (2**20) reserved for the tool process |
| 1478 | + * `runtime.outdirSize`: reserved storage space available in the designated output directory |
| 1479 | + * `runtime.tmpdirSize`: reserved storage space available in the designated temporary directory |
| 1480 | +
|
| 1481 | + See [ResourceRequirement](#resourcerequirement) for details on how to |
| 1482 | + describe the hardware resources required by a tool. |
1457 | 1483 |
|
1458 | 1484 | The standard input stream and standard output stream may be redirected as
|
1459 | 1485 | described in the `stdin` and `stdout` fields.
|
1460 | 1486 |
|
1461 | 1487 | ## Extensions
|
1462 | 1488 |
|
1463 | 1489 | [DockerRequirement](#dockerrequirement),
|
1464 |
| - [CreateFileRequirement](#createfilerequirement), and |
1465 |
| - [EnvVarRequirement](#envvarrequirement) are available as standard |
| 1490 | + [CreateFileRequirement](#createfilerequirement), |
| 1491 | + [EnvVarRequirement](#envvarrequirement), |
| 1492 | + [ShellCommandRequirement](#shellcommandrequirement), and |
| 1493 | + [ResourceRequirement](#resourcerequirement) are available as standard |
1466 | 1494 | extensions to core command line tool semantics for defining the runtime
|
1467 | 1495 | environment.
|
1468 | 1496 |
|
|
2083 | 2111 | contains `shellQuote: false`. If `shellQuote: false` is specified, the
|
2084 | 2112 | argument is joined into the command string without quoting, which allows
|
2085 | 2113 | the use of shell metacharacters such as `|` for pipes.
|
| 2114 | +
|
| 2115 | +
|
| 2116 | +- type: record |
| 2117 | + name: ResourceRequirement |
| 2118 | + extends: "#ProcessRequirement" |
| 2119 | + doc: | |
| 2120 | + Specify basic hardware resource requirements. |
| 2121 | +
|
| 2122 | + "min" is the minimum amount of a resource that must be reserved to schedule |
| 2123 | + a job. If "min" cannot be satisfied, the job should not be run. |
| 2124 | +
|
| 2125 | + "max" is the maximum amount of a resource that the job shall be permitted |
| 2126 | + to use. If a node has sufficient resources, multiple jobs may be scheduled |
| 2127 | + on a single node provided each job's "max" resource requirements are |
| 2128 | + met. If a job attempts to exceed its "max" resource allocation, an |
| 2129 | + implementation may deny additional resources, which may result in job |
| 2130 | + failure. |
| 2131 | +
|
| 2132 | + If "min" is specified but "max" is not, then "max" == "min" |
| 2133 | + If "max" is specified by "min" is not, then "min" == "max". |
| 2134 | +
|
| 2135 | + It is an error if max < min. |
| 2136 | +
|
| 2137 | + It is an error if the value of any of these fields is negative. |
| 2138 | +
|
| 2139 | + If neither "min" nor "max" is specified for a resource, an implementation may provide a default. |
| 2140 | +
|
| 2141 | + fields: |
| 2142 | + - name: coresMin |
| 2143 | + type: ["null", long, string, "#Expression"] |
| 2144 | + doc: Minimum reserved number of CPU cores |
| 2145 | + |
| 2146 | + - name: coresMax |
| 2147 | + type: ["null", int, string, "#Expression"] |
| 2148 | + doc: Maximum reserved number of CPU cores |
| 2149 | + |
| 2150 | + - name: ramMin |
| 2151 | + type: ["null", long, string, "#Expression"] |
| 2152 | + doc: Minimum reserved RAM in mebibytes (2**20) |
| 2153 | + |
| 2154 | + - name: ramMax |
| 2155 | + type: ["null", long, string, "#Expression"] |
| 2156 | + doc: Maximum reserved RAM in mebibytes (2**20) |
| 2157 | + |
| 2158 | + - name: tmpdirMin |
| 2159 | + type: ["null", long, string, "#Expression"] |
| 2160 | + doc: Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) |
| 2161 | + |
| 2162 | + - name: tmpdirMax |
| 2163 | + type: ["null", long, string, "#Expression"] |
| 2164 | + doc: Maximum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) |
| 2165 | + |
| 2166 | + - name: outdirMin |
| 2167 | + type: ["null", long, string, "#Expression"] |
| 2168 | + doc: Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) |
| 2169 | + |
| 2170 | + - name: outdirMax |
| 2171 | + type: ["null", long, string, "#Expression"] |
| 2172 | + doc: Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) |
0 commit comments