flux-framework / flux-sched

Fluxion Graph-based Scheduler
GNU Lesser General Public License v3.0
84 stars 39 forks source link

resource-query is missing test.yaml #1113

Open vsoch opened 5 months ago

vsoch commented 5 months ago

test.yaml is referenced for the example for the resource query utility, but the test looks like it's gone?

image

I found (and tried) test/benchmark.yaml but it didn't work in the test container:

 match allocate test/benchmark.yaml
INFO: =============================
INFO: No matching resources found
INFO: JOBID=1
INFO: =============================

This is what my container sees:

# flux resource list
     STATE NNODES   NCORES    NGPUS NODELIST
      free      1       10        0 e2b29b17d5c5
 allocated      0        0        0 
      down      0        0        0 

I saw the README example (but it has GPUs) and tried to derive my own, first I tried:

version: 9999
resources:
   - type: node
     count: 1
     with:
      - type: slot
        count: 1
        label: default
        with:
          - type: core
            count: 1

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

That didn't work - I thought because it didn't match the right order expected for a graph? Because I see node2socket but not node2core. So I tried added socket before that:

version: 9999
resources:
   - type: node
     count: 1
     with:
      - type: slot
        count: 1
        label: default
        with:
          - type: socket
            count: 2
            with:
             - type: core
               count: 5

attributes:
  system:
    duration: 3600
tasks:
  - command: ["app"]
    slot: default

And that worked! :partying_face:

root@e2b29b17d5c5:/opt/flux-sched/resource/utilities# ./resource-query -L conf/default -F pretty_simple --match-subsystems=CA --match-policy=high
INFO: Loading a matcher: CA
resource-query> match allocate test.yaml
      ---medium-coarse-cluster0[1:shared]
      ------rack3[1:shared]
      ---------node71[1:shared]
      ------------socket1[1:exclusive]
      ---------------core15[1:exclusive]
      ---------------core14[1:exclusive]
      ---------------core13[1:exclusive]
      ---------------core12[1:exclusive]
      ---------------core11[1:exclusive]
      ------------socket0[1:exclusive]
      ---------------core7[1:exclusive]
      ---------------core6[1:exclusive]
      ---------------core5[1:exclusive]
      ---------------core4[1:exclusive]
      ---------------core3[1:exclusive]
INFO: =============================
INFO: JOBID=1
INFO: RESOURCES=ALLOCATED
INFO: SCHEDULED AT=Now
INFO: =============================
resource-query> 

So first (this is really cool), but second, I wonder if a test.yaml that is referenced could be provided, and with something that works the first time? Is there a site you'd suggest that generates these that has https (http://graphml.graphdrawing.org/ does not)! I actually don't mind just generating by hand (and then using the scripts in that README for using dot, etc. But it would be cool to have a UI. For some context, I want to just play with this for using resource-query for "other kinds of graphs" of things.Thanks!