Closed EleniLPetrou closed 3 years ago
Thanks so much for posting your first issue in this repo!
Hey, nice work!
Here're some quick answers/suggestions:
should I also use the xargs -P command?
After reading the description in the xargs
manual, I would probably avoid this (for now). However, it might work, since Bowtie can already handle multithreaded operations. Feel free to try one run with and one run without and see how the outputs compare.
And do I ever need to specify #SBATCH --ntasks-per-node?
The simplest answer is no.
The complicated answer is that it depends on how your group uses your computing nodes. As an example, the Roberts Lab is very "selfish". We always request the maximum amount of CPUs and memory available for our nodes. This is due to a number of reasons, but primarily because we rarely have a lot of users submitting jobs simultaneously, so there's no real need to "share" the resources with other lab memebers. We also have two nodes available, which usually ensures that everyone's jobs can get run, even if there's a queue for either of the nodes.
Unrelated, but here's a minor suggestion for your script above. Try to put any/all input/outputs/parameters into a variable. This will make re-using scripts for task later much easier (and safer). For example, add THREADS=20
to your ENVIRONMENT SETUP section and then replace --threads 20
with --threads $THREADS
.
Thank you so much for your help and guidance, @kubu4 ! I appreciate it a lot! :) I will go try out some of your suggestions.
Hi everybody!
I am taking my first baby steps into parallelizing jobs on Hyak (Klone). I have read Vince Buffalo's chapter on parallelizing tasks using the xargs command (pages 419-421 in Bioinformatics Data Skills) but I am still a bit confused on how to properly use xargs within an sbatch script. When I run a program that supports multithreading (like bowtie2), should I also use the xargs -P command? And do I ever need to specify #SBATCH --ntasks-per-node? I am having trouble seeing how all of these different puzzle pieces fit together. I would appreciate any guidance or learning resources that people might have. Thank you very much!!
I attach an example of the sbatch script I am working on, in case that helps: