forked from uchicago-bio/RCC-Utilities
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmpiblast.sbatch
More file actions
61 lines (53 loc) · 7.71 KB
/
mpiblast.sbatch
File metadata and controls
61 lines (53 loc) · 7.71 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
#SBATCH --output=%j.out
#SBATCH --error=%j.err
#SBATCH --job-name=mpi-blast
# Use 2 nodes with 8 tasks each, for 16 MPI task:s
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=8
#SBATCH --mail-type=ALL
#SBATCH --mail-user=cnet@uchicago.edu
#SBATCH --partition=sandyb
# this job requests exclusive access to the nodes it is given
# this mean it will be the only job running on the node
#SBATCH --exclusive
#SBATCH --constraint=ib
################################################################################
# load your modules here
################################################################################
module load mpiblast
################################################################################
# Create an output directory
################################################################################
WORKDIR=/scratch/midway/$USER/mpiblast/$SLURM_JOBID"-"$1
mkdir -p $WORKDIR
################################################################################
# Start time
################################################################################
echo "Starting Job: $1 with id: $SLURM_JOBID"; date
################################################################################
# Blastplus
################################################################################
DB=pdb.fasta
QUERY="protein1.fasta"
BLAST_RESULTS="mpiblast-results.txt"
# using default folder (/gpfs/scratch/shared/mpiblast)
SLURM_NPROCS=$(( $SLURM_NNODES * $SLURM_NTASKS_PER_NODE ))
time mpirun -n $SLURM_NPROCS mpiblast -p blastp -d $DB -i $QUERY -o $BLAST_RESULTS --time-profile=time.txt --removedb --use-parallel-write
#-m 8 -b 1
################################################################################
#
# Finished
#
################################################################################
echo "Done with processing"; date
################################################################################
#
# Copy all the output files to that directory
#
################################################################################
`cp $0 $WORKDIR`
`cp $QUERY $WORKDIR`
`mv $SLURM_JOBID.out $SLURM_JOBID.err $WORKDIR`
`mv $BLAST_RESULTS $WORKDIR`
`mv time.txt $WORKDIR`