Skip to content

empter/PYFEAST

Repository files navigation

PYFEAST

call FEAST sparse eigensolver in Python. Depends on python3, numpy, scipy, cython, and Intel MKL/OpenBLAS.

Solve standard HX=EX problem, H can be Real-Symmetric, Complex Hermitian, or General in csr_matrix format.

Setup

Step by step setup for Ubuntu 18.08, a recent linux dist. should also work.

  1. download all files from PYFEAST in a folder, e.g., pyfeast/. PYFEAST alread contains FEAST source code and the directory stracture is slightly modified. If FEAST source code needs update, just replace inlcude/ and src/ under FEAST/ folder by those corresponding folders in an offical release.

  2. install essential packages.

  • sudo apt update (optional)

  • sudo apt install build-essential gfortran

  1. (MKL user) install Intel MKL library, following Intel web site, at lest install component Intel® Math Kernel Library.
  • Activite MKL variables in terminal source /opt/intel/mkl/bin/mklvars.sh intel64
  1. (openblas user) install openblas library, sudo apt install libopenblas-dev

  2. install Python3, Anaconda or miniconda is recommanded.

  • then install python packages conda install numpy scipy cython

  • install quspin (optional) conda install -c weinbe58 quspin, if quspin=0.3.4, then also conda install numba=0.48.0

  1. build FEAST library.
  • (MKL user) go to folder pyfeast/FEAST/src, run make feast

  • (openblas user) go to folder pyfeast/FEAST/src, run make MKL=no feast

  1. build PYFEAST python package.
  • (MKL user) go to folder pyfeast/cython_feast, run python3 setup.py build_ext install

  • (openblas user) go to folder pyfeast/cython_feast, run python3 setup_openblas.py build_ext install

  1. see example, usage & test (quspin JupyterNotebook/VSCode needed, optional).
  • check quspin_feast_general.ipynb for general matrix

  • check quspin_feast_hermitian.ipynb for Hermitian system

Uninstall or reinstall

  • remove feast pip3 uninstall feast and reinstall PYFEAST python package (step 6).