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

traverser: allow non-exclusive slots #1194

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jameshcorbett
Copy link
Member

WIP as I try to get slots to work for matching rabbit resources.

Problem: putting a 'slot' entry in jobspec forces every entry below
that to be exclusive or else the traverser will not consider them.

If the 'slot' entry specifies 'exclusive: false', do not make
slot matches exclusive. Otherwise maintain the old behavior of
enforcing exclusivity.
@jameshcorbett
Copy link
Member Author

jameshcorbett commented May 5, 2024

With this PR, using this JGF graph and the first policy and this jobspec:

version: 9999
resources:
  - type: slot
    count: 3
    label: default
    exclusive: false
    with:
    - type: ssd
      count: 1
      exclusive: true
    - type: node
      count: 1
      with:
      - type: slot
        label: task
        count: 1
        with:
        - type: core
          count: 1
# a comment
attributes:
  system:
    duration: 3600
tasks:
  - command: [ "app" ]
    slot: task
    count:
      per_slot: 1

I was able to get non-exclusive matches:

resource-query> m allocate ../jobspec.yaml 
      ---------ssd31[894:x]
      ------------core63[1:x]
      ---------rzvernal25[1:s]
      ------rack0[1:s]
      ---------ssd31[894:x]
      ------------core63[1:x]
      ---------rzvernal41[1:s]
      ------rack1[1:s]
      ---------ssd31[894:x]
      ------------core95[1:x]
      ---------rzvernal53[1:s]
      ------rack2[1:s]
      ---ElCapitan0[1:s]
INFO: =============================
INFO: JOBID=1
INFO: RESOURCES=ALLOCATED
INFO: SCHEDULED AT=Now
INFO: =============================
resource-query> f sched-now=allocated
      ---------ssd31[894:x]
      ------------core63[1:x]
      ---------rzvernal25[1:x]
      ------rack0[1:x]
      ---------ssd31[894:x]
      ------------core63[1:x]
      ---------rzvernal41[1:x]
      ------rack1[1:x]
      ---------ssd31[894:x]
      ------------core95[1:x]
      ---------rzvernal53[1:x]
      ------rack2[1:x]
      ---ElCapitan0[1:x]
INFO: =============================
INFO: EXPRESSION="sched-now=allocated"
INFO: =============================

Copy link

codecov bot commented May 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.9%. Comparing base (7a45c25) to head (aa74436).

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1194   +/-   ##
======================================
  Coverage    73.9%   73.9%           
======================================
  Files         102     102           
  Lines       14595   14597    +2     
======================================
+ Hits        10790   10792    +2     
  Misses       3805    3805           
Files Coverage Δ
resource/traversers/dfu_impl.cpp 82.9% <100.0%> (+<0.1%) ⬆️
resource/traversers/dfu_impl.hpp 94.7% <ø> (ø)

@jameshcorbett
Copy link
Member Author

By comparison, keeping everything else constant but working off master instead of this PR:

resource-query> m allocate ../jobspec.yaml 
      ---------ssd31[894:x]
      ------------core63[1:x]
      ---------rzvernal25[1:x]
      ------rack0[1:s]
      ---------ssd31[894:x]
      ------------core63[1:x]
      ---------rzvernal41[1:x]
      ------rack1[1:s]
      ---------ssd31[894:x]
      ------------core95[1:x]
      ---------rzvernal53[1:x]
      ------rack2[1:s]
      ---ElCapitan0[1:s]
INFO: =============================
INFO: JOBID=1
INFO: RESOURCES=ALLOCATED
INFO: SCHEDULED AT=Now
INFO: =============================
resource-query> f sched-now=allocated
      ---------ssd31[894:x]
      ------------core0[1:x]
      ------------core1[1:x]
      ------------core2[1:x]
      ------------core3[1:x]
      ------------core4[1:x]
      ------------core5[1:x]
      ------------core6[1:x]
      ------------core7[1:x]
      ------------core8[1:x]
      ------------core9[1:x]
      ------------core10[1:x]
      ------------core11[1:x]
      ------------core12[1:x]
      ------------core13[1:x]
      ------------core14[1:x]
      ------------core15[1:x]
      ------------core16[1:x]
      ------------core17[1:x]
      ------------core18[1:x]
      ------------core19[1:x]
      ------------core20[1:x]
      ------------core21[1:x]
      ------------core22[1:x]
      ------------core23[1:x]
      ------------core24[1:x]
      ------------core25[1:x]
      ------------core26[1:x]
      ------------core27[1:x]
      ------------core28[1:x]
      ------------core29[1:x]
      ------------core30[1:x]
      ------------core31[1:x]
      ------------core32[1:x]
      ------------core33[1:x]
      ------------core34[1:x]
      ------------core35[1:x]
      ------------core36[1:x]
      ------------core37[1:x]
      ------------core38[1:x]
      ------------core39[1:x]
      ------------core40[1:x]
      ------------core41[1:x]
      ------------core42[1:x]
      ------------core43[1:x]
      ------------core44[1:x]
      ------------core45[1:x]
      ------------core46[1:x]
      ------------core47[1:x]
      ------------core48[1:x]
      ------------core49[1:x]
      ------------core50[1:x]
      ------------core51[1:x]
      ------------core52[1:x]
      ------------core53[1:x]
      ------------core54[1:x]
      ------------core55[1:x]
      ------------core56[1:x]
      ------------core57[1:x]
      ------------core58[1:x]
      ------------core59[1:x]
      ------------core60[1:x]
      ------------core61[1:x]
      ------------core62[1:x]
      ------------core63[1:x]
      ------------gpu0[1:x]
      ------------gpu1[1:x]
      ------------gpu2[1:x]
      ------------gpu3[1:x]
      ------------gpu4[1:x]
      ------------gpu5[1:x]
      ------------gpu6[1:x]
      ------------gpu7[1:x]
      ---------rzvernal25[1:x]
      ------rack0[1:x]
      ---------ssd31[894:x]
      ------------core0[1:x]
      ------------core1[1:x]
      ------------core2[1:x]
      ------------core3[1:x]
      ------------core4[1:x]
      ------------core5[1:x]
      ------------core6[1:x]
      ------------core7[1:x]
      ------------core8[1:x]
      ------------core9[1:x]
      ------------core10[1:x]
      ------------core11[1:x]
      ------------core12[1:x]
      ------------core13[1:x]
      ------------core14[1:x]
      ------------core15[1:x]
      ------------core16[1:x]
      ------------core17[1:x]
      ------------core18[1:x]
      ------------core19[1:x]
      ------------core20[1:x]
      ------------core21[1:x]
      ------------core22[1:x]
      ------------core23[1:x]
      ------------core24[1:x]
      ------------core25[1:x]
      ------------core26[1:x]
      ------------core27[1:x]
      ------------core28[1:x]
      ------------core29[1:x]
      ------------core30[1:x]
      ------------core31[1:x]
      ------------core32[1:x]
      ------------core33[1:x]
      ------------core34[1:x]
      ------------core35[1:x]
      ------------core36[1:x]
      ------------core37[1:x]
      ------------core38[1:x]
      ------------core39[1:x]
      ------------core40[1:x]
      ------------core41[1:x]
      ------------core42[1:x]
      ------------core43[1:x]
      ------------core44[1:x]
      ------------core45[1:x]
      ------------core46[1:x]
      ------------core47[1:x]
      ------------core48[1:x]
      ------------core49[1:x]
      ------------core50[1:x]
      ------------core51[1:x]
      ------------core52[1:x]
      ------------core53[1:x]
      ------------core54[1:x]
      ------------core55[1:x]
      ------------core56[1:x]
      ------------core57[1:x]
      ------------core58[1:x]
      ------------core59[1:x]
      ------------core60[1:x]
      ------------core61[1:x]
      ------------core62[1:x]
      ------------core63[1:x]
      ------------gpu0[1:x]
      ------------gpu1[1:x]
      ------------gpu2[1:x]
      ------------gpu3[1:x]
      ------------gpu4[1:x]
      ------------gpu5[1:x]
      ------------gpu6[1:x]
      ------------gpu7[1:x]
      ---------rzvernal41[1:x]
      ------rack1[1:x]
      ---------ssd31[894:x]
      ------------core0[1:x]
      ------------core1[1:x]
      ------------core2[1:x]
      ------------core3[1:x]
      ------------core4[1:x]
      ------------core5[1:x]
      ------------core6[1:x]
      ------------core7[1:x]
      ------------core8[1:x]
      ------------core9[1:x]
      ------------core10[1:x]
      ------------core11[1:x]
      ------------core12[1:x]
      ------------core13[1:x]
      ------------core14[1:x]
      ------------core15[1:x]
      ------------core16[1:x]
      ------------core17[1:x]
      ------------core18[1:x]
      ------------core19[1:x]
      ------------core20[1:x]
      ------------core21[1:x]
      ------------core22[1:x]
      ------------core23[1:x]
      ------------core24[1:x]
      ------------core25[1:x]
      ------------core26[1:x]
      ------------core27[1:x]
      ------------core28[1:x]
      ------------core29[1:x]
      ------------core30[1:x]
      ------------core31[1:x]
      ------------core32[1:x]
      ------------core33[1:x]
      ------------core34[1:x]
      ------------core35[1:x]
      ------------core36[1:x]
      ------------core37[1:x]
      ------------core38[1:x]
      ------------core39[1:x]
      ------------core40[1:x]
      ------------core41[1:x]
      ------------core42[1:x]
      ------------core43[1:x]
      ------------core44[1:x]
      ------------core45[1:x]
      ------------core46[1:x]
      ------------core47[1:x]
      ------------core48[1:x]
      ------------core49[1:x]
      ------------core50[1:x]
      ------------core51[1:x]
      ------------core52[1:x]
      ------------core53[1:x]
      ------------core54[1:x]
      ------------core55[1:x]
      ------------core56[1:x]
      ------------core57[1:x]
      ------------core58[1:x]
      ------------core59[1:x]
      ------------core60[1:x]
      ------------core61[1:x]
      ------------core62[1:x]
      ------------core63[1:x]
      ------------core64[1:x]
      ------------core65[1:x]
      ------------core66[1:x]
      ------------core67[1:x]
      ------------core68[1:x]
      ------------core69[1:x]
      ------------core70[1:x]
      ------------core71[1:x]
      ------------core72[1:x]
      ------------core73[1:x]
      ------------core74[1:x]
      ------------core75[1:x]
      ------------core76[1:x]
      ------------core77[1:x]
      ------------core78[1:x]
      ------------core79[1:x]
      ------------core80[1:x]
      ------------core81[1:x]
      ------------core82[1:x]
      ------------core83[1:x]
      ------------core84[1:x]
      ------------core85[1:x]
      ------------core86[1:x]
      ------------core87[1:x]
      ------------core88[1:x]
      ------------core89[1:x]
      ------------core90[1:x]
      ------------core91[1:x]
      ------------core92[1:x]
      ------------core93[1:x]
      ------------core94[1:x]
      ------------core95[1:x]
      ------------gpu0[1:x]
      ------------gpu1[1:x]
      ------------gpu2[1:x]
      ------------gpu3[1:x]
      ---------rzvernal53[1:x]
      ------rack2[1:x]
      ---ElCapitan0[1:x]
INFO: =============================
INFO: EXPRESSION="sched-now=allocated"
INFO: =============================
resource-query> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant