Reputation: 670
it's my first post here so apologies if my style is wrong!
I've been trying to install mpi4py (as SU2 requires it for parallel processing) on Ubuntu 16.04 using python 3.6. I downloaded mpi4py and tried to build from source as I would like to use the OpenMPI libraries I had configured, and tried the following:
sudo python setup.py build --mpicc=/opt/openmpi/openmpi-2.1.0/bin/mpicc
However, it ultimately fails with "error: Cannot link MPI programs. Check your configuration!!!"
Looking at the SU2 and mpi4py documentation, they recommend using pip instead. I also tried this:
sudo pip install mpi4py
and env MPICC=/opt/openmpi/openmpi-2.1.0/bin/mpicc pip install mpi4py
but they also gave the same error.
I have saved both outputs - please see the link for the attachments. It seems to pick up on a lot of the files from my NVIDIA CUDA installation, though I'm not sure why.
I'm a beginner at at compiling programs so I'd appreciate it if anyone could shed any light on this? Thanks.
Upvotes: 4
Views: 9412
Reputation: 126
Though its an old post but I will post my answer might help others.
I fixed this problem by following commands:
sudo apt install libopenmpi-dev
pip install mpi4py`
Upvotes: 3
Reputation: 670
For anyone else who is struggling with this problem, it turned out to be a number of factors. Mainly, mpi4py was not building correctly as my implementation of MPI (openMPI) had not been properly built. There were many factors that differentiated building programs on an existing supercomputer and a fresh Linux install.
Some troubleshooting tips I can recommend are:
Make sure you clear away any environmental variables which are unnecessary for the install using unset
Unload any modules which may interfere with the install using module unload
. This is especially true when building your own MPI implementation on a supercomputer which has several others loaded already.
Check your $PATH
variable for any locations which may contaminate your install (not forgetting that the order is important)! You may want to temporarily set a cleaner PATH variable to make sure the build picks up the correct libraries.
Hope this helps.
Upvotes: 1