Oceananigans.jl icon indicating copy to clipboard operation
Oceananigans.jl copied to clipboard

Removed tullio dependency

Open simone-silvestri opened this issue 3 years ago • 7 comments

simone-silvestri avatar Feb 17 '22 04:02 simone-silvestri

Does this have advantages in terms of speed?

tomchor avatar Feb 17 '22 22:02 tomchor

I don't thinks so. I'll try to benchmark it

simone-silvestri avatar Feb 18 '22 12:02 simone-silvestri

Does this have advantages in terms of speed?

I think we hope the code is similar under the hood but it's hard to say without knowing more about Tullio.

This update is more general though, because it will work out of the box on distributed systems / multiple GPUs / multi region scenarios like the cubed sphere (because we will support reductions for those cases).

glwagner avatar Feb 18 '22 12:02 glwagner

I admit that I had to look up Tullio.jl to learn that it helps with matrix operations. Good for me to know, but if it's going away then maybe no longer essential.

I gather that abs is being replaced with another version. Where does the new version come from?

Also, I remember a while ago having issues with computing norms on GPUs. Does this help with that at all?

francispoulin avatar Feb 18 '22 15:02 francispoulin

abs is the classical one, I just needed to add it to the list of unary operators that can be applied as an AbstractOperation to a field. I think norm is defined for Fields but not as a "lazy" operation (i.e., it always immediately returns a value)

simone-silvestri avatar Feb 18 '22 15:02 simone-silvestri

@simone-silvestri I refactored the CFL calculation so that we only have one function all the time, rather than one "ordinary" and one "accurate".

The tests still fail though. I'm not totally sure why, but I am somewhat confused how this is supposed to work on a staggered grid. I don't think we can apply wikipedia's definition; we need the definition that's correct for a C grid.

glwagner avatar Mar 03 '22 13:03 glwagner

Oy, I guess we're still defeated here.

glwagner avatar Mar 23 '22 21:03 glwagner

This smells stale… what should we do?

navidcy avatar Feb 05 '23 00:02 navidcy

I think the conclusion is that we need to use mapreduce to avoid Tullio, but we can't use AbstractOperations (because the CFL formula involves an operation between fields at different locations, which AbstractOperations are not designed to do)

glwagner avatar Feb 05 '23 04:02 glwagner

Okie. We can close then?

navidcy avatar Feb 05 '23 05:02 navidcy

If @simone-silvestri is ok to shelve and revisit later then yes

glwagner avatar Feb 05 '23 19:02 glwagner

let's do it

simone-silvestri avatar Feb 05 '23 20:02 simone-silvestri