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

tickets/DM-41997: first draft packing nodes #23

Merged
merged 5 commits into from
Dec 5, 2023
Merged
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
7 changes: 7 additions & 0 deletions python/lsst/ctrl/execute/allocatorParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ def parseArgs(self, basename):
default=None,
help="glide-in inactivity shutdown time in seconds",
)
parser.add_argument(
"-p",
"--pack",
action="store_true",
dest="packnodes",
help="encourage nodes to pack jobs rather than spread",
)
parser.add_argument(
"-v", "--verbose", action="store_true", dest="verbose", help="verbose"
)
Expand Down
9 changes: 9 additions & 0 deletions python/lsst/ctrl/execute/slurmPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ def loadSlurm(self, name, platformPkgDir):
self.allocationFileName
)

# For partitionable slots the classad 'Cpus' shows how many cpus
# remain to be allocated. Thus for a slot running jobs the value
# of Rank of TotalCpus - Cpus will increase with the load.
# Because higher Rank is preferred, loaded slots are favored.
if self.opts.packnodes is None:
self.defaults["PACK_BLOCK"] = "#"
else:
self.defaults["PACK_BLOCK"] = "Rank = TotalCpus - Cpus"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for non-HTCondor experts put a brief comment here explaining why this difference will pack.


# handle dynamic slot block template:
# 1) if it isn't specified, just put a comment in it's place
# 2) if it's specified, but without a filename, use the default
Expand Down