I'm new to MPI, but I have been trying to use it on a cluster with OpenMPI. I'm having the following problem:
$ python -c "from mpi4py import MPI"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: libmpi.so.1: cannot open shared object file: No such file or directory
I've done some research and tried a few things including:
module load mpi/openmpi-x86_64
which doesn't seem to change anything. My LD_LIBRARY_PATH seems to be set correctly, but the desired "libmpi.so.1" does not exist. Instead, there is "libmpi.so.12":
$ echo $LD_LIBRARY_PATH
/usr/lib64/openmpi/lib:/usr/local/matio/lib:/usr/lib64/mysql:/usr/local/knitro/lib:/usr/local/gurobi/linux64/lib:/usr/local/lib:
$ls /usr/lib64/openmpi/lib
... libmpi.so libmpi.so.12 libmpi.so.12.0.0 libmpi_usempi.so ...
I can't uninstall/re-install mpi4py because it's outside my virtual environment / I don't have the permissions to uninstall it on the general cluster. I've seen this: Error because file libmpi.so.1 missing, but not sure how I can create a symbolic link / don't think I have permission to modify the folder.
I'm somewhat out of ideas: Not sure if it's possible to have a separate install of mpi4py on my virtualenv, or whether I can specify the correct file to mpi4py temporarily?
Any suggestions would be greatly appreciated!
Update: I ran find /usr -name libmpi.so.1 2>/dev/null
as suggested, which returned usr/lib64/compat-openmpi16/lib/libmpi.so.1
. Using export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"/usr/lib64/compat-openmpi16/lib/"
, python -c "from mpi4py import MPI"
runs without any problems. However, if I try mpiexec -np 2 python -c 'from mpi4py import MPI'
, I get the following error:
[[INVALID],INVALID] ORTE_ERROR_LOG: Not found in file ess_env_module.c at line 367
[[INVALID],INVALID]-[[28753,0],0] mca_oob_tcp_peer_try_connect: connect to 255.255.255.255:37376 failed: Network is unreachable (101)