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

feat: grow support for fluxion #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 11 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz && tar -xvf go${G
mv go /usr/local && rm go${GO_VERSION}.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin:/home/vscode/go/bin

RUN git clone https://github.com/flux-framework/flux-sched /opt/flux-sched
# Testing grow/shrink from custom branch
RUN git clone -b debug-resource-error-messages https://github.com/researchapps/flux-sched /opt/flux-sched
# RUN git clone https://github.com/flux-framework/flux-sched /opt/flux-sched

# We also need to rebuild into the system install
# TODO remove this when it is added to production container
ENV FLUX_SCHED_VERSION=0.39.0
RUN cd /opt/flux-sched && \
cmake -B build && \
make -C build && \
make -C build install

# Add the group and user that match our ids
RUN groupadd -g ${USER_GID} ${USERNAME} && \
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
HERE ?= $(shell pwd)
LOCALBIN ?= $(shell pwd)/bin
JGF ?= $(HERE)/cmd/test/data/tiny.json
GROWJGF ?= $(HERE)/cmd/test/data/grow/new-nodes.json
JOBSPECS ?= $(HERE)/cmd/test/data/jobspecs

# This assumes a build in the .devcontainer Dockerfile environment
Expand All @@ -27,8 +28,8 @@ test-modules:
go test -v ./pkg/types

.PHONY: test-binary
test-binary:
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LOCALBIN)/test --jgf=$(JGF) --jobspec=$(JOBSPECS)/test001.yaml
test-binary: build
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LOCALBIN)/test --jgf=$(JGF) --grow=$(GROWJGF) --jobspec=$(JOBSPECS)

# test001_desc="match allocate 1 slot: 1 socket: 1 core (pol=default)"
# test_expect_success "${test001_desc}" '
Expand Down
97 changes: 97 additions & 0 deletions cmd/test/data/grow/new-nodes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"graph": {
"nodes": [
{
"id": "0",
"metadata": {
"type": "cluster",
"basename": "tiny",
"name": "tiny0",
"id": 0,
"uniq_id": 0,
"rank": -1,
"exclusive": false,
"unit": "",
"size": 1,
"paths": {
"containment": "/tiny0"
}
}
},
{
"id": "1",
"metadata": {
"type": "rack",
"basename": "rack",
"name": "rack0",
"id": 0,
"uniq_id": 1,
"rank": -1,
"exclusive": false,
"unit": "",
"size": 1,
"paths": {
"containment": "/tiny0/rack0"
}
}
},
{
"id": "100",
"metadata": {
"type": "node",
"basename": "node",
"name": "node2",
"id": 100,
"uniq_id": 100,
"rank": -1,
"exclusive": false,
"unit": "",
"size": 1,
"paths": {
"containment": "/tiny0/rack0/node2"
}
}
},
{
"id": "101",
"metadata": {
"type": "node",
"basename": "node",
"name": "node3",
"id": 101,
"uniq_id": 101,
"rank": -1,
"exclusive": false,
"unit": "",
"size": 1,
"paths": {
"containment": "/tiny0/rack0/node3"
}
}
}
],
"edges": [
{
"source": "0",
"target": "1",
"metadata": {
"subsystem": "containment"
}
},
{
"source": "1",
"target": "100",
"metadata": {
"subsystem": "containment"
}
},
{
"source": "1",
"target": "101",
"metadata": {
"subsystem": "containment"
}
}
]
}
}
21 changes: 21 additions & 0 deletions cmd/test/data/jobspecs/grow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 9999
resources:
- type: cluster
count: 1
with:
- type: rack
count: 1
with:
- type: node
count: 4

# a comment
attributes:
system:
duration: 3600
tasks:
- command: [ "app" ]
slot: default
count:
per_slot: 1

Loading
Loading