On Mar 31, 2011, at 1:47 PM, Jacek Hoffman wrote:

> You were right, it was lack of the mpi4py module.

I don't think it's this simple. PyTrilinos doesn't need mpi4py.


> Now everything works.
> There are no errors provided mpi4py is imported prior to fipy or
> trilinos, e.g in the script:
> 
> from mpi4py import *
> import fipy
> 
> or in ipython:
> 
> In [1]: from mpi4py import *
> 
> In [2]: from PyTrilinos import Epetra
> 
> In [3]: comm = Epetra.PyComm()
> 
> In [4]: comm.MyPID()
> Out[4]: 0

Even with mpi4py installed, you still have to import it before you can `import 
fipy`?

Certainly PyTrilinos doesn't care whether mpi4py is installed or not. 

I would guess that libopenmpi-dev is the key missing component. You probably 
need to rebuild (or have the package manager reinstall) PyTrilinos to use this 
libopenmpi-dev and/or you still do need to set LD_LIBRARY_PATH. Probably 
importing mpi4py gets the MPI library loaded so that PyTrilinos can then use 
it, but it's not installed such that PyTrilinos can find it on its own, and it 
should be.




Reply via email to