A utility to run multiple small tasks in a single HPC job submission.
Project description
ictasks
This is a set of utilities to support running groups of small tasks as part of a single HPC batch submission at ICHEC.
The repo includes:
- the
ictasks
package with tooling building blocks - Snapshots of the ICHEC Taskfarm tool available on our HPC systems in the
applications
directory.
Installing
The package can be installed from PyPI:
pip install ictasks
Features
Taskfarm
The taskfarm
feature will launch the tasks in the pointed to tasklist
file:
ictasks taskfarm --tasklist $PATH_TO_TASKLIST
See the test/data/tasklist.dat
file for an example input with two small tasks.
If you run this on your local machine it will create a directory per task, launch the task in that directory and output a status file task.json
. By default all processors on the machine (or compute node) will be assigned tasks. There are two ways to control this, and many other, settings:
-
With environment variables using a
TASKFARM_
prefix, consistent with the original ICHECtaskfarm
tool and documented here: https://www.ichec.ie/academic/national-hpc/documentation/tutorials/task-farming -
With a config file in
yaml
format - passed in with a--config
command line argument. Config values take precedence over environment variables if both are specified for the same setting.
Using a config file
The config file below shows an example constraining tasks to run on only a single core per compute node. We can also specify tasks in the config instead of in a tasklist file.
environment:
job_id: my_job
workers:
cores_per_node: 1
tasks:
items:
- id: 0
launch_cmd: "echo 'hello from task 0'"
- id: 1
launch_cmd: "echo 'hello from task 1'"
we can run this with:
ictasks taskfarm --config my_config.yaml
License
This package is Coypright of the Irish Centre for High End Computing. It can be used under the terms of the GNU Public License (GPL). See the included LICENSE.txt
file for details.
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
Built Distribution
File details
Details for the file ictasks-0.1.0.tar.gz
.
File metadata
- Download URL: ictasks-0.1.0.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95426446573ee24be38bd90bdb37d10ed7159e786f159f124af72fc91ce70838 |
|
MD5 | 132b532bca27d2fe4f2abf06b9070d30 |
|
BLAKE2b-256 | 6036fdcf1df747f936be201ea1f85aef7afff3b35d69ee56bae35aa1a235d55d |
File details
Details for the file ictasks-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ictasks-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff06f8d29305714e74c63f31c82a7df7031740aced3ba64ad1b4bfac51136138 |
|
MD5 | a94262d4fa84fe710b0262265842f30a |
|
BLAKE2b-256 | 90a80d1184e9d79a915832f601b03a41162c1a9ebd29d5694c5a2a979700863e |