I have an executable that takes one input file and have been running it like so, submitting as a job to pbs using qsub:
qsub -q long path/to/runpp path/to/input.fa
I have a script (runpp_multi.sh) to make it run on multiple files in a directory:
for i in path/to/input/*.fa ; do path/to/runpp $i ; done
These both work fine, but obviously there’s a problem if I submit the script that runs on multiple files with qsub:
qsub -q long runpp_multi.sh
This submits the executable running on all the files as one job. I would like each file to be submitted as a separate job, something like this:
for i in path/to/input/*.fa ; do qsub -q long path/to/runpp $i ; done
I have seen that -v could be what I’m looking for, but I’m very confused about the syntax, particularly with my case.
Could I get some advice on how to modify my script so that each file in a directory runs with the executable as a separate job? I have too many files to do it manually.
Thanks in advance.
Advertisement
Answer
You could make a self-extracting archive with shar (see GNU sharutils) and submit it to qsub
.