Skip to main content

gem5art tasks package

This package contains two parallel task libraries for running gem5 experiments. he actual gem5 experiment can be executed with the help of Python multiprocessing support, Celery or even without using any job manager (a job can be directly launched by calling run() function of gem5Run object). This package implicitly depends on the gem5art run package.

Please cite the gem5art paper when using the gem5art packages. This documentation can be found on the gem5 website

Use of Python Multiprocessing

This is a simple way to run gem5 jobs using Python multiprocessing library. You can use the following function in your job launch script to execute gem5art run objects:

run_job_pool([a list containing all run objects you want to execute], num_parallel_jobs = [Number of parallel jobs you want to run])

Use of Celery

Celery server can run many gem5 tasks asynchronously. Once a user creates a gem5Run object (discussed previously) while using gem5art, this object needs to be passed to a method run_gem5_instance() registered with Celery app, which is responsible for starting a Celery task to run gem5. The other argument needed by the run_gem5_instance() is the current working directory.

Celery server can be started with the following command:

celery -E -A gem5art.tasks.celery worker --autoscale=[number of workers],0

This will start a server with events enabled that will accept gem5 tasks as defined in gem5art. It will autoscale from 0 to desired number of workers.

Celery relies on a message broker RabbitMQ for communication between the client and workers. If not already installed, you need to install RabbitMQ on your system (before running celery) using:

apt-get install rabbitmq-server

Monitoring Celery

Celery does not explicitly show the status of the runs by default. flower, a Python package, is a web-based tool for monitoring and administrating Celery.

To install the flower package,

pip install flower

You can monitor the celery cluster doing the following:

flower -A gem5art.tasks.celery --port=5555

This will start a webserver on port 5555.

Removing all tasks

celery -A gem5art.tasks.celery purge

Viewing state of all jobs in celery

celery -A gem5art.tasks.celery events

Tasks API Documentation

Task
----

.. automodule:: gem5art.tasks.tasks
    :members:
    :undoc-members:

.. automodule:: gem5art.tasks.celery
    :members:
    :undoc-members:

Metadata

Release files for gem5art-tasks 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gem5art-tasks 1.3.1
File Size Uploaded
gem5art-tasks-1.3.1.tar.gz 4.5 kB Details

Release files / gem5art-tasks-1.3.1.tar.gz

Download URL gem5art-tasks-1.3.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
942a6c6e985e9aa24159e46c04c658c991be7fc948b05a674257eda9a5ff6da6
BLAKE2b-256 checksum
How to use checksums
90edaadad4504a4efe85b5b0e01b388e5c3553acffe600c89eee8e4d5f9995e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.6.12

Release history Release notifications | RSS feed

This release

1.3.1 This release

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page