Skip to content

Conversation

@hgangwar
Copy link

@hgangwar hgangwar commented Nov 13, 2025

This PR introduces a Global ADIOS communicator

Key Changes

  • Added a new AdiosGlobalComm::Communicator class. This global communicator is intended for exchanging global data and metadata between coupled applications.
  • Updated AdiosChannel::CreateComm to route communicator creation through the CommType enum which defines the Ptn and Global communication modes..
  • Usage example: This creates a bidirectional communicator associated with the channel.
    auto channel =
        rdv.CreateAdiosChannel(name, params, redev::TransportType::BP4);
    auto commPair =
        channel.CreateComm<redev::Real>(name, comm, redev::CommType::Global);
  • The existing API remains unchanged. If CommType is not provided, channel.CreateComm defaults to CommType::Ptn and behaves as before.

  • Added a virtual (non-pure) function redev::Communicator::SetCommParams to specify the active variable's name and size.

    • The existing redev::Communicator::send() operated on a raw pointer, which prevented communicating the message size without deducing it from the in/out layout.
    • A single channel using a Global communicator can now read and write multiple variables.
  • A testcase to test AdiosGlobalComm.

@cwsmith
Copy link
Contributor

cwsmith commented Nov 13, 2025

Please explain a bit more in the PR description or ideally, in code comments, what 'global' means and an example of how this is used.

Please also undo all the whitespace changes. It looks like redev_comm.h has many lines of just reformatting.

enum class ProcessType { Client = 0, Server = 1 };
enum class TransportType { BP4 = 0, SST = 1 };

enum class CommType{ Ptn = 0, Global = 1 };
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's change this to Partitoned instead of Ptn. It's possible @cwsmith will disagree with me here, but I think it will be more clear to have the full name spelled out what the distinction is between the two options.

Counter argument is we use Ptn for the partition class.

Copy link
Contributor

Choose a reason for hiding this comment

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

Partitioned is fine with me. We just need to be sure the user interface documentation discusses it.

*/
template<typename T>
class AdiosComm : public Communicator<T> {
class AdiosPtnComm : public Communicator<T> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

AdiosPartitionedComm

return CommV{impl_.template CreateComm<
CommunicatorTypeMap<CommunicatorDataType::INT8>::type>(
std::move(name), comm)};
std::move(name), comm, std::move(ctype))};
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to move ctype since it's an enum move will have no impact.

* @param[in] eng_ ADIOS2 engine for writing on the sender side
* @param[in] io_ ADIOS2 IO associated with eng_
* @param[in] name_ unique name among AdiosComm objects
* @param[in] name_ unique name among AdiosPtnComm objects
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we now have the partitioned and global communicators, specify that this communicator works on the partitioned data.

@jacobmerson jacobmerson marked this pull request as ready for review December 9, 2025 16:39
@jacobmerson jacobmerson marked this pull request as draft December 9, 2025 16:39
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.

3 participants