Installing Celery

From ASCEND
Jump to: navigation, search

Celery is a task for managing distributed task queues in Python, which makes it a powerful tool for running parallel simulations across multiple computers. This document aims to be a short overview to installing Celery on Ubuntu machines, including how to use Celery for solving parameter sweeps and optimisation studies using ASCEND.

Redis

To store results of calculations, we will use Redis:

$ sudo apt install redis-server

To test that it is working correctly:

$ sudo systemctl status redis
# response includes 'active(running)' and a 'Main PID' should be listed.
$ redis-cli
# the command prompt appears, at which you type 'ping'
120.0.0.1:6379> ping
# response: PONG

RabbitMQ

RabbitMQ does the coordination of tasks, including across multiple machines. We will set it up using standard Ubuntu packages, in contrast to what is suggested in the Celery documentation.

sudo apt install rabbitmq-server