← Back to team overview

dolfin team mailing list archive

Re: MPI problem with python demos

 

On Fri, Sep 25, 2009 at 09:03:20AM +0200, Harish Narayanan wrote:
> Has anyone seen the following problem when trying to run python demos?
> The C++ demos work, both in serial and in parallel. When I try to run
> python demos (either in serial or in parallel), I receive the following
> (on a hardy machine):
>
>
> $ python demo.py
>
> Traceback (most recent call last):
>   File "demo.py", line 16, in <module>
>     V = VectorFunctionSpace(mesh, "CG", 1)
>   File
> "/home/harish/Work/FEniCS/build/lib/python2.5/site-packages/dolfin/functionspace.py",
> line 271, in __init__
>     spaces = dim*[FunctionSpace(mesh, family, degree, restriction)]
>   File
> "/home/harish/Work/FEniCS/build/lib/python2.5/site-packages/dolfin/functionspace.py",
> line 194, in __init__
>     FunctionSpaceBase.__init__(self, mesh, element)
>   File
> "/home/harish/Work/FEniCS/build/lib/python2.5/site-packages/dolfin/functionspace.py",
> line 43, in __init__
>     ufc_element, ufc_dofmap = jit(self._element)
>   File
> "/home/harish/Work/FEniCS/build/lib/python2.5/site-packages/dolfin/jit.py",
> line 43, in mpi_jit
>     if MPI.num_processes() == 1:
> TypeError: num_processes() takes exactly 1 argument (0 given)

Mikael Mortensen had the same problem yesterday.

What is MPI on your system? Is it the DOLFIN MPI class or something
else?

In [1]: from dolfin import *

In [2]: print MPI
------> print(MPI)
<class 'dolfin.cpp.MPI'>

In [3]: print MPI.__doc__
------> print(MPI.__doc__ )

    This class provides utility functions for easy communcation with
    MPI.

    C++ includes: MPI.h


In [4]: print MPI.num_processes
------> print(MPI.num_processes)
<function num_processes at 0x1ec8758>

In [5]: print MPI.num_processes.__doc__
------> print(MPI.num_processes.__doc__)
num_processes() -> uint

--
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References