22#ifndef HYDROCOUPLEDISTRIBUTED_H
23#define HYDROCOUPLEDISTRIBUTED_H
36#if defined(__GNUC__) || defined(__clang__)
37#pragma GCC visibility push(default)
75 [[nodiscard]]
virtual bool cancel() = 0;
81 [[nodiscard]]
virtual bool test() = 0;
97 [[nodiscard]]
virtual bool waitFor(
double timeoutSeconds) = 0;
104 [[nodiscard]]
virtual bool failed(std::string &message)
const = 0;
288 [[nodiscard]]
virtual std::string
remoteId()
const = 0;
316 [[nodiscard]]
virtual bool ping(
double timeoutSeconds) = 0;
414#if defined(__GNUC__) || defined(__clang__)
415#pragma GCC visibility pop
IDistributedModelComponent is an IModelComponent that participates in distributed execution through a...
Definition hydrocoupledistributed.h:221
virtual int32_t partitionRank() const =0
The partition this instance computes.
virtual ITransport * transport() const =0
The transport this component communicates through.
virtual int32_t partitionCount() const =0
The number of partitions this component's domain is decomposed into.
virtual ~IDistributedModelComponent()=default
~IDistributedModelComponent destructor.
IExchangeRequest is a handle to an asynchronous communication operation.
Definition hydrocoupledistributed.h:53
virtual bool waitFor(double timeoutSeconds)=0
Blocks until the operation completes or the timeout elapses.
virtual bool test()=0
Non-blocking completion test.
virtual bool failed(std::string &message) const =0
Checks whether the operation completed with an error.
virtual ~IExchangeRequest()=default
IExchangeRequest::~IExchangeRequest is a virtual destructor.
virtual void wait()=0
Blocks until the operation completes.
virtual bool cancel()=0
Asks the implementation to abandon the operation.
IPartitionedComponentDataItem is an IComponentDataItem whose entity dimension is decomposed across pa...
Definition hydrocoupledistributed.h:354
virtual int64_t globalCount() const =0
The global entity count across all partitions.
virtual ~IPartitionedComponentDataItem()=default
~IPartitionedComponentDataItem destructor.
virtual std::span< const int64_t > ownedGlobalIndexes() const =0
Global identities of the locally owned entities.
virtual uint64_t synchronizationEpoch() const =0
The synchronization epoch of the virtual entities.
virtual std::span< const int32_t > virtualOwners() const =0
Owner partition of each virtual entity.
virtual std::unique_ptr< IExchangeRequest > synchronizeAsync()=0
Begins an asynchronous halo synchronization of the virtual entities.
virtual std::span< const int64_t > virtualGlobalIndexes() const =0
Global identities of the local virtual (ghost/halo) entities.
virtual int32_t partitionedDimension() const =0
Which axis of shape() is decomposed across partitions.
The IProxyModelComponent class is a local stand-in for a remote IModelComponent reachable through a t...
Definition hydrocoupledistributed.h:270
virtual std::string remoteId() const =0
The unique identifier of the remote component this proxy represents.
virtual void setRequestTimeout(double seconds)=0
Sets the timeout applied to forwarded requests.
virtual double requestTimeout() const =0
The timeout applied to forwarded requests.
virtual ITransport::Endpoint remoteEndpoint() const =0
The endpoint of the remote component this proxy represents.
virtual void disconnectFromPeer()=0
Closes the connection to the remote component.
virtual bool ping(double timeoutSeconds)=0
Liveness probe of the remote component.
virtual bool isConnected() const =0
Checks whether the proxy currently holds a live connection.
virtual ~IProxyModelComponent()=default
~IProxyModelComponent destructor.
virtual bool connectToPeer(std::string &message)=0
Establishes the connection to the remote component.
ITransport is a transport-neutral, tagged message channel between processes.
Definition hydrocoupledistributed.h:145
virtual std::unique_ptr< IExchangeRequest > receiveAsync(const Endpoint &from, int32_t tag, const BufferDescriptor &into)=0
Nonblocking receive; the destination buffer must remain valid until the request completes.
virtual int32_t participantCount() const =0
The number of participants reachable through this transport.
virtual std::unique_ptr< IExchangeRequest > sendAsync(const Endpoint &to, int32_t tag, const BufferDescriptor &payload)=0
Nonblocking send; the payload buffer must remain valid until the request completes.
virtual bool receive(const Endpoint &from, int32_t tag, const BufferDescriptor &into, std::string *message=nullptr)=0
Receives a typed payload from a peer, blocking until it arrives.
virtual bool send(const Endpoint &to, int32_t tag, const BufferDescriptor &payload, std::string *message=nullptr)=0
Sends a typed payload to a peer, blocking until the payload buffer is reusable.
virtual ~ITransport()=default
ITransport::~ITransport is a virtual destructor.
virtual Endpoint localEndpoint() const =0
The endpoint of the calling process on this transport.
IComponentDataItem is a fundamental unit of data for a component.
Definition hydrocouple.h:1844
IIdentity interface class defines a method to get the Id of an HydroCouple entity.
Definition hydrocouple.h:476
IModelComponent interface is the core interface in the HydroCouple standard defining a model componen...
Definition hydrocouple.h:696
Core interface definitions for the HydroCouple component-based modeling framework.
HydroCouple's interfaces for distributed and cloud execution.
Definition hydrocoupledistributed.h:44
HydroCouple namespace contains the core interface specifications for the HydroCouple component-based ...
Definition hydrocouple.h:54
BufferDescriptor describes a typed, possibly strided, possibly device-resident multi-dimensional arra...
Definition hydrocouple.h:279
Endpoint identifies one participant reachable through this transport.
Definition hydrocoupledistributed.h:151
std::string address
Transport-specific address (empty for rank-addressed transports).
Definition hydrocoupledistributed.h:152
int32_t rank
Participant rank for rank-addressed transports; -1 otherwise.
Definition hydrocoupledistributed.h:153