I can see how easy it is to run a parallel job on multiple input but is there no other way to run the same job in parallel multiple times with putting the command in a file and repeating it many times?
parallel -j+0 ::: './dosomejob.sh'
but tell parallel to run that job x amount of times in parallel using the number of available cores?
If you have less than 10 CPU threads:
parallel -N0 ./dosomejob.sh ::: {1..10}
-N0
= insert 0 arguments.
If you want GNU Parallel to generate combinations, but you want all combinations repeated 5 times try:
parallel mycommand {1} {2} {3} {4} fixed_arg1 fixed_arg2 \
:::: arg_file1.txt arg_file2.txt \
::::+ arg_file3.txt arg_file4.txt \
::: {1..5}
Typical. I spend ages trying to work this out and when I post a question, I think I actually worked it out.
parallel -j+0 './dosomejob.sh' ::: {1..10}
Is this the correct way to do this? Is there a better parallel way?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With