[firedrake] possible lazy evaluation issue?

Cotter, Colin J colin.cotter at imperial.ac.uk
Wed Jul 15 20:27:00 BST 2015


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 at imperial.ac.uk [firedrake-bounces at imperial.ac.uk] on behalf of Andrew McRae [a.mcrae12 at 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 at imperial.ac.uk<mailto:colin.cotter at 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]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 6100 bytes
Desc: not available
URL: <http://mailman.ic.ac.uk/pipermail/firedrake/attachments/20150715/6d6d3a44/attachment.bin>


More information about the firedrake mailing list