Skip to content

Commit

Permalink
Fix number of submitted WorkChains
Browse files Browse the repository at this point in the history
Currently, the number of submitted `WorkChain`s is determined by the number of available slots.
This is not the expected behavior, as this number might be unequal to 0,
causing a logging message that states that `n` `WorkChain`s have been submitted,
even though no processes were left.
  • Loading branch information
t-reents committed May 22, 2024
1 parent 888b656 commit bcd0f0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiida_submission_controller/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ def submit_new_batch(self, dry_run=False, sort=False, verbose=False, sleep=0):
console = Console()
console.print(table)

if number_to_submit <= 0:
if number_to_submit <= 0 or self.num_to_run == 0:
print("[bold blue]Info:[/] 😴 Nothing to submit.")
else:
print(f"[bold blue]Info:[/] 🚀 Submitting {number_to_submit} new workchains!")
print(f"[bold blue]Info:[/] 🚀 Submitting {min(number_to_submit, self.num_to_run)} new workchains!")

submitted = {}

Expand Down

0 comments on commit bcd0f0f

Please sign in to comment.