[Fedora][Install] setup.py not detecting already installed mpi4py python module
Hello,
I am writing you about some troubles getting tkwant to install on a Fedora 29 distribution.
Basically, running
$ sudo python3 setup.py install
works till this error happens
Searching for mpi4py>=2.0
Reading https://pypi.org/simple/mpi4py/
Downloading https://files.pythonhosted.org/packages/55/a2/c827b196070e161357b49287fa46d69f25641930fd5f854722319d431843/mpi4py-3.0.1.tar.gz#sha256=6549a5b81931303baf6600fa2e3bc04d8bd1d5c82f3c21379d0d64a9abcca851
Best match: mpi4py 3.0.1
Processing mpi4py-3.0.1.tar.gz
Writing /tmp/easy_install-q8ufhczb/mpi4py-3.0.1/setup.cfg
Running mpi4py-3.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-q8ufhczb/mpi4py-3.0.1/egg-dist-tmp-zgw26_11
/usr/bin/ld: cannot find -llmpe
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lvt-mpi
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lvt.mpi
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lvt-mpi
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lvt.mpi
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lvt-hyb
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lvt.ompi
collect2: error: ld returned 1 exit status
_configtest.c:2:10: fatal error: mpi.h: No such file or directory
#include <mpi.h>
^~~~~~~
compilation terminated.
Apparently two things are happening
- The install script didn't detect an mpi4py install, thus tries to install it himself.
- The install process of the downloaded mpi4py fails because of a lacking C library.
Although I have installed mpi4py, mpich and openmpi with the distro package manager (dnf). The script didn't detect them: there are two python packages for mpi4py, the mpich-based python3-mpi4py-mpich
package and the openmpi-based python3-mpi4py-openmpi
. The install script seems to detect neither of them and I can't find a fix by myself.
I can import mpi4py on my shell if I load a module first (it was written here)
$ module load mpi/openmpi-x86_64
$ python3 -c "import mpi4py"
or
$ module load mpi/mpich-x86_64
$ python3 -c "import mpi4py"
Another fix I can do, that would probably work, is to add for example mpich's folder to the environement for the C compiler to find it when installing mpi4py over the install I already have. Because in C, to include mpi.h
I should do #include <mpich-x86_64/mpi.h>
If you have any suggestion I'd be happy to try!
Thank you.