Quick installation guide#

Warning

Not all AiiDA functionality is supported by the quick installation. Please refer to the section below for more information and see the complete installation guide for instructions to set up a feature-complete and performant installation.

First, install the aiida-core Python package:

pip install aiida-core

Next, set up a profile where all data is stored:

verdi presto

Verify that the installation was successful:

verdi status

If none of the lines show a red cross, indicating a problem, the installation was successful and you are good to go.

What next?

If you are a new user, we recommend to start with the basic tutorial. Alternatively, check out the next steps guide.

Problems during installation?

If you encountered any issues, please refer to the troubleshooting section.

Quick install limitations#

A setup that is ideal for production work requires the PostgreSQL service and a message broker. By default, verdi presto creates a profile that allows running AiiDA without these:

  • Database: The PostgreSQL database that is used to store queryable data, is replaced by SQLite.

  • Broker: The message broker that allows communication with and between processes is either set to the built-in ZeroMQ broker (automatic fallback) or disabled entirely.

The following matrix shows the possible combinations of the database and broker options and their use cases:

SQLite database

PostgreSQL database

No broker

Quick start with AiiDA

[not really relevant for any usecase]

ZeroMQ broker

Getting started, light production

Production (no external services required)

RabbitMQ

Production (low-throughput; beta, has limitations)

Production (maximum performance, ideal for high-throughput)

New in version 2.9: The ZeroMQ broker row was added. Previously, only RabbitMQ and no-broker configurations were available.

The sections below provide details on the use of the PostgreSQL and RabbitMQ services and the limitations when running AiiDA without them.

Message broker#

Part of AiiDA’s functionality requires a message broker. The message broker is used to allow communication with processes and the daemon as well as between themselves. AiiDA supports two broker backends:

  • ZeroMQ broker (built-in): A lightweight broker that uses ZeroMQ for inter-process communication. It requires no external services and is started automatically with the daemon.

  • RabbitMQ: An external message broker service that must be installed and managed separately.

New in version 2.9: The built-in ZeroMQ broker was added as an alternative to RabbitMQ.

Note

The verdi presto command automatically checks if RabbitMQ is running on the localhost. If it can successfully connect, it configures the profile with RabbitMQ. Otherwise, it falls back to the built-in ZeroMQ broker. If you do not want to use a broker at all, use verdi presto --no-broker.

A profile without any broker has the following limitations:

  • is not suitable for high-throughput workloads (a polling-based mechanism is used rather than an event-based one)

  • cannot run the daemon (no verdi daemon start/stop) and therefore processes cannot be submitted to the daemon (i.e., one can only use run() instead of submit() to launch calculations and workflows)

  • cannot play, pause, kill processes

Tip

A profile created by verdi presto can easily start using RabbitMQ as the broker at a later stage. Once a RabbitMQ service is available (see install RabbitMQ for instructions to install it), run verdi profile configure-broker core.rabbitmq to configure its use for the profile.

PostgreSQL#

AiiDA stores (part of) the data of the provenance graph in a database and the PostgreSQL service provides great performance for use-cases that require high-throughput. Since PostgreSQL is a separate service and is not always trivial to install, the quick installation guide allows setting up a profile that uses the serverless SQLite instead. However, as a result the profile:

  • is not suitable for high-throughput workloads (concurrent writes from multiple processes to the database are serialized)

  • does not support the has_key and contains operators in the QueryBuilder

  • does not support the get_creation_statistics method of the QueryBuilder

Tip

If a PostgreSQL service is available, run verdi presto --use-postgres to set up a profile that uses PostgreSQL instead of SQLite. The command tries to connect to the service and automatically create a user account and database to use for the new profile. AiiDA provides defaults that work for most setups where PostgreSQL is installed on the localhost. Should this fail, the connection parameters can be customized using the --postgres-hostname, --postgres-port, --postgres-username, --postgres-password options.