Hi Peter,
On Wed, 22 Feb 2012 16:53:16 +0100, Peter17 <peter017(a)gmail.com> wrote:
> I would like to adapt the Laplacian and Diffusion operators for my own
> usage, but I can't make the corresponding examples work in MPI...
>
> For examples heat/heat.py, poisson/poisson.py and
> poisson/helmholtz.py, If I replace:
> rcon = guess_run_context()
> by
> rcon = guess_run_context(['mpi'])
>
> And run:
> mpirun -n 2 python heat.py
Thanks for the report. I'll look into it, but I'll be traveling for
another week and a half--so it might be a little while.
Andreas
Dear Andreas,
I would like to adapt the Laplacian and Diffusion operators for my own
usage, but I can't make the corresponding examples work in MPI...
For examples heat/heat.py, poisson/poisson.py and
poisson/helmholtz.py, If I replace:
rcon = guess_run_context()
by
rcon = guess_run_context(['mpi'])
And run:
mpirun -n 2 python heat.py
Then, I get the following error:
Traceback (most recent call last):
File "heat.py", line 165, in <module>
main()
File "heat.py", line 131, in main
rhs = op.bind(discr)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/models/diffusion.py",
line 66, in bind
return BoundDiffusionOperator(self, discr)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/models/diffusion.py",
line 98, in __init__
self.compiled_op = discr.compile(op)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/backends/mpi/__init__.py",
line 637, in compile
type_hints=type_hints)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/discretization/__init__.py",
line 1324, in compile
type_hints)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/backends/jit/__init__.py",
line 335, in __init__
post_bind_mapper, type_hints)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/backends/jit/__init__.py",
line 404, in compile_optemplate
return OperatorCompiler(discr)(optemplate, type_hints)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/compiler.py",
line 652, in __call__
result = IdentityMapper.__call__(self, expr)
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 189, in map_sum
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 189, in <genexpr>
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/compiler.py",
line 719, in map_common_subexpression
expr.child, name_hint=expr.prefix)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/backends/jit/compiler.py",
line 178, in map_operator_binding
self, expr, name_hint=name_hint)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/compiler.py",
line 746, in map_operator_binding
self.rec(expr.field))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 194, in map_product
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 194, in <genexpr>
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 189, in map_sum
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 189, in <genexpr>
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/backends/jit/compiler.py",
line 175, in map_operator_binding
return self.map_planned_flux(expr)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/compiler.py",
line 848, in map_planned_flux
for f in fb.flux_exprs]
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/backends/jit/compiler.py",
line 170, in internal_map_flux
return IdentityMapper.map_operator_binding(self, flux_bind)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/optemplate/mappers/__init__.py",
line 163, in map_operator_binding
self.rec(expr.field, *args, **kwargs))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/optemplate/mappers/__init__.py",
line 172, in map_boundary_pair
self.rec(expr.bfield, *args, **kwargs),
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 40, in __call__
return self.map_foreign(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 70, in map_foreign
return self.map_numpy_array(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 223, in map_numpy_array
result[i] = self.rec(expr[i])
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/compiler.py",
line 826, in map_flux_exchange
arg_fields=[self.rec(arg_field) for arg_field in fe.arg_fields],
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/compiler.py",
line 721, in map_common_subexpression
rec_child = self.rec(expr.child)
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 189, in map_sum
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 189, in <genexpr>
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/compiler.py",
line 719, in map_common_subexpression
expr.child, name_hint=expr.prefix)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/backends/jit/compiler.py",
line 178, in map_operator_binding
self, expr, name_hint=name_hint)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/compiler.py",
line 746, in map_operator_binding
self.rec(expr.field))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 189, in map_sum
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 189, in <genexpr>
self.rec(child, *args) for child in expr.children))
File "/usr/local/lib/python2.6/dist-packages/pymbolic-2010.1-py2.6.egg/pymbolic/mapper/__init__.py",
line 42, in __call__
return method(expr, *args)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/backends/jit/compiler.py",
line 175, in map_operator_binding
return self.map_planned_flux(expr)
File "/usr/local/lib/python2.6/dist-packages/hedge-0.91-py2.6-linux-x86_64.egg/hedge/compiler.py",
line 861, in map_planned_flux
raise RuntimeError("flux '%s' not in any flux batch" % expr)
RuntimeError: flux '<Flux((-1)*(Normal(0)*Int[0] +
(-1)*Normal(0)*CSE(0.5*(Int[0] + Ext[0]))))>(u)' not in any flux batch
However, these examples are working very well in CPU and (except
helmholtz.py) single GPU...
Other examples such as advection/advection.py and wave/wave.py are
working well in CPU and MPI...
Can you please have a look at them?
Thanks a lot in advance
Best regards
--
Peter Potrowl
On Tue, 14 Feb 2012 09:09:24 +0100, "Moulin Emmanuel" <Emmanuel.Moulin(a)univ-valenciennes.fr> wrote:
Non-text part: text/html
> Not sure I understand what you mean... I simply let the "pymbolic" module install itself through the git commands indicated on your wiki :
>
> 1. git clone http://git.tiker.net/trees/repotool.git src
>
> 2. src ./repotool clone http://git.tiker.net/trees/ .git
No--try
$ cd pymbolic
$ git pull git://github.com/inducer/pymbolic master
$ python setup.py develop
(while the env is active)
(Btw, please keep the list cc'd)
Andreas