Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature GMT distributed #291

Merged
merged 13 commits into from
Mar 8, 2024

Conversation

ljcarlin
Copy link
Contributor

@ljcarlin ljcarlin commented Mar 3, 2024

Introduced a distributed mode to the GMT example, which can be enabled with the -d flag. In this mode each process knows only a fraction of the points and at each iteration points are sent to the relevant processes before refinement. Since points are known by multiple processes we avoid duplication by designating a single owner of each point as responsible for propagating it in the next iteration.

Currently the sphere model is the only model set up for distributed mode. However, the communication code is written in such a way that other models could add support without writing their own communication code.

To support distributed mode a model should (in setup) load a distinct subset of points on each process. Each process must set model->M as the number of points loaded on that process. A point must be represented by a struct of size model->point_size and points must be stored in the array model->points, which hence has byte-size model->M * model->point_size. The intersection function model->intersect should be written so that an input of m refers to the mth point stored in model->points.

The communication code uses p4est_search_partition with the model-specified intersection function to determine which process domains each point intersects. Points are then communicated to the relevant processes, and the array model->points is updated, along with the local point count model->M.

@cburstedde cburstedde marked this pull request as ready for review March 7, 2024 14:42
@cburstedde
Copy link
Owner

Thanks; is this a good moment to merge before continuing the communication abstraction?

@ljcarlin
Copy link
Contributor Author

ljcarlin commented Mar 7, 2024

Thanks; is this a good moment to merge before continuing the communication abstraction?

I'll just make the change to stop processes messaging themselves and then it should be good to go.

@ljcarlin
Copy link
Contributor Author

ljcarlin commented Mar 7, 2024

Okay, that should be good to go @cburstedde.

I didn't change the context stuff we discussed, but I think it's better to think about that in the abstracted version.

@cburstedde cburstedde merged commit 3584bb7 into cburstedde:feature-gmt Mar 8, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants