forked from snakemake/snakemake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: propagate attempt count from group to subjobs (snakemake#2052)
Attempts was getting updated on the group job, but not getting updated on the group job's member jobs. This prevented the member job resources calculations from being updated, preventing the correct functioning of resource lambdas in the group job context. This propagates the update to the members and adds a test Resolves snakemake#2045 ### QC <!-- Make sure that you can tick the boxes below. --> * [x] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [x] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).
- Loading branch information
Showing
6 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
rule a: | ||
output: "a" | ||
resources: mem_mb = lambda w, attempt: attempt*1000 | ||
group: "mygroup" | ||
shell: ''' | ||
if [ {resources.mem_mb} == 2000 ]; then | ||
touch {output} | ||
fi | ||
''' | ||
|
||
# rule b: | ||
# input: rules.a.output | ||
# output: "b_{number}" | ||
# group: "mygroup" | ||
# shell: ''' | ||
# touch -m {output} | ||
# ''' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
echo `date` >> qsub.log | ||
tail -n1 $1 >> qsub.log | ||
# simulate printing of job id by a random number | ||
echo $RANDOM | ||
sh $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters