Entering edit mode
2.2 years ago
LDT
▴
340
I have 100 files, and I want to parallelise my submission to save time instead of running jobs one by one. How can I change this script to a Job-array in LSF
using bsub
submission system?
#BSUB -J ExampleJob1 #Set the job name to "ExampleJob1"
#BSUB -L /bin/bash #Uses the bash login shell to initialize the job's execution environment.
#BSUB -W 2:00 #Set the wall clock limit to 2hr
#BSUB -n 1 #Request 1 core
#BSUB -R "span[ptile=1]" #Request 1 core per node.
#BSUB -R "rusage[mem=5000]" #Request 5000MB per process (CPU) for the job
#BSUB -M 5000 #Set the per process enforceable memory limit to 5000MB.
#BSUB -o Example1Out.%J #Send stdout and stderr to "Example1Out.[jobID]"
path=./home/
for each in *.bam
do
samtools coverage ${each} -o ${each}_coverage.txt
done
Thank you for your time; any help is appreciated. I am a starter at LSF
and quite confused
How about just submitting jobs in a for loop, i.e. remove the loop from the script and replace
${each}
with$1
I ll try this one 5heikki, it seems very promising. I am sure thought how i can define the range to run only 10 jobs at a time
It shouldn't be your responsibility. Whoever setup the queue manager should be responsible for such stuff. As an example, you submit 10k jobs, but only 10 run in parallel (if there are available slots) because that's how the queue manager was setup..