Lyncs-API

Logo

A Python API for Lattice QCD applications

View My GitHub Profile

Lyncs-API

A Python API for Lattice QCD applications

Lyncs is a Python API for Lattice QCD, currently under development. Lyncs aims to bring several popular libraries for Lattice QCD under a common framework. Lyncs interfaces with libraries for GPUs and CPUs in a way that can accommodate additional computing architectures as these arise, achieving the best performance for the calculations while maintaining the same high-level workflow.

Lyncs distributes calculations using mpi4py and Dask, with bindings to the libraries performed automatically via cppyy. Multiple distributed tasks can be executed in parallel and different computing units can be used at the same time to fully exploit the machine allocation. While Lyncs is designed to quite generally allow linking to multiple libraries, we focus on a set of targeted packages that include c-lime, DDalphaAMG, tmLQCD and quda. Any contribution to link other libraries is very welcome!

The Lyncs ecosystem

The Lyncs-API is a top-level framework meant to be user-friendly, flexible, modular and extendable. Under the hood, the project is divided in many Python (sub-)modules that serve for a specific or generic purpose. These modules are collected in the Lyncs-API organization and they are shortly described in the following section.

List of Lyncs sub-modules

The modules part of lyncs are the following.

Generic purpose
Interfaces to Lattice QCD libraries
Usage

These modules can be either installed as part of Lyncs, pip install lyncs[NAME] or independently (suggested for now), pip install lyncs_NAME. Please always refer to the README of each module for any issue with the installation and usage examples.

In the first case they can be imported with from lyncs import NAME or, in both cases, with import lyncs_NAME as NAME.

Development status

The Lyncs-API is currently under development. While the single subpackages might have reached a stable and mature level, the final high-level interface still needs to be built. If you are seeking to use parts of Lyncs in your project, please see the next section.

Any news, updates or information about planned events, will be published in the dedicated mailing list. Please consider to join for stayin tuned!

https://groups.google.com/g/lyncs-api

Contributing

Lyncs is an open community effort for developing Lattice QCD applications in Python. We seek for contributions under many aspect: linking to libraries, expanding the features of the API and writing of documentation and educational-oriented notebooks.

If you want to contribute, please express your interest sending an email to Simone Bacchio: s.bacchio@gmail.com with subject starting with “Lyncs-API”.

Developer guide

When contributing to a package, clone the source from github and install the package in development mode:

pip install -e .[all]

Now you can run the test-suite for checking the correctness of the installation:

pytest -v

If everything goes well, you should see all the tests passed and obtain a coverage report.

A main implementation requirement is a high code-coverage. If you are going to implement something new, please, also add the respective test files or functions in the test/ directory.

Another implementation requirement is to format the code via black and to use pylint for improving the code standards.

These packages can be installed via pip:

pip install black lyncs_setuptools[pylint]

Before any commit, run black from the source directory:

black .

When you are done with the implementation, try to resolve as many comments/warnings/errors as possible brought up by pylint:

lyncs_pylint .

Funding