1
votes

I would like to use the gnu parallel command line to basically act as a simple scheduling mechanism.

in my case, i have N number of GPU's on a system and i would like to effectively queue a list of jobs onto those GPU's.

basically, i have a list of inputs and i would naively run

parallel --jobs=4 ./my_script.sh ::: cat list_of_things.txt ::: 0 1 2 3

where ./my_script.sh accepts two args the thing i want to process, and the GPU i want to process it on.

what i want is for each thing in the list, to just run on one of the gpus (0 thru 3).

however, this ends up just running each thing 4 times.

1

1 Answers

1
votes

Try this:

parallel --jobs=4 ./my_script.sh {%} {} :::: list_of_things.txt