On Tue, Mar 29, 2011 at 12:06 PM, Jacek Hoffman <jhoff...@ippt.gov.pl> wrote: > > Hi all, > I'm using FiPy on Debian GNU/Linux. > There is a problem with python 2.6 as follows:
Actually, there isn't a problem with running FiPy with python 2.6 in general, I do it regularly. > jacek@computer01:~$ python2.6 > Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> from fipy import * > *** The MPI_comm_size() function was called before MPI_INIT was invoked. > *** This is disallowed by the MPI standard. > *** Your MPI job will now abort. > [computer01:3181] Abort before MPI_INIT completed successfully; not able > to guarantee that all other processes were killed! I would hazard a guess that the Triilinos installation is broken in some way. What happens when you do >>> from PyTrilinos import Epetra and >>> comm = Epetra.PyComm() >>> comm.MyPID() Do you get the same errors? > Fortunately I have also python 2.5 installed and when invoking FiPy from > it everything works as expected except Trilinos (it needs python2.6). > I believe the above is not specific to Debian, reveals rather some changes > in python modules. I think there is a Trilinos Debian package. http://packages.debian.org/squeeze/libtrilinos Did you install that? > So far using FiPy with python 2.5 and without Trilinos is OK for me, > however I'm worrying about future compatibility. Or there are some > environmental variables for parallel computing what need proper setting. That is possible. Try to get PyTrilinos working independently of FiPy. Try running from PyTrilinos import Epetra comm = Epetra.PyComm() print comm.MyPID() with "mpirun -np 2 python script.py". Get that working and then worry about FiPy. What happens when you run from fipy import * in a file and run with the "--pysparse" command line argument ("python script.py --pypsparse")? Ideally, that would never even attempt any Trilinos or mpi4py imports, but I think it does. I think we should change it so it doesn't. It is often the case that Trilinos breaks in some way so even importing in a try-except block breaks things. Cheers -- Daniel Wheeler