I would like to know what languages Microsoft MPI support? I could not find those information on https://msdn.microsoft.com/en-us/library/bb524831(v=vs.85).aspx However, the inside function reference only have the C++ and FORTRAN documentation. Thus, can I say it support only C++ and FORTRAN? Does it support python? I would prefer to python in my project. Thank you!
1 Answers
MS-MPI, based on MPICH with modifications, provides the MPI-standard C, C++ and Fortran interfaces.
If you want Python (or Rust, or Julia, or whatever language you like), there are good 3rd party packages for that. MPI4PY ( is an excellent Python library for MPI, and works with lots of MPI implementations. See this question if you get stuck ( How to successfully compile mpi4py using MS HPC Server 2008 R2's MPI stack? ) but it sounds like nowadays mpi4py "just works".
Legos make a good analogy here. MPI (any implementation) is like a big base plate. Maybe it's green, red, blue, but it's a standard foundation for "stuff". You don't have to use MS-MPI. you can use anything. mpi4py is a library. It provides the python routines and makes C mpi calls for you under the covers. mpi4py doesn't care (too much) about if it's plugged into a green base plate or a red one. the standard API allows this interoperability
In your case, you want to make python calls. mpi4py will provide you python and make the MS-MPI calls for you. mpi4py by itself is kind of useless. It needs an MPI library. MS-MPI is a good MPI library for your platform. You'll need to set up MS-MPI first, then set up mpi4py. If you want to one day take your code somewhere else, you might need a different MPI library. Good news: the standard means swapping out MPI libraries (because you want to try something new or because you went to a different platform) is easy to do

- 1
- 1

- 5,085
- 3
- 27
- 44
-
I am confused with "How to successfully compile mpi4py using MS HPC Server 2008 R2's MPI stack?" MPI4PY in my understanding is a python mpi library and how it can work with MS MPI package? – bunny Jun 23 '15 at 12:27
-
Think about legos. MPI (any implementation) is like a big base plate. Maybe it's green, red, blue, but it's a standard foundation for "stuff". You don't have to use MS-MPI. you can use anything. mpi4py is a library. It provides the python routines and makes C mpi calls for you under the covers. mpi4py doesn't care (too much) about if it's plugged into a green base plate or a red one. the standard API allows this interoperability. – Rob Latham Jun 23 '15 at 13:57
-
So I can think MS-MPI as the big base plate and mpi4py is like a interface can be hocked up with MS-MPI so that mpi4py actually calls the underlying MS-MPI functions? – bunny Jun 25 '15 at 14:51
-
that's exactly it. you want to make python calls, so mpi4py will provide you python and make the MS-MPI calls for you. – Rob Latham Jun 25 '15 at 14:58
-
Thank you! To conclude, just download and install mpi4py is not enough to make use of mpi since mpi4py needs to combine with some mpi kernel to make use of multi-core or multi-machine power. – bunny Jun 25 '15 at 15:22
-
mpi4py by itself is kind of useless. It needs an MPI library. MS-MPI is a good MPI library for your platform, so yes, you'll need to set up MS-MPI first, then set up mpi4py. If you want to one day take your code somewhere else, you might need another one. Good news: the standard means this is easy to do. – Rob Latham Jun 25 '15 at 15:24
-
Thanks very much for your explanation and patience! – bunny Jun 25 '15 at 15:30