Hello everyone,
I am trying to install mpi4py using conda while specifying the path for my installed OpenMPI library, which I am using for PETSc, without conda installing its own mpich.
My OS is Ubuntu 18.0.4. I am using the latest Anaconda release (installed sometime this week).
The OpenMPI bin directory is set to the environment variable PATH.
And the libraries are set to LD_LIBRARY_PATH.
I tried installing mpi4py with:
env MPICC=path/to/ompi/bin/mpicc conda install -c anaconda mpi4py
But I get this message, before accepting/declining to continue:
The following NEW packages will be INSTALLED:
mpi anaconda/linux-64::mpi-1.0-mpich
mpi4py anaconda/linux-64::mpi4py-3.0.3-py37h028fd6f_0
mpich anaconda/linux-64::mpich-3.3.2-hc856adb_0
Which shows that the MPICC environment didn't work, since conda tries to install mpich.
Just to be sure, I had conda install mpi4py with the above configuration and then tried to run the following simple program, called mpi4pyTest.py:
from mpi4py import MPI
comm = MPI.COMM_WORLD
size = comm.Get_size()
rank = comm.Get_rank()
print('Hello from processor {} of {}'.format(rank+1,size))
I ran it with mpirun -n 4 python mpi4pyTest.py
and the output was:
Hello from processor 1 of 1
Hello from processor 1 of 1
Hello from processor 1 of 1
Hello from processor 1 of 1
Which confirmed that mpi4py was not installed using my own mpi.
Is it possible to install mpi4py with Anaconda and link it to an existing MPI installation?
Thank you very much in advance.
Best regards,
Breno Vincenzo de Almeida
DMC FEM Unicamp
Antonio da Costa Santos Av.
13083-890 Campinas, SP - Brazil
~~~~~~~~ |_-|-/\/\ ~~~~~~~~