问题描述
我正在尝试使用 mpi4py.
I'm trying to use mpi4py.
我从 Anaconda 包安装了 mpi4py,并且
I have mpi4py installed from the Anaconda package, and
pip install mpi4py
认识到这一点.
但是当我跑步时
from mpi4py import MPI
说 MPI 模块不存在.
says MPI module doen't exist.
我查看了 mpi4py 文件夹,确实找不到.
I've looked in the mpi4py folder and indeed i can't find it.
我认为问题在于我可能没有安装 OpenMPI,但我到处寻找,但找不到如何在 Windows 10 上安装 ir.
i think the problem is that i might not have OpenMPI installed, but i've been looking everywhere and i can't find how to install ir on Windows 10.
请帮忙.
最初的问题是关于在 Windows 10 上安装 OpenMPI 并将其与 mpi4py 一起使用,但由于我找到了一种使用 MPI4py 运行 mpi4py 的方法,因此我更改了标题,因此尝试这样做的人至少有一个解决方法.
The original question was about installing OpenMPI on windows 10 and use it with mpi4py, but since i found a way to run mpi4py with MSMPI i changed the title so people trying to do the same at least have a work-around.
推荐答案
并不是真正的解决方案.但是我发现安装 MSMPI 可以与 mpi4py 一起使用.即使使用 Anaconda 中分发的版本,MSMPI 也可以开箱即用(据我尝试).
Not really a solution. But i found that installing MSMPI works with mpi4py.Even using the version distributed in Anaconda, with MSMPI works out of the box (as far as i've tried).
它是 mpi4py 问题的解决方案,尽管它没有安装实际的 OpenMPI,因此它可能不适用于其他语言和实现.
It's a solution to the mpi4py problem, though it's not installing the actual OpenMPI so it might not work for other languages and implementations.
这篇关于如何让 mpi4py 在 Windows 上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!