Skip to content

Commit 026a99c

Browse files
authored
Add files via upload
1 parent 2344fa2 commit 026a99c

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

launch_nf.sh

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#SBATCH --no-requeue
3-
#SBATCH --mem 8192M
3+
#SBATCH --mem 6G
44
#SBATCH -p genoa64
5-
#SBATCH --qos='pipelines'
6-
set -x
7-
pid=""
8-
kill_func() {
9-
echo TRAP;
10-
kill $pid ;
11-
wait $pid
5+
#SBATCH --qos pipelines
6+
7+
set -e
8+
set -u
9+
10+
_term() {
11+
echo "Caught SIGTERM signal!"
12+
kill -s SIGTERM $pid
13+
wait $pid
1214
}
13-
trap kill_func INT
14-
trap kill_func EXIT
15-
16-
"$@" & pid=$! ; echo "waiting for ${pid}" ; wait $pid
15+
16+
trap _term TERM
17+
18+
"$@" & pid=$!
19+
20+
echo "Waiting for ${pid}"
21+
wait $pid
22+
23+
exit 0

0 commit comments

Comments
 (0)