by thealistra · 10y ago · 0 comments
g1:
job1
g2:
job2
and then one goal to depend on them all and I used make -j 4> parallel dates back to around the same time. It was originally a wrapper that generated a makefile and used make -j to do the parallelization.
find . -type f -name | parallel --jobs 5 process_file
That will run "process_file foo" for ever file in a directory with 5 processes running in parallel. find . -type f -name | xargs -I {} -n 1 -P 5 process_file {} parallel --progress --wd '.' -S '4/fourworkers@blehworker.org,8/eightworkers@eightworkers.org,2/:' "./complicated_command --param1={1} --param2={2} ::: $(some_shellcommand_to_generate_param1_values.sh) ::: $(some_shellcommand_to_generate_param2_values.sh)
It's very flexible, become my go-to for speeding up parallelizable work. Next step up would be Celery or Spark or something.