Skip to content

Add global comm#341

Open
hgangwar wants to merge 12 commits into
SCOREC:developfrom
hgangwar:add_global_comm
Open

Add global comm#341
hgangwar wants to merge 12 commits into
SCOREC:developfrom
hgangwar:add_global_comm

Conversation

@hgangwar

Copy link
Copy Markdown
Contributor

Moving PR #228 to here for a clean PR.

This PR introduces redev::AdiosGlobalComm to provide a global communication interface between the coupler and the applications using the existing ADIOS channel.
Usage:

auto GDI = app->AddData<pcms::GO>("global_comm", comm);

This creates a global communicator that can send and receive data, for example:

app->BeginSendPhase();
GDI->SendData(mean.data(), "mean", mean.size());
app->EndSendPhase();

app->BeginReceivePhase();
mean = GDI->ReceiveData("mean", mean.size());
app->EndReceivePhase();
  • The test_GDI test case verifies global communication and data transfer.

@jacobmerson

Copy link
Copy Markdown
Collaborator

@hgangwar did you update this based on the redev merge? Note, you will need to make sure you bump the redev version in the config files for the CI.

@hgangwar
hgangwar marked this pull request as ready for review July 21, 2026 00:05
@jacobmerson

Copy link
Copy Markdown
Collaborator

@hgangwar I think we discussed having this owned by the application so we have a consistent API between fields and "global data"

AddField -> AddData
SendField -> SendData
ReceiveField -> ReceiveData

@jacobmerson jacobmerson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See previous comment about making the API match between fields and global data.

@jacobmerson jacobmerson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry I did not read carefully, you did add the global data communicator to the application. However for consistency:

  • SendData should be a function on the application that takes a string
  • Send should be a function on the GDI pointer.

@jacobmerson

Copy link
Copy Markdown
Collaborator

Also, look at how the FieldHandle works. I.e., we return a cheap to copy handle of the field which stores a string which is used to actually perform the send/receive. That way we are not handing a pointer back to the user.

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