Skip to content

Commit c32481c

Browse files
committed
rfc26: break up into sections
Problem: rfc26 is focused primarily on OpenMP style dependencies. Add a section that describes the generalized representation, for jobspec and for command lines. Move OpenMP style dependencies to its own section, leaving its descriptions and examples intact except for small changes.
1 parent 2474c95 commit c32481c

File tree

1 file changed

+79
-41
lines changed

1 file changed

+79
-41
lines changed

spec_26.rst

Lines changed: 79 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,91 @@ service outside of the job manager; for example, a separate broker module
6565
or an entity that is not part of Flux.
6666

6767

68-
Job Dependency Definition
68+
Representation
69+
--------------
70+
71+
A job dependency SHALL be represented as a JSON object with the following
72+
REQUIRED keys:
73+
74+
scheme
75+
(string) name of the dependency scheme
76+
77+
value
78+
(string) semantics determined by the scheme.
79+
80+
A dependency object MAY contain additional OPTIONAL keys-value pairs,
81+
whose semantics are determined by the scheme.
82+
83+
in jobspec
84+
~~~~~~~~~~
85+
86+
Each dependency requested by the user SHALL be represented as an element in
87+
the jobspec ``attributes.system.dependencies`` array. Each element SHALL
88+
conform to the object definition above.
89+
90+
If job requests no dependencies, the key ``attributes.system.dependencies``
91+
SHALL NOT be added to the jobspec.
92+
93+
on command line
94+
~~~~~~~~~~~~~~~
95+
96+
On the command line, a job dependency MAY be expressed in a compact, URI-like
97+
form, with the first OPTIONAL key-value pair represented as a URI query
98+
string, and additional OPTIONAL key-value pairs represented as URI query
99+
options (``&`` or ``;`` delimited):
100+
101+
::
102+
103+
scheme:value[?key=val[&key=val...]]
104+
105+
Examples:
106+
107+
- ``afterany:ƒ2oLkTLb``
108+
- ``string:foo?type=out``
109+
- ``fluid:hungry-hippos-white-elephant``
110+
111+
This form SHOULD be translated by the command line tool to the object
112+
form above before being shared with other parts of the system.
113+
114+
115+
OpenMP-style Dependencies
69116
-------------------------
70117

71-
A dependency SHALL be a dictionary containing the following keys (whose
72-
definitions are detailed in the sections below):
118+
The ``string`` and ``fluid`` schemes are reserved for more sophisticated
119+
symbolic and jobid based dependencies, inspired by the OpenMP specification.
120+
121+
string
122+
~~~~~~
123+
124+
``value`` SHALL be interpreted as a symbolic dependency name.
73125

74-
- **type**
75-
- **scope**
76-
- **scheme**
77-
- **value**
126+
In addition, the following keys are REQUIRED for this scheme:
127+
128+
type
129+
(string) ``in``, ``out``, or ``inout`` as described below.
130+
131+
scope
132+
(string) ``user`` or ``global`` as described below.
133+
134+
fluid
135+
~~~~~
136+
137+
``value`` SHALL be interpreted as a jobid, in any valid FLUID encoding from
138+
RFC 19.
139+
140+
type
141+
(string) ``in``, ``out``, or ``inout`` as described below.
142+
143+
scope
144+
(string) ``user`` or ``global`` as described below.
145+
146+
A dependency of this ``scheme`` with a ``type`` of ``out`` SHALL be generated
147+
automatically for every job when OpenMP-style dependencies are active.
78148

79149
Type
80150
~~~~
81151

82-
The value of the ``type`` key SHALL be one of the following (the semantics of
83-
which are inspired by the OpenMP specification):
152+
The value of the ``type`` key SHALL be one of the following:
84153

85154
- **out** This key only affects future submitted jobs. If the value of this key
86155
is the same as the value in an ``in`` or ``inout`` dependency of a future
@@ -110,40 +179,9 @@ The value of the ``scope`` key SHALL be one of the following:
110179
of any type within this scope. A non-instance owner can only create a
111180
dependency with the type ``in`` within this scope.
112181

113-
Scheme
114-
~~~~~~
115-
116-
The value of the ``scheme`` key SHALL be a string. Valid values MAY be but are
117-
not limited to the following:
118-
119-
- **string** The ``value`` is to be interpreted as a string literal.
120-
121-
- **fluid** The ``value`` is to be interpreted as a Flux Locally Unique ID. A
122-
dependency of this ``scheme`` with a ``type`` of ``out`` SHALL be generated
123-
automatically for every job by the job dependency system.
124-
125-
Value
126-
~~~~~
127-
128-
The value of the ``value`` key SHALL be a string, whose semantics are
129-
determined by the ``scheme``.
130-
131-
Shorthand
132-
---------
133-
134-
For convenience at the command line, dependencies MAY be formatted as a
135-
`Uniform Resource Identifier (URI) <https://tools.ietf.org/html/rfc3986>`__ and
136-
then expanded into the dictionary format described above. It is left up to each
137-
implementation as to which URIs to support, the URIs' semantics, default values,
138-
and what to do when an unsupported URI is encountered. Some example URIs
139-
include:
140-
141-
- ``string:foo``
142-
- ``string:foo?type=out``
143-
- ``fluid:hungry-hippos-white-elephant``
144182

145183
Examples
146-
--------
184+
~~~~~~~~
147185

148186
Under the description above, the following are examples of fully compliant
149187
dependency declarations.

0 commit comments

Comments
 (0)