firedrakeproject / asQ

A library for implementing ParaDIAG timestepping algorithms using Firedrake
MIT License
4 stars 1 forks source link

Distributed data #83

Closed JHopeCollins closed 1 year ago

JHopeCollins commented 2 years ago

Three small classes to deal with data on/shared between different ranks.

DistributedDataLayout describes a 1D set of data partitioned over several ranks. Essentially it handles the window/slice indexing that is currently done in AllAtOnceSystem and also provides a method to test whether a global index is_local(). Used by the SharedArray and AllAtOnceSystem.

SharedArray is an array that every rank has a copy of, but each rank is only responsible for part of. Any rank can access any data in the array, but can only modify the data it owns.

SynchronisedArray (I don't like this name but I'm not sure what else to call it yet) is an array that is owned by one rank but every rank has a copy. Any rank can access the data, but only the owning rank can modify it.

JHopeCollins commented 2 years ago

I don't want to merge this yet because I'd like to use DistributedDataLayout in the AllAtOnceSystem, but I'd like a review before doing this.