Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.02 KB

README.md

File metadata and controls

48 lines (33 loc) · 1.02 KB

PARALLEL

Demonstrate how to use parallel

TODO:

  • Logs and controlling running processes.
  • Exit codes and summarisation.

Install

brew install parallel

man parallel
man parallel_tutorial

# suppress the citation request.
parallel --citation

# get the number of processors parallel can see
nproc
parallel --number-of-cpus
parallel --number-of-cores

Examples

# invoke commands
parallel --verbose echo {} ::: A B C

# tagging process outputs
parallel --tag echo foo-{} ::: A B C

# call an external process
parallel --tag --verbose ./workload.sh ::: A B C

# call an external process (throttle concurrency)
parallel -j 2 --tag --verbose ./workload.sh ::: A B C D E F G
parallel -j 5 --tag --verbose ./workload.sh ::: A B C D E F G

Resources

  • GNU Parallel 2018 (online) here
  • Youtube playlist here
  • Online version of manpage tutorial here