I'm trying to get a basic ipyparallel environment working using mpi4py as described in the ipyparallel documentation. After starting the ipcluster, I load ipython and try to create a client but it has no IDs and accessing the directview returns a NoEnginesRegistered
exception.
Steps I take to get to this point:
- Create a new environment:
conda create --name=ipyparallel
andsource activate ipyparallel
- Install ipyparallel and mpi4py:
conda install ipyparallel mpi4py
- Create a new ipython profile:
ipython profile create --parallel --profile=mpi
- Edit ~/.ipython/profile_mpi/ipcluster_config.py and add
c.IPClusterEngines.engine_launcher_class = 'MPIEngineSetLauncher'
- Launch cluster with
ipcluster start --profile=mpi
Then I launch ipython and run the following:
import ipyparallel as ipp
c = ipp.client(profile="mpi")
c[:] # <-- NoEnginesRegistered exception
Step 5 reports that "Engines appear to have started successfully" and I can see that a process named "mpiexec" is running. Strangely, I tried these same steps on another machine with the same OS and there it worked with no problems. What am I missing?
I solved the problem for anyone coming here with a similar problem. During installation I had added the notebook extension to jupyter's global config. Not sure why that caused this problem but it's fixed now. Outside of a conda environment, I ran:
and then inside the conda environment I can connect to the ipyparallel engines.