22#ifndef HYDROCOUPLEDISTRIBUTED_H
23#define HYDROCOUPLEDISTRIBUTED_H
53 [[nodiscard]]
virtual bool test() = 0;
65 [[nodiscard]]
virtual bool failed(std::string &message)
const = 0;
217 [[nodiscard]]
virtual std::string
remoteId()
const = 0;
224 [[nodiscard]]
virtual bool connect(std::string &message) = 0;
242 [[nodiscard]]
virtual bool ping(
double timeoutSeconds) = 0;
IDistributedModelComponent is an IModelComponent that participates in distributed execution through a...
Definition hydrocoupledistributed.h:158
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:40
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. Destroying an incomplete request cancels...
virtual void wait()=0
Blocks until the operation completes.
IPartitionedComponentDataItem is an IComponentDataItem whose entity dimension is decomposed across pa...
Definition hydrocoupledistributed.h:277
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.
The IProxyModelComponent class is a local stand-in for a remote IModelComponent reachable through a t...
Definition hydrocoupledistributed.h:199
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 void disconnect()=0
Closes the connection to the remote component.
virtual ITransport::Endpoint remoteEndpoint() const =0
The endpoint of the remote component this proxy represents.
virtual bool ping(double timeoutSeconds)=0
Liveness probe of the remote component.
virtual bool connect(std::string &message)=0
Establishes the connection to the remote component.
virtual bool isConnected() const =0
Checks whether the proxy currently holds a live connection.
virtual ~IProxyModelComponent()=default
~IProxyModelComponent destructor.
ITransport is a transport-neutral, tagged message channel between processes.
Definition hydrocoupledistributed.h:82
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:1466
IIdentity interface class defines a method to get the Id of an HydroCouple entity.
Definition hydrocouple.h:313
IModelComponent interface is the core interface in the HydroCouple standard defining a model componen...
Definition hydrocouple.h:533
Core interface definitions for the HydroCouple component-based modeling framework.
HydroCouple's interfaces for distributed and cloud execution.
Definition hydrocoupledistributed.h:31
HydroCouple namespace contains the core interface specifications for the HydroCouple component-based ...
Definition hydrocouple.h:58
BufferDescriptor describes a typed, possibly strided, possibly device-resident multi-dimensional arra...
Definition hydrocouple.h:134
Endpoint identifies one participant reachable through this transport.
Definition hydrocoupledistributed.h:88
std::string address
Transport-specific address (empty for rank-addressed transports).
Definition hydrocoupledistributed.h:89
int32_t rank
Participant rank for rank-addressed transports; -1 otherwise.
Definition hydrocoupledistributed.h:90