-
Notifications
You must be signed in to change notification settings - Fork 5
/
run-GOMAP-mpi.sh
executable file
·43 lines (36 loc) · 1.02 KB
/
run-GOMAP-mpi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
mkdir -p tmp
if [ -z $GOMAP_LOC ]
then
GOMAP_LOC="$PWD"
fi
GOMAP_IMG="$GOMAP_LOC/GOMAP.sif"
if [ ! -f "$GOMAP_IMG" ]
then
echo "The GOMAP image is missing" > /dev/stderr
echo "Please run the setup.sh before running the test" > /dev/stderr
exit 1
fi
args="$@"
domain=`echo $@ | grep domain`
mixmeth_blast=`echo $@ | grep mixmeth-blast`
if [ -z "$tmpdir" ]
then
echo $TMPDIR
tmpdir=${TMPDIR:-$PWD/tmp}
fi
nodes=$((SLURM_JOB_NUM_NODES + 1))
if [ ! -z "$domain" ] || [ ! -z "$mixmeth_blast" ]
then
export SINGULARITY_BINDPATH="$PWD:/workdir,$tmpdir:/tmpdir,$SINGULARITY_BINDPATH"
echo $SINGULARITY_BINDPATH
echo "Running GOMAP $@"
echo "using $SLURM_JOB_NUM_NODES for the process"
mpiexec -np $nodes singularity run \
-W $PWD/tmp \
$GOMAP_IMG $@
else
echo "ERROR: run-GOMAP-mpi.sh can only run the steps domain and mixmeth-blast using MPI" >> /dev/stderr
echo "ERROR: Please run the other steps using run-GOMAP-SINGLE.sh " >> /dev/stderr
exit 1
fi