[firedrake] Issues with LMA of vertical derivative on extruded meshes

Lawrence Mitchell lawrence.mitchell at imperial.ac.uk
Mon Jan 5 13:46:58 GMT 2015


On 5 Jan 2015, at 13:02, Eike Mueller <e.mueller at bath.ac.uk> wrote:

> Hi Lawrence and Fabio,
> 
> It works if disable the COFFEE optimisation, as suggested by Andrew on 22/12/2014. I posted this to the list (as a reply to Andrew’s email), but then I later realised that my email reporting the issue (even though I sent it *before* Andrew alerted us about the issue with COFFEE optimisation), arrived on the list *after* my reply to Andrew’s email.
> 
> So at the moment I do indeed use
> 
> parameters["coffee"]["O2"] = False
> 
> and then the problem goes away.
> 
> Apologies for the confusion! There must be a space-time anomaly causing causality violations somewhere between here and London...

So it's not a bug, per se, in coffee, but rather, as I explained an issue with optimisations that changes the kernel signature.

Effectively what happens is something like:

originally the kernel signature is:

void foo(double A[2][1], ...);

after padding it's:

void foo(double A[2][2], ...);

in the wrapper code generator, if we're assembling into a matrix (and we know padding has been applied we do):

double buf[2][1];
double pad_buf[2][2];

foo(pad_buf, ...);

buf[0][0] = pad_buf[0][0];
buf[1][0] = pad_buf[1][0];

MatSetValues(..., buf, ...);

But you're assembling into a Dat and so something like this happens:

double buf[2];

foo(buf, ...);

dat[0..1] = buf[0..1]

So the buffer that's passed to the kernel is the wrong size and even if it were the right size, you're copying the wrong values out.  It would have to beL

double buf[4];
foo(buf, ...);
dat[0] = buf[0];
dat[1] = buf[2];

> Thanks,
> 
> Eike
> 
> PS: Other emails I sent to the list also got delayed, sometimes by several hours, so that’s odd .

Sometimes you send from your gmail address, which is not subscribed to the list and so those mails wait until one of the moderators lets them through.

Lawrence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.ic.ac.uk/pipermail/firedrake/attachments/20150105/d038acb8/attachment.sig>


More information about the firedrake mailing list