Install mpi4py on Windows 10

Install Microsoft MPI

https://www.microsoft.com/en-us/download/details.aspx?id=54607

You need to run both files msmpisdk.msi and MSMpiSetup.exe

Add $PATH$ in the Environment Variables.

$PATH$ is where you install the Microsoft MPI. In my case:

C:\Program Files (x86)\Microsoft SDKs\MPI

Install package in Anaconda

conda install mpi4py

And finally, test the installation

from mpi4py import MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
print (“hello world from process “, rank)

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s