Skip to content

config for combined working and mock experiment #5295

@vsoch

Description

@vsoch

To follow up to the discussion started here:

flux-framework/flux-sched#1009 (comment)

I'm trying to get it working to be able to run a batch job that has a combination of working (real) nodes and some that are mocked (don't work). We will eventually want the nodes that are mocked to not accept jobs, period, but that is a next step. Right now I'm trying to get one set actually running, and one not. I'm doing this work here: https://github.com/flux-framework/flux-operator/tree/child-broker-experiment/examples/experimental/child-broker#combined

I think I'm close - because I've added two queues (batch and debug, not sure why I can't name them something else?) and then put each respective group (flux-sample for real, burst for fake) to the queues, but for some reason flux thinks the batch has a lot more cores than it does! Here is the start.sh:

#!/bin/bash
MATCH_FORMAT=${MATCH_FORMAT:-rv1}
NJOBS=${NJOBS:-10}
NNODES=${NNODES:-6}
printf "MATCH_FORMAT=${MATCH_FORMAT} NJOBS=$NJOBS NODES/JOB=$NNODES\n"

flux module remove sched-fluxion-qmanager
flux module remove sched-fluxion-resource
flux module remove resource
flux config load <<EOF
[sched-fluxion-qmanager]
queue-policy = "easy"
[sched-fluxion-resource]
match-format = "$MATCH_FORMAT"

[resource]
noverify = true
norestrict = true

# Why can't I name these something else?
[queues.debug]
requires = ["debug"]

[queues.batch]
requires = ["batch"]

[[resource.config]]
hosts = "flux-sample[0-3]"
properties = ["batch"]

[[resource.config]]
hosts = "burst[0-99]"
properties = ["debug"]

[[resource.config]]
hosts = "flux-sample[0-3],burst[0-99]"
cores = "0-103"
EOF
flux config get | jq '."sched-fluxion-resource"'
flux module load resource noverify monitor-force-up
flux module load sched-fluxion-resource
flux module load sched-fluxion-qmanager
flux queue start --all --quiet
flux resource list
t0=$(date +%s.%N)

# These are real jobs
flux submit -N$NNODES --queue=batch \
    --quiet --wait hostname

# These are fake jobs
flux submit -N$NNODES --cc=1-$NJOBS --queue=debug \
    --setattr=exec.test.run_duration=1ms \
    --quiet --wait hostname

ELAPSED=$(echo $(date +%s.%N) - $t0 | bc -l)
THROUGHPUT=$(echo $NJOBS/$ELAPSED | bc -l)
R_SIZE=$(flux job info $(flux job last) R | wc -c)
OBJ_COUNT=$(flux module stats content-sqlite | jq .object_count)
DB_SIZE=$(flux module stats content-sqlite | jq .dbfile_size)

printf "%-12s %5d %4d %8.2f %8.2f %12d %12d %12d\n" \
        $MATCH_FORMAT $NJOBS $NNODES $ELAPSED $THROUGHPUT \
        $R_SIZE $OBJ_COUNT $DB_SIZE
flux jobs -a
flux jobs -a --json | jq .jobs[0]

and what happens:

$ flux batch -n1 ./combined/start.sh 
MATCH_FORMAT=rv1 NJOBS=10 NODES/JOB=6
{
  "match-format": "rv1"
}
     STATE QUEUE      NNODES   NCORES    NGPUS NODELIST
      free batch           4      416        0 flux-sample[0-3]
      free debug         100    10400        0 burst[0-99]
 allocated                 0        0        0 
      down                 0        0        0 
ƒpyjkxF: exception: type=alloc note=alloc denied due to type="unsatisfiable"
rv1             10    6     2.07     4.82       194582          604       466944
       JOBID QUEUE    USER     NAME       ST NTASKS NNODES     TIME INFO
     ƒxPgAgG debug    flux     hostname   CD      6      6   0.311s burst[40-45]
     ƒxPgAgF debug    flux     hostname   CD      6      6   0.485s burst[46-51]
     ƒxLiC7Z debug    flux     hostname   CD      6      6   0.485s burst[52-57]
     ƒxKECqD debug    flux     hostname   CD      6      6   0.468s burst[58-63]
     ƒxGGEGY debug    flux     hostname   CD      6      6   0.452s burst[64-69]
     ƒxGGEGX debug    flux     hostname   CD      6      6   0.436s burst[70-75]
     ƒxALH99 debug    flux     hostname   CD      6      6   0.414s burst[76-81]
     ƒwn6Tuy debug    flux     hostname   CD      6      6   0.384s burst[82-87]
     ƒwaEZfD debug    flux     hostname   CD      6      6   0.355s burst[88-93]
     ƒwRLdy9 debug    flux     hostname   CD      6      6   0.272s burst[94-99]
     ƒpyjkxF batch    flux     hostname    F      6      6        - 
{
  "t_depend": 1687898804.1769416,
  "t_run": 1687898804.9159055,
  "t_cleanup": 1687898805.2271707,
  "t_inactive": 1687898805.2904124,
  "duration": 0,
  "expiration": 4841498804,
  "name": "hostname",
  "cwd": "/tmp/workflow",
  "queue": "debug",
  "ntasks": 6,
  "ncores": 624,
  "nnodes": 6,
  "priority": 16,
  "ranks": "[44-49]",
  "nodelist": "burst[40-45]",
  "success": true,
  "result": "COMPLETED",
  "waitstatus": 0,
  "id": 36356227073,
  "t_submit": 1687898804.149426,
  "state": "INACTIVE",
  "username": "flux",
  "userid": 1000,
  "urgency": 16,
  "runtime": 0.311265230178833,
  "status": "COMPLETED",
  "returncode": 0,
  "dependencies": [],
  "annotations": {},
  "exception": {
    "occurred": false
  }
}

Note that the "real" hostname submit fails, and the fake ones are ok. I think the issue is the 416 cores (indeed my local machine doesn't have that many!) So questions:

  1. How do I get the batch queue to get the correct number of cores so the job runs
  2. After that, how do I simply add the mocked nodes as down (but not allow running jobs on them?) is it just a matter of removing that run_duration flag? But I don't want it to fail with "unsatisfiable" I would want them to be scheduled if the mock resources could potentially support the jobs!

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions