Skip to content

Commit

Permalink
r_spread policy renamed to co_loc
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosT committed Apr 5, 2024
1 parent e9d6c7f commit ee4f9d3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion etc/oar/admission_rules.d/15_check_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
r8 = "^allowed=\\w+$"
r9 = "^inner=\\w+$"
r10 = "^timesharing=(?:(?:\\*|user),(?:\\*|name)|(?:\\*|name),(?:\\*|user))$"
r11 = "^(?:compact|spread|r_spread|no_pref|ml)$"
r11 = "^(?:compact|spread|co_loc|no_pref|ml)$"
all_re = re.compile(
"(%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s)"
% (r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def estimate_job_nb_resources_in_spread(
return ((0, ""), is_resource_available, estimated_nb_resources)


if "r_spread" in types:
types = list(map(lambda t: t.replace("r_spread", "find=r_spread"), types))
if "co_loc" in types:
types = list(map(lambda t: t.replace("co_loc", "find=co_loc"), types))

if (
estimate_job_nb_resources_in_spread(
Expand Down
2 changes: 1 addition & 1 deletion oar/kao/custom_scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def spread(itvs_slots, hy_res_rqts, hy, beginning_slotset, reverse=False):
return result


def r_spread(itvs_slots, hy_res_rqts, hy, beginning_slotset):
def co_loc(itvs_slots, hy_res_rqts, hy, beginning_slotset):
"""
Given a job resource request and a set of resources this function tries to find a matching allocation.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ build-backend = "poetry.masonry.api"
[tool.poetry.plugins."oar.find_func"]
compact = "oar.kao.custom_scheduling:compact"
spread = "oar.kao.custom_scheduling:spread"
r_spread = "oar.kao.custom_scheduling:r_spread"
co_loc = "oar.kao.custom_scheduling:co_loc"
no_pref = "oar.kao.custom_scheduling:no_pref"

0 comments on commit ee4f9d3

Please sign in to comment.