Re: [firedrake] possible lazy evaluation issue?
Low-hanging fruit: Does it go away if you turn off lazy? What happens if you call it on u0 twice in succession (with and without lazy, I guess), do things change? On 15 July 2015 at 20:16, Cotter, Colin J <colin.cotter@imperial.ac.uk> wrote:
Dear Firedrakers, I encountered some spooky behaviour when doing some things with handtooled kernels. It's in the following code: https://gist.github.com/colinjcotter/85106d0f11e2f7c93ede
Sorry that there is so much. The point is that the function limit_slope (which does several things including executing some handtooled kernels) is (I claim) idempotent, however, on line 217, I call it on u0, then assign u0 to u1 in line 218. Then I call limit_slope on u1 in line 219. If I comment out line 219, I get different behaviour, in particular the bounds that are printed out go above 1.0 and below 0.0 on occasion.
It seems like the assign is occurring before some of the kernels (or perhaps the final project) are executed in limit_slope.
Any thoughts?
cheers --cjc
-- http://www.imperial.ac.uk/people/colin.cotter
www.cambridge.org/9781107663916
I don't know how to turn off lazy. I see that the problem also goes away if I call it on u0 twice... cheers --cjc ________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Andrew McRae [a.mcrae12@imperial.ac.uk] Sent: 15 July 2015 20:19 To: firedrake Subject: Re: [firedrake] possible lazy evaluation issue? Low-hanging fruit: Does it go away if you turn off lazy? What happens if you call it on u0 twice in succession (with and without lazy, I guess), do things change? On 15 July 2015 at 20:16, Cotter, Colin J <colin.cotter@imperial.ac.uk<mailto:colin.cotter@imperial.ac.uk>> wrote: Dear Firedrakers, I encountered some spooky behaviour when doing some things with handtooled kernels. It's in the following code: https://gist.github.com/colinjcotter/85106d0f11e2f7c93ede Sorry that there is so much. The point is that the function limit_slope (which does several things including executing some handtooled kernels) is (I claim) idempotent, however, on line 217, I call it on u0, then assign u0 to u1 in line 218. Then I call limit_slope on u1 in line 219. If I comment out line 219, I get different behaviour, in particular the bounds that are printed out go above 1.0 and below 0.0 on occasion. It seems like the assign is occurring before some of the kernels (or perhaps the final project) are executed in limit_slope. Any thoughts? cheers --cjc -- http://www.imperial.ac.uk/people/colin.cotter www.cambridge.org/9781107663916<http://www.cambridge.org/9781107663916> [X]
participants (2)
- 
                
                Andrew McRae
- 
                
                Cotter, Colin J