Provides the ability to distribute a task across a fixed number of processes, for better utilization of multiprocessing
Project description
Provides the ability to distribute a task across a fixed number of processes, for better utilization of multiprocessing.
Usage: ./disttask [cmd] [concurrent tasks] [argset] Use a %s in [cmd] where you want the args to go. use %d for the pipe number.
The application runs at most “concurrent task” # of processes (good to match total number of processors available to this number - 1). It captures stdout and stderr to ensure that any output is not intertwined between the applications.
Each command should specify a “%s” to where each argument will go (one argument from @argset per application). “%d” is also available as the pipe number, but may not be very useful.
Example:
./disttask “echo %d %s” 3 “this” “is” “some” “text” “blah” “whooptie” “Doo”0 this1 is2 some0 text1 blah2 whooptie0 Doo
Another Example:
Run pyflakes, using 10 simultanious processes, on all python files in subdirectories (requires shopt -s globstar)
./disttask “pyflakes %s” 10 echo **/*.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file disttask-1.0.tar.gz
.
File metadata
- Download URL: disttask-1.0.tar.gz
- Upload date:
- Size: 1.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fd29bc9c4a4469492e108cdd27425bbd060dc19d90936b9b0e20fb8109348bf |
|
MD5 | 1e6196415ea381253668d8df9cfd1832 |
|
BLAKE2b-256 | 6c88718f4851aafcd01d880b488cfbb75e73da2285b1ef000de37dd365ac63a2 |