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

mwe of halo exchange #744

Draft
wants to merge 6 commits into
base: melt-mpi-metadata
Choose a base branch
from
Draft

mwe of halo exchange #744

wants to merge 6 commits into from

Conversation

TomMelt
Copy link
Contributor

@TomMelt TomMelt commented Nov 25, 2024

Small MWE of halo exchange logic for testing before add the main functionality to nextsim

  • create MWE which demonstrate halo exchange using periodic boundary conditions
  • use meta data files to read neighbour information rather than hardcoding it
  • separate logic into separate class core/src/include/Halo.hpp

@TomMelt TomMelt marked this pull request as draft November 25, 2024 12:22
@TomMelt TomMelt mentioned this pull request Nov 25, 2024
7 tasks
@TomMelt TomMelt changed the title wip Add halo exchange logic Nov 25, 2024
@jwallwork23
Copy link
Contributor

Note that I changed the logic for determining whether the Docker workflow is run. I an attempt to fix the test failure https://github.com/nextsimhub/nextsimdg/actions/runs/12009927720/job/33475689562 might it be feasible to rebase on top of or merge in develop?

Compare https://github.com/nextsimhub/nextsimdg/blob/halo-exchange/.github/workflows/docker.yml vs https://github.com/nextsimhub/nextsimdg/blob/develop/.github/workflows/docker.yml.

@nextsimhub nextsimhub deleted a comment from coderabbitai bot Nov 25, 2024
@TomMelt TomMelt force-pushed the halo-exchange branch 2 times, most recently from 980be5e to a989bb6 Compare December 20, 2024 17:49
@TomMelt TomMelt changed the title Add halo exchange logic mwe of halo exchange Dec 20, 2024
@TomMelt TomMelt self-assigned this Dec 20, 2024
@TomMelt TomMelt added the ICCS Tasks or reviews for the ICCS team label Dec 20, 2024
Comment on lines +103 to +172
template <typename T> T& copyToBuffer(T& buffer, size_t startIndex = 0)
{
// make no especial attempt at efficiency here
SliceIter thisIter(slice, data.dimensions());
auto biter = buffer.begin();
auto biter = std::next(buffer.begin(), startIndex);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timspainNERSC this was a bit hacky from me. I want to populate the buffer but from a specific starting index. Let me know if there's a better way of doing this.

I was trying to avoid creating temporary arrays for each of the edges.

core/src/include/Slice.hpp Outdated Show resolved Hide resolved
This test includes two examples for different grid layouts:

- 3 x 1 grid (3 procs)
- 2 x 2 grid (4 procs)

Makes use of the Slice functionality
@TomMelt TomMelt force-pushed the halo-exchange branch 2 times, most recently from 184f77a to 5cde88d Compare January 28, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ICCS Tasks or reviews for the ICCS team
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants