Hi all, Just made an update to firedrake, and my code breaks down with this PyOP2 error: Traceback (most recent call last): File "2D_OS_boundary_ex3.py", line 286, in <module> op2.par_loop(reactions3_kernel,Q.dof_dset,u0_A.dat(op2.READ),u0_B.dat(op2.READ),c_A.dat(op2.WRITE),c_B.dat(op2.WRITE),c_C.dat(op2.WRITE),k1.dat(op2.READ),ctx(op2.READ)) File "<decorator-gen-272>", line 2, in par_loop File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/versioning.py", line 154, in modifies_arguments retval = func(*args, **kwargs) File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/op2.py", line 278, in par_loop return backends._BackendSelector._backend.par_loop(kernel, iterset, *args, **kwargs) File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/base.py", line 4422, in par_loop return _make_object('ParLoop', kernel, it_space, *args, **kwargs).enqueue() File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/backends.py", line 72, in _make_object return _BackendSelector._backend.__dict__[obj](*args, **kwargs) File "<decorator-gen-29>", line 2, in __init__ File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 129, in wrapper self.check_args(args, kwargs) File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 155, in check_args self.check_arg(arg, argcond, exception) File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 170, in check_arg % (self.file, self.line, arg, argtype)) pyop2.exceptions.SetTypeError: /Users/justin/Software/firedrake/src/PyOP2/pyop2/base.py:4008 Parameter OP2 DataSet: None_nodes_dset on set OP2 Set: None_nodes with size 20301, with dim (1,) must be of type <class 'pyop2.base.Set'> It worked previously, I am guessing the latest change to PyOP2 changed a few things here and there. Attached is the code and the PyOP2 kernel. Thanks, Justin
Hi Justin, we re-added PyOP2 type-checking, which validates that you're iterating over compatible sets. Plausibly you weren't doing that. You can set: parameters["pyop2_options"]["type_check"] = False in the short term. Can you please report this as a github issue so it doesn't get lost over Christmas! Thanks, Lawrence On 17/12/15 16:16, Justin Chang wrote:
Hi all,
Just made an update to firedrake, and my code breaks down with this PyOP2 error:
Traceback (most recent call last):
File "2D_OS_boundary_ex3.py", line 286, in <module>
op2.par_loop(reactions3_kernel,Q.dof_dset,u0_A.dat(op2.READ),u0_B.dat(op2.READ),c_A.dat(op2.WRITE),c_B.dat(op2.WRITE),c_C.dat(op2.WRITE),k1.dat(op2.READ),ctx(op2.READ))
File "<decorator-gen-272>", line 2, in par_loop
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/versioning.py", line 154, in modifies_arguments
retval = func(*args, **kwargs)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/op2.py", line 278, in par_loop
return backends._BackendSelector._backend.par_loop(kernel, iterset, *args, **kwargs)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/base.py", line 4422, in par_loop
return _make_object('ParLoop', kernel, it_space, *args, **kwargs).enqueue()
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/backends.py", line 72, in _make_object
return _BackendSelector._backend.__dict__[obj](*args, **kwargs)
File "<decorator-gen-29>", line 2, in __init__
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 129, in wrapper
self.check_args(args, kwargs)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 155, in check_args
self.check_arg(arg, argcond, exception)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 170, in check_arg
% (self.file, self.line, arg, argtype))
pyop2.exceptions.SetTypeError: /Users/justin/Software/firedrake/src/PyOP2/pyop2/base.py:4008 Parameter OP2 DataSet: None_nodes_dset on set OP2 Set: None_nodes with size 20301, with dim (1,) must be of type <class 'pyop2.base.Set'>
It worked previously, I am guessing the latest change to PyOP2 changed a few things here and there. Attached is the code and the PyOP2 kernel.
Thanks, Justin
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
Lawrence, Okay, got it thanks. Justin On Thu, Dec 17, 2015 at 8:19 AM, Lawrence Mitchell < lawrence.mitchell@imperial.ac.uk> wrote:
Hi Justin,
we re-added PyOP2 type-checking, which validates that you're iterating over compatible sets. Plausibly you weren't doing that.
You can set:
parameters["pyop2_options"]["type_check"] = False
in the short term.
Can you please report this as a github issue so it doesn't get lost over Christmas!
Thanks,
Lawrence
On 17/12/15 16:16, Justin Chang wrote:
Hi all,
Just made an update to firedrake, and my code breaks down with this PyOP2 error:
Traceback (most recent call last):
File "2D_OS_boundary_ex3.py", line 286, in <module>
op2.par_loop(reactions3_kernel,Q.dof_dset,u0_A.dat(op2.READ),u0_B.dat(op2.READ),c_A.dat(op2.WRITE),c_B.dat(op2.WRITE),c_C.dat(op2.WRITE),k1.dat(op2.READ),ctx(op2.READ))
File "<decorator-gen-272>", line 2, in par_loop
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/versioning.py", line 154, in modifies_arguments
retval = func(*args, **kwargs)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/op2.py", line 278, in par_loop
return backends._BackendSelector._backend.par_loop(kernel, iterset, *args, **kwargs)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/base.py", line 4422, in par_loop
return _make_object('ParLoop', kernel, it_space, *args, **kwargs).enqueue()
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/backends.py", line 72, in _make_object
return _BackendSelector._backend.__dict__[obj](*args, **kwargs)
File "<decorator-gen-29>", line 2, in __init__
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 129, in wrapper
self.check_args(args, kwargs)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 155, in check_args
self.check_arg(arg, argcond, exception)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 170, in check_arg
% (self.file, self.line, arg, argtype))
pyop2.exceptions.SetTypeError: /Users/justin/Software/firedrake/src/PyOP2/pyop2/base.py:4008 Parameter OP2 DataSet: None_nodes_dset on set OP2 Set: None_nodes with size 20301, with dim (1,) must be of type <class 'pyop2.base.Set'>
It worked previously, I am guessing the latest change to PyOP2 changed a few things here and there. Attached is the code and the PyOP2 kernel.
Thanks, Justin
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
Hi Lawrence, So what exact are "compatible sets?" I have the following: Q = FunctionSpace(mesh, "CG", 1) W = Q*Q u0 = Function(W) u0_A,u0_B = u0.split() W_R = Q*Q*Q c = Function(W_R) c_A,c_B,c_C = c.split() ... op2.par_loop(reactions3_kernel,Q.dof_dset,u0_A.dat(op2.READ),u0_B.dat(op2.READ),c_A.dat(op2.WRITE),c_B.dat(op2.WRITE),c_C.dat(op2.WRITE)) I would think they're all "compatible" since all five of functions belong to Q space? Thanks, Justin On Thu, Dec 17, 2015 at 8:19 AM, Lawrence Mitchell < lawrence.mitchell@imperial.ac.uk> wrote:
Hi Justin,
we re-added PyOP2 type-checking, which validates that you're iterating over compatible sets. Plausibly you weren't doing that.
You can set:
parameters["pyop2_options"]["type_check"] = False
in the short term.
Can you please report this as a github issue so it doesn't get lost over Christmas!
Thanks,
Lawrence
On 17/12/15 16:16, Justin Chang wrote:
Hi all,
Just made an update to firedrake, and my code breaks down with this PyOP2 error:
Traceback (most recent call last):
File "2D_OS_boundary_ex3.py", line 286, in <module>
op2.par_loop(reactions3_kernel,Q.dof_dset,u0_A.dat(op2.READ),u0_B.dat(op2.READ),c_A.dat(op2.WRITE),c_B.dat(op2.WRITE),c_C.dat(op2.WRITE),k1.dat(op2.READ),ctx(op2.READ))
File "<decorator-gen-272>", line 2, in par_loop
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/versioning.py", line 154, in modifies_arguments
retval = func(*args, **kwargs)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/op2.py", line 278, in par_loop
return backends._BackendSelector._backend.par_loop(kernel, iterset, *args, **kwargs)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/base.py", line 4422, in par_loop
return _make_object('ParLoop', kernel, it_space, *args, **kwargs).enqueue()
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/backends.py", line 72, in _make_object
return _BackendSelector._backend.__dict__[obj](*args, **kwargs)
File "<decorator-gen-29>", line 2, in __init__
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 129, in wrapper
self.check_args(args, kwargs)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 155, in check_args
self.check_arg(arg, argcond, exception)
File "/Users/justin/Software/firedrake/src/PyOP2/pyop2/utils.py", line 170, in check_arg
% (self.file, self.line, arg, argtype))
pyop2.exceptions.SetTypeError: /Users/justin/Software/firedrake/src/PyOP2/pyop2/base.py:4008 Parameter OP2 DataSet: None_nodes_dset on set OP2 Set: None_nodes with size 20301, with dim (1,) must be of type <class 'pyop2.base.Set'>
It worked previously, I am guessing the latest change to PyOP2 changed a few things here and there. Attached is the code and the PyOP2 kernel.
Thanks, Justin
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
Yes, adding .set works. Thanks! On Thursday, December 17, 2015, Lawrence Mitchell < lawrence.mitchell@imperial.ac.uk> wrote:
On 17 Dec 2015, at 19:01, Justin Chang <jychang48@gmail.com <javascript:;>> wrote:
op2.par_loop(reactions3_kernel,Q.dof_dset,
Does it work if you use Q.dof_dset.set here? I forget if one can iterate over datasets, or only sets.
Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk <javascript:;> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (2)
- 
                
                Justin Chang
- 
                
                Lawrence Mitchell