Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC31: Jobspec V2 #229

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SOURCEDIR = .
BUILDDIR = _build

# YAML Validation on these directories
SCHEMA_DIRS=data/spec_26 data/spec_14
SCHEMA_DIRS=data/spec_31 data/spec_26 data/spec_14

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Table of Contents
- [27/Flux Resource Allocation Protocol Version 1](spec_27.rst)
- [29/Hostlist Format](spec_29.rst)
- [30/Job Urgency](spec_30.rst)
- [31/Job Specification Version 2](spec_31.rst)

Build Instructions
------------------
Expand Down
2 changes: 1 addition & 1 deletion data/spec_31/example1.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1
version: 2
resources:
- type: node
count: 4
Expand Down
28 changes: 21 additions & 7 deletions data/spec_31/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://github.com/flux-framework/rfc/tree/master/data/spec_14/schema.json",
"title": "canonical-jobspec",
"$id": "http://github.com/flux-framework/rfc/tree/master/data/spec_31/schema.json",
"title": "jobspec-02",

"description": "Flux canonical jobspec",
"description": "Flux jobspec version 2",

"definitions": {
"complex_range": {
Expand Down Expand Up @@ -38,7 +38,9 @@
"exclusive": { "type": "boolean" },
"with": {
"type": "array",
"items": { "$ref": "#/definitions/resource_vertex" }
"items": { "$ref": "#/definitions/resource_vertex" },
"minItems": 1,
"maxItems": 2
},
"id": { "type": "string" },
"unit": { "type": "string" },
Expand All @@ -64,7 +66,7 @@
{ "$ref": "#/definitions/resource_vertex_base" },
{
"properties": {
"type": { "not": { "enum": ["slot"] } }
"type": { "enum": ["node", "gpu", "core"] }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to expand this list of valid types.

}
}
]
Expand All @@ -82,12 +84,14 @@
"properties": {
"version": {
"description": "the jobspec version",
"type": "integer"
"type": "integer",
"enum": [2]
},
"resources": {
"description": "requested resources",
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": { "$ref": "#/definitions/resource_vertex" }
},
"attributes": {
Expand Down Expand Up @@ -128,7 +132,17 @@
"type": "object",
"properties": {
"per_slot": { "type": "integer", "minimum" : 1 },
"total": { "type": "integer", "minimum" : 1 }
"total": { "type": "integer", "minimum" : 1 },
"per_resource": { "type": "object",
"required": ["type", "count"],
"properties": {
"type": {"type": "string"},
"count": {
"type": "integer",
"mininum" : 1
}
}
}
}
},
"distribution": { "type": "string" },
Expand Down
2 changes: 1 addition & 1 deletion data/spec_31/use_case_1.1.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1
version: 2
resources:
- type: node
count: 4
Expand Down
22 changes: 22 additions & 0 deletions data/spec_31/use_case_1.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
resources:
- type: slot
count: 4
label: default
with:
- type: node
count: 1
with:
- type: core
count: 1
tasks:
- command: [ "flux", "start" ]
slot: default
count:
per_slot: 1
attributes:
system:
duration: 3600.
cwd: "/home/flux"
environment:
HOME: "/home/flux"
24 changes: 24 additions & 0 deletions data/spec_31/use_case_1.3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
resources:
- type: slot
count: 1
label: default
with:
- type: node
count: {min: 1}
with:
- type: core
count: 120
tasks:
- command: [ "flux", "start" ]
slot: default
count:
per_resource:
type: node
count: 1
attributes:
system:
duration: 3600.
cwd: "/home/flux"
environment:
HOME: "/home/flux"
2 changes: 1 addition & 1 deletion data/spec_31/use_case_2.1.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1
version: 2
resources:
- type: node
count: 4
Expand Down
2 changes: 1 addition & 1 deletion data/spec_31/use_case_2.2.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1
version: 2
resources:
- type: slot
label: default
Expand Down
2 changes: 1 addition & 1 deletion data/spec_31/use_case_2.3.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1
version: 2
resources:
- type: slot
count: 10
Expand Down
2 changes: 1 addition & 1 deletion data/spec_31/use_case_2.4.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1
version: 2
resources:
- type: node
count: 4
Expand Down
2 changes: 1 addition & 1 deletion data/spec_31/use_case_2.5.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 999
version: 2
resources:
- type: slot
count: 1
Expand Down
8 changes: 8 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ This specification describes the Flux implementation of the Hostlist Format

This specification describes the Flux job urgency parameter.

:doc:`31/Job Specification Version 2 <spec_31>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Version 2 of the domain specific job specification language canonically defined
in RFC14.


.. Each file must appear in a toctree
.. toctree::
:hidden:
Expand Down Expand Up @@ -241,3 +248,4 @@ This specification describes the Flux job urgency parameter.
spec_27
spec_29
spec_30
spec_31
Loading