Skip to content

Release 1.0.0

Latest

Choose a tag to compare

@simonjwright simonjwright released this 20 Feb 15:58
· 1 commit to main since this release
1.0.0

This is the first release of parallelize.

Since modern processors have multiple cores, it can make sense to split a job into parts which can be run in parallel on the different cores, using separate processes. Existing tools which support this include gprbuild with its -j<num> switch (-j0 means "use as many processors as there are cores") and make, which also uses -j<num>, but note that -j on its own lets make "place no limit on the number of jobs that can run simultaneously", which can be a Bad Idea.

parallelize has been built and tested on macOS.

It runs the jobs defined in standard input (one per line).

The switches are

-v, --verbose: report as each job is started and finished.
-j<num>, --jobs=<num>: the number of jobs to run in parallel (default = number of cores)

A job must be executable (a program or a shell script). If there's any shell substitution to do, you can say e.g. sh <script> arg=$<env var> (I haven't found a way to do this with programs).