Installing kwant 1.2.2 on Fedora 24

Hi all, what follows is a short story about installing kwant 1.2.2 on Fedora 24. So, I installed kwant 1.2.2. and all necessary dependencies with pip. In particular, I also installed MUMPS-devel – not with pip, obviously, but with the Fedora package manager dnf, which automatically also installs the packages MUMPS and MUMPS-common. However, after finishing the installation and trying to import kwant, the following warning appeared: /home/nefta/.virtualenvs/testKwant/lib/python3.5/site-packages/kwant/solvers/default.py:18: RuntimeWarning: MUMPS is not available, SciPy built-in solver will be used as a fallback. Performance can be very poor in this case. "Performance can be very poor in this case.", RuntimeWarning) Seems like kwant could not link against the already installed MUMPS-devel libraries. To solve that, Joe and I removed kwant and installed it again but this time from source and created a build.conf file that contains the following lines: [mumps] libraries = zmumps mumps_common include_dirs = /usr/include/MUMPS This seemed to fix it. So, if you are using Fedora 24 and want to use kwant with MUMPS and do not want to install conda for reasons, that is a possible workaround. Cheers, Nefta

Hi Nefta,
Seems like kwant could not link against the already installed MUMPS-devel libraries. To solve that, Joe and I removed kwant and installed it again but this time from source and created a build.conf file that contains the following lines:
[mumps] libraries = zmumps mumps_common include_dirs = /usr/include/MUMPS
Thanks for the information! This will be useful to anyone looking to install Kwant on Fedora who does not want to use Conda. To summarize, building Kwant with MUMPS support on Fedora requires the following steps: - Install the 'Mumps-devel' package using the distribution's package manager (probably 'yum' or 'dnf'). - Download the Kwant source code (you can either clone the repository using 'git' or download one of the tagged versions [1]) - Create a file 'build.conf' in the root directory of the extracted Kwant source code, with the contents [mumps] libraries = zmumps mumps_common include_dirs = /usr/include/MUMPS - Run 'python3 setup.py install' to build and install Kwant (you may need to prepend 'sudo' to this last command) Happy Kwanting, Joe [1]: https://gitlab.kwant-project.org/kwant/kwant/tags

Kwant's (development version) setup.py understands the option --configfile to specify an alternative path for "build.conf". Together with pip's --global-option it should be possible to use a custom build.conf also when installing with pip. Something like this: pip3 --global-option="--configfile=/tmp/buid.conf" install git+https://gitlab.kwant-project.org/kwant/kwant.git
participants (3)
-
Christoph Groth
-
Joseph Weston
-
Nefta Kanilmaz