Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat: Adding --cluster-cancel and --cluster-cancel-nargs (#1395)
* Adding support for --cluster-[m]cancel * Adding support for --cluster-[m]cancel. * Adressing points from code review * [ci skip] fix typos Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
- Loading branch information
1 parent
0246bc9
commit 0593de1
Showing
14 changed files
with
206 additions
and
34 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
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
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,13 @@ | ||
from snakemake import shell | ||
|
||
|
||
rule all: | ||
input: 'f.1', 'f.2' | ||
|
||
rule one: | ||
output: 'f.1' | ||
shell: "sleep 120s; touch {output}" | ||
|
||
rule two: | ||
output: 'f.2' | ||
shell: "sleep 120s; touch {output}" |
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,2 @@ | ||
cancel | ||
cancel |
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,10 @@ | ||
#!/bin/bash | ||
set -x | ||
echo --sbatch-- >> sbatch.log | ||
echo `date` >> sbatch.log | ||
tail -n1 $1 >> sbatch.log | ||
cat $1 >> sbatch.log | ||
# daemonize job script | ||
nohup sh $1 0<&- &>/dev/null & | ||
# print PID for job number | ||
echo $! |
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,20 @@ | ||
#!/bin/bash | ||
set -x | ||
echo `date` | ||
echo cancel $* >>scancel.txt | ||
|
||
list_descendants () | ||
{ | ||
local children=$(ps -o pid= --ppid "$1") | ||
|
||
for pid in $children | ||
do | ||
list_descendants "$pid" | ||
done | ||
|
||
echo "$children" | ||
} | ||
|
||
for x in $*; do | ||
kill $(list_descendants $x) | ||
done |
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 @@ | ||
echo running |
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 @@ | ||
testz0r |
Oops, something went wrong.