We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2344fa2 commit 026a99cCopy full SHA for 026a99c
launch_nf.sh
@@ -1,16 +1,23 @@
1
-#!/bin/bash
+#!/usr/bin/env bash
2
#SBATCH --no-requeue
3
-#SBATCH --mem 8192M
+#SBATCH --mem 6G
4
#SBATCH -p genoa64
5
-#SBATCH --qos='pipelines'
6
-set -x
7
-pid=""
8
- kill_func() {
9
- echo TRAP;
10
- kill $pid ;
11
- wait $pid
+#SBATCH --qos pipelines
+
+set -e
+set -u
+_term() {
+ echo "Caught SIGTERM signal!"
12
+ kill -s SIGTERM $pid
13
+ wait $pid
14
}
-trap kill_func INT
-trap kill_func EXIT
15
-
16
-"$@" & pid=$! ; echo "waiting for ${pid}" ; wait $pid
+trap _term TERM
17
18
+"$@" & pid=$!
19
20
+echo "Waiting for ${pid}"
21
+wait $pid
22
23
+exit 0
0 commit comments