Reputation: 1
Recently, I downloaded and installed Fedora Scientific 20 as I was impressed with the list of included software. My interest in the software is due to the inclusion of the MPI framework. I was able to compile and execute a simple C program using mpicc and mpiexec. However, I need some help using MPI4PY to call OpenMPI using Python code.
At the terminal prompt, if I try:
$ /lib64/openmpi/bin/mpiexec -n 2 python3 helloworld.py
The Traceback reports that an
ImportError: No module named 'mpi4py'
has been raised. The helloworld.py program was an example found online with
line 6 being from mpi4py import MPI
.
Since Apper indicates that mpi4py has been installed for both Python2 and Python3 for OpenMPI as part of the installation of Fedora Scientific, I'm not sure what might be wrong. Could somebody please advise as to how to use this package?
Upvotes: 0
Views: 420
Reputation: 5223
It sounds like there is something wrong with your environment. Perhaps mpi4py, since you have confirmed it is installed, is installed in a a strange place. Would setting PYTHONPATH help?
https://docs.python.org/2/using/cmdline.html#environment-variables
Upvotes: 0