← Back to team overview

dolfin team mailing list archive

Re: MPI problem with python demos

 

Johan Hake wrote:
> On Friday 25 September 2009 09:03:20 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/function
>> space.py", line 271, in __init__
>>     spaces = dim*[FunctionSpace(mesh, family, degree, restriction)]
>>   File
>> "/home/harish/Work/FEniCS/build/lib/python2.5/site-packages/dolfin/function
>> space.py", line 194, in __init__
>>     FunctionSpaceBase.__init__(self, mesh, element)
>>   File
>> "/home/harish/Work/FEniCS/build/lib/python2.5/site-packages/dolfin/function
>> space.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)
> 
> I guess you have SWIG version 1.3.37?
> 
> A regression bug was introduced in this release for static methods. 
> 
> You should probably upgrade your SWIG. SWIG is now at 1.3.40.
> 
> Should we require SWIG version larger than 1.3.37 in our build system? Would 
> this work for the different ubuntu packages?

Johannes and Johan: Yes, I use swig 1.3.37. I just tried building
everything on bigblue last evening and ran into this problem.

Harish


References