2

What is the difference between mpich2 and mpi4py? I just installed MPICH2 on my raspbian cluster. Do I need mpi4py as well?

mrlarssen
  • 325
  • 8
  • 19

1 Answers1

2

mpich2 is the underlying library, mpi4py are the Python bindings to it. mpi4py will depend on mpich2 in the same way PySide depends on Qt5.

The pypi page for mpi4py has a description and other information you might want to read:

mpi4py v2.0.0

zxq9
  • 13,020
  • 1
  • 43
  • 60
  • So you can't run mpi4py without mpich2, but I can manage without using mpi4py right? – mrlarssen Nov 08 '15 at 09:49
  • 1
    @mrlarssen You can use mpich2 without mpi4py, but not from Python. If you want to write a Python program that runs within an MPI cluster then you'll need mpi4py. – zxq9 Nov 08 '15 at 09:50
  • thanks a lot :) Spent like 10 hours creating an ansible script for deploying mpich2 to a raspberry cluster, was afraid it was all a waste if I could install mpi4py in just a few minutes without needing mpich2. – mrlarssen Nov 08 '15 at 09:53
  • 1
    @mrlarssen Always look on the bright side. Even if you don't use that code in the end, you learned something, and therefore it was not a waste! \\(^.^)/ – zxq9 Nov 08 '15 at 09:55