prll is a utility for parallelizing the execution of shell functions. It provides a convenient interface for parallelizing the execution of a single task over multiple data files or any other kind of data that you can pass as a shell function argument. It is meant to make it simple to fully utilize a multicore/multiprocessor machine. prll is designed to be used not just in shell scripts, but also in interactive shells. To make the latter convenient, it is implemented as a shell function. Shells are not very good at automatic job management, so prll uses helper programs, written in C. To prevent race conditions, System V Message Queues are used to signal job completion. Standard output is buffered and Semaphores are used to prevent interleaving.
|Tags||Multicore Multiprocessor Parallelization|
|Operating Systems||Unix Linux Mac OS X|
Release Notes: A user-accessible variable to get the current job number is now available. The PRLL_NR_CPUS variable is deprecated in favor of PRLL_NRJOBS, but is kept for backwards compatibility. Lock functions have a default argument; specifying a lock number is optional.
Release Notes: prll_seq, a simple substitute for GNU seq, was added. Five locks are now available to users should they need to synchronize their functions. Another helper function was added to ease passing and splitting of multiple arguments.
Release Notes: Rewritten for POSIX compatibility. It should work in all Bourne-like shells. Quiet mode suppresses job notifications. Proper option parsing is now used. Documentation is now in the form of a man page. Several minor improvements in error handling and performance.
Release Notes: Full output buffering and locking prevent output interleaving. Interrupting execution from within functions is possible. The license was changed to GPL version 3 or later for prll.sh as well.
Release Notes: Data can be passed via standard input. BSD and Mac OS X compatibility were added. Most dependencies have been dropped. Multiple instances of prll can be executed simultaneously. Job PID and exit code are printed. On interruption, prll waits for started jobs to finish and returns a non-zero exit code. Several tests are now available to check operation.