devito icon indicating copy to clipboard operation
devito copied to clipboard

api: Add support for subdomain allocation for Functions

Open AtilaSaraiva opened this issue 2 years ago • 9 comments

Hello folks,

This is the first commit for a series of commits adding support for functions to be allocated within a subdomain (let's call those subfunctions for brevity), and operated along other normal functions . This only first commit only adds allocation support for the Function class, I still need to add it for the TimeFunction class, not to mention that I still have to add support for it for the Operator class. This is only but the first step in the right direction, or so I hope.

Cheers!

Authored by Átila Saraiva Quintela Soares ([email protected]) SENAI CIMATEC geophysicist researcher.

AtilaSaraiva avatar May 23 '22 01:05 AtilaSaraiva

so yeah I think this is going in the right direction, my other suggestion is to keep PRs as small as possible so that we also merge them as quickly as possible :)

FabioLuporini avatar May 23 '22 13:05 FabioLuporini

so yeah I think this is going in the right direction, my other suggestion is to keep PRs as small as possible so that we also merge them as quickly as possible :)

Oh, do you mean in number of lines written, the number of commits, or number of modified files?

Thanks a lot for this! I've added it to my backlog of "PRs to be reviewed".

No problem, thanks for the early review, but I still have to fix it for TimeFunction as well.

At first glance, it looks good to me. Basically, you're lifting some functionality because you need the distributor machinery to be available in the SubDomains (or MultiSubDomains), right?

Yes that is correct, no big changes, just moving things around. I wonder if it would be more appropriate to split the CartesianDiscretization in two classes, one for the distributor machinery and other for the rest. Lemme know what you think.

AtilaSaraiva avatar May 23 '22 15:05 AtilaSaraiva

I wonder if it would be more appropriate to split the CartesianDiscretization in two classes, one for the distributor machinery and other for the rest. Lemme know what you think.

Mhh, what do you have in mind? Something like a top abstract class (CartesianDiscretization) and a mixin for "all the CartesianDiscretization that can 1) be used to define a (Time)Function and 2) be decomposed (with MPI) ?

FabioLuporini avatar May 23 '22 15:05 FabioLuporini

Mhh, what do you have in mind? Something like a top abstract class (CartesianDiscretization) and a mixin for "all the CartesianDiscretization that can 1) be used to define a (Time)Function and 2) be decomposed (with MPI) ?

yeahh, something like that, I'm not sure how methods could be exactly split but something of the sort.

AtilaSaraiva avatar May 23 '22 15:05 AtilaSaraiva

Hi @AtilaSaraiva , any news from this front?

FabioLuporini avatar Jun 22 '22 07:06 FabioLuporini

Hello Fabio! I'm studying the code for the time being, but you did say you would backport some one dimensional array functionality so I kinda need that to progress further.

Either way, I gonna need some more in depth understanding code generation and allocation to change the iteration space so Im digging the code for now.

AtilaSaraiva avatar Jun 22 '22 11:06 AtilaSaraiva

Hello Fabio! I'm studying the code for the time being, but you did say you would backport some one dimensional array functionality so I kinda need that to progress further.

ah, yes sure, in my backlog... it will take a while to get there, but we will!

Either way, I gonna need some more in depth understanding code generation and allocation to change the iteration space so Im digging the code for now.

Sure, that makes a lot of sense to me. Get in touch on slack if you have any questions (feel free to use the #development channel)

FabioLuporini avatar Jun 22 '22 12:06 FabioLuporini

what's the state of this?

FabioLuporini avatar Mar 08 '23 10:03 FabioLuporini

Still studying how to do it, unfortunately.

On Wed, Mar 8, 2023, 03:01 Fabio Luporini @.***> wrote:

what's the state of this?

— Reply to this email directly, view it on GitHub https://github.com/devitocodes/devito/pull/1924#issuecomment-1459918243, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBHMNM5RFPIM42HXBWMNA3W3BKI5ANCNFSM5WUGRW3A . You are receiving this because you were mentioned.Message ID: @.***>

AtilaSaraiva avatar Mar 08 '23 15:03 AtilaSaraiva