Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacozzuto authored Oct 8, 2024
1 parent 2344fa2 commit 026a99c
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions launch_nf.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
#!/bin/bash
#!/usr/bin/env bash
#SBATCH --no-requeue
#SBATCH --mem 8192M
#SBATCH --mem 6G
#SBATCH -p genoa64
#SBATCH --qos='pipelines'
set -x
pid=""
kill_func() {
echo TRAP;
kill $pid ;
wait $pid
#SBATCH --qos pipelines

set -e
set -u

_term() {
echo "Caught SIGTERM signal!"
kill -s SIGTERM $pid
wait $pid
}
trap kill_func INT
trap kill_func EXIT

"$@" & pid=$! ; echo "waiting for ${pid}" ; wait $pid

trap _term TERM

"$@" & pid=$!

echo "Waiting for ${pid}"
wait $pid

exit 0

0 comments on commit 026a99c

Please sign in to comment.