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

Make scale in of htex_auto_scale more effective #2196

Merged
merged 6 commits into from
Jan 26, 2022
Merged
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion parsl/dataflow/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ def _general_strategy(self, status_list, tasks, *, strategy_type):
logger.debug("More slots than tasks")
if isinstance(executor, HighThroughputExecutor):
if active_blocks > min_blocks:
exec_status.scale_in(1, force=False, max_idletime=self.max_idletime)
exec_status.scale_in(
active_blocks - active_tasks // tasks_per_node // nodes_per_block,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this calculation should look similar to the calculation around line 246: both of them arg calculating some kind of "target number of blocks" and it makes me uncomfortable that they don't look exactly the same (eg ceil, min and parallelism)

other than that, this looks like the right thing to be doing.

force=False, max_idletime=self.max_idletime
)

elif strategy_type == 'simple':
# skip for simple strategy
Expand Down