Skip to content

Lyncs-API/lyncs-api.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  • lyncs.setuptools: utils for automatically deducing the setup arguments and for compiling libraries via CMake.

  • lyncs.utils: collection of generic-purpose and stand-alone functions.

  • lyncs.cppyy: utils for binding and using C++ libraries using cppyy.

  • lyncs.mpi: utils for interfacing to MPI libraries using mpi4py and dask.

  • lyncs.io: IO functions (load and save) that support various formats and also parallel IO via MPI and Dask.

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

  • PRACE-6IP, Grant agreement ID: 823767, Project name: LyNcs. Lyncs is one of 10 applications supported by PRACE-6IP, WP8 "Forward Looking Software Solutions".

About

Webpage of the Lyncs-API project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published