Paralleltask
Paralleltask is a simple and lightweight parallel task engine. It can launch a given number of tasks from a batch of independent tasks, and keep this number of running tasks until all tasks are completed.
Why Paralleltask?
Suppose you have dozens or hundreds of independent tasks that can run in parallel (non-independent tasks can be put together to form an independent task group). Due to the limitation of computing resources, you cannot run all tasks at the same time. Of course, it is not realistic to run one by one, so you want to run a specific number of tasks at the same time, and keep this number of running tasks (once a task is completed, start a new task) until all tasks are completed.
-
zero configuration, no dependencies, no prior knowledge required, easy to install and use.
-
support breakpoint resume, automatically re-execute failed tasks and ignore successful tasks.
-
automatically kill submitted tasks once the main program receives a termination signal (
Ctrl+C). -
support multiple task scheduling systems, such as
LOCAL,SGE,PBS,SLURMandLSF. -
automatically convert relative path to absolute path in shell scripts.
-
support python 2 and 3.
Installation
pip install paralleltask
If you prefer to use the drmaa library, instead of using commands (such as qsub) to submit and control tasks, see here to install drmaa.
Usage
paralleltask work.sh
The only required input file work.sh is a command collection file, which contains all the task commands that need to be run. A task command can be one or more lines, and an independent task group can be set by the parameter --lines. Using paralleltask -h for details.
Testing
# produce a work file: test.sh
for i in {1..50};do echo "sleep ${i} && echo \"I am subtask${i}\"" >> test.sh;done;
# run
paralleltask test.sh
A demo file test.sh is here
Configuration
If you want to change some of the default settings, you can pass parameters (use paralleltask -h for details) or directly edit the configure template file cluster.cfg.
Note: Paralleltask will replace {mem}, {cpu}, {bash}, {out}, {err}, {script} and {job_id} with specific values needed for each jobs, see the configure template file for details.
Getting Help
Feel free to raise an issue at the issue page, and welcome to pull request if you find a bug or have an idea for this project.
Star
You can track updates by tab the Star button on the upper-right corner at the github page.
Metadata
Release files for Paralleltask 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Paralleltask-0.2.3.tar.gz | 22.4 kB | Without provenance | Details for Paralleltask-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Paralleltask-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for Paralleltask-0.2.3-py3-none-any.whl |
Total release size: 46.6 kB
Release files / Paralleltask-0.2.3.tar.gz
| Download URL | Paralleltask-0.2.3.tar.gz |
|---|---|
| Size | 22.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8015a8311d5021bc44edbfbf45ff2557a529999e235d25190bac62993fdf7b66
|
|
BLAKE2b-256 checksum How to use checksums |
c1147384ac9eac759d286e94f5456c82335dd268495294cbcc1a0e5d647ecffa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
|
Release files / Paralleltask-0.2.3-py3-none-any.whl
| Download URL | Paralleltask-0.2.3-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f6b2945d7fd34cfdef16d3481f6bd6b64c68d3ea978cb5fb6fc292397c49e53
|
|
BLAKE2b-256 checksum How to use checksums |
2f7bf2c87acaba0aeac327fdd89d5a289f027bafe254a7c5320b0112026c7318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
|
Security for Paralleltask 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.