ipyparallel 与 mpi 找不到引擎
ipyparallel with mpi cannot find engines
我正在尝试按照 in the ipyparallel documentation 所述使用 mpi4py 获得一个基本的 ipyparallel 环境。启动 ipcluster 后,我加载 ipython 并尝试创建一个客户端,但它没有 ID 并且访问 directview returns 一个 NoEnginesRegistered
异常。
我为达到这一点所采取的步骤:
- 创建新环境:
conda create --name=ipyparallel
和 source activate ipyparallel
- 安装ipyparallel和mpi4py:
conda install ipyparallel mpi4py
- 创建一个新的 ipython 配置文件:
ipython profile create --parallel --profile=mpi
- 编辑 ~/.ipython/profile_mpi/ipcluster_config.py 并添加
c.IPClusterEngines.engine_launcher_class = 'MPIEngineSetLauncher'
- 使用
ipcluster start --profile=mpi
启动集群
然后我启动 ipython 和 运行 以下内容:
import ipyparallel as ipp
c = ipp.client(profile="mpi")
c[:] # <-- NoEnginesRegistered exception
第 5 步报告 "Engines appear to have started successfully",我可以看到名为 "mpiexec" 的进程正在 运行ning。奇怪的是,我在另一台具有相同 OS 的机器上尝试了这些相同的步骤,并且没有任何问题。我错过了什么?
我为遇到类似问题的任何人解决了这个问题。在安装过程中,我将笔记本扩展添加到 jupyter 的全局配置中。不确定为什么会导致此问题,但现在已修复。在 conda 环境之外,我 运行:
sudo pip install ipyparallel
sudo jupyter nbextension disable --py ipyparallel
sudo jupyter nbextension uninstall --py ipyparallel
sudo pip uninstall ipyparallel
然后在 conda 环境中,我可以连接到 ipyparallel 引擎。
我正在尝试按照 in the ipyparallel documentation 所述使用 mpi4py 获得一个基本的 ipyparallel 环境。启动 ipcluster 后,我加载 ipython 并尝试创建一个客户端,但它没有 ID 并且访问 directview returns 一个 NoEnginesRegistered
异常。
我为达到这一点所采取的步骤:
- 创建新环境:
conda create --name=ipyparallel
和source activate ipyparallel
- 安装ipyparallel和mpi4py:
conda install ipyparallel mpi4py
- 创建一个新的 ipython 配置文件:
ipython profile create --parallel --profile=mpi
- 编辑 ~/.ipython/profile_mpi/ipcluster_config.py 并添加
c.IPClusterEngines.engine_launcher_class = 'MPIEngineSetLauncher'
- 使用
ipcluster start --profile=mpi
启动集群
然后我启动 ipython 和 运行 以下内容:
import ipyparallel as ipp
c = ipp.client(profile="mpi")
c[:] # <-- NoEnginesRegistered exception
第 5 步报告 "Engines appear to have started successfully",我可以看到名为 "mpiexec" 的进程正在 运行ning。奇怪的是,我在另一台具有相同 OS 的机器上尝试了这些相同的步骤,并且没有任何问题。我错过了什么?
我为遇到类似问题的任何人解决了这个问题。在安装过程中,我将笔记本扩展添加到 jupyter 的全局配置中。不确定为什么会导致此问题,但现在已修复。在 conda 环境之外,我 运行:
sudo pip install ipyparallel
sudo jupyter nbextension disable --py ipyparallel
sudo jupyter nbextension uninstall --py ipyparallel
sudo pip uninstall ipyparallel
然后在 conda 环境中,我可以连接到 ipyparallel 引擎。