![]() |
SENSEI
A frame work for generic in situ analytics
|
Defines the control API for in transit data movement. More...
#include <InTransitDataAdaptor.h>
Public Member Functions | |
| senseiTypeMacro (InTransitDataAdaptor, sensei::DataAdaptor) | |
| virtual int | SetConnectionInfo (const std::string &info) |
| Pass in a string containing transport specific connection information. More... | |
| virtual const std::string & | GetConnectionInfo () const |
| Return the current connection info. More... | |
| virtual int | Initialize (pugi::xml_node &node) |
| Initialize the adaptor from an XML node. More... | |
| virtual int | GetSenderMeshMetadata (unsigned int id, MeshMetadataPtr &metadata)=0 |
| Get metadta object describing the data that is available in the simulation. More... | |
| virtual int | SetReceiverMeshMetadata (unsigned int id, MeshMetadataPtr &metadata) |
| This API that enables one to specify how the data is partitioned on the analysis/local side. More... | |
| virtual int | GetReceiverMeshMetadata (unsigned int id, MeshMetadataPtr &metadata) |
| Returns the current receiver mesh metadata. More... | |
| virtual void | SetPartitioner (const sensei::PartitionerPtr &partitioner) |
| Set/get the partitioner. More... | |
| virtual sensei::PartitionerPtr | GetPartitioner () |
| Return the current partitioner. More... | |
| virtual int | OpenStream ()=0 |
| Opens a stream and connects to the simulation. More... | |
| virtual int | CloseStream ()=0 |
| Closes a stream and disconnects from the simulation. More... | |
| virtual int | AdvanceStream ()=0 |
| Signals the that we are finished with this time step. More... | |
| virtual int | StreamGood ()=0 |
| Returns true while there is more data to process. More... | |
| virtual int | Finalize ()=0 |
| Called before the application is brought down. It is safe to use MPI here. More... | |
Public Member Functions inherited from sensei::DataAdaptor | |
| senseiBaseTypeMacro (DataAdaptor, svtkObjectBase) | |
| void | PrintSelf (ostream &os, svtkIndent indent) override |
| Prints the current state of the adaptor. More... | |
| virtual int | SetCommunicator (MPI_Comm comm) |
| Set the communicator used by the adaptor. More... | |
| MPI_Comm | GetCommunicator () |
| Get the communicator used by the adaptor. More... | |
| virtual int | GetNumberOfMeshes (unsigned int &numMeshes)=0 |
| Gets the number of meshes a simulation can provide. More... | |
| virtual int | GetMeshMetadata (unsigned int id, sensei::MeshMetadataPtr &metadata)=0 |
| Get metadata of the i'th mesh. More... | |
| virtual int | GetMesh (const std::string &meshName, bool structureOnly, svtkDataObject *&mesh)=0 |
| Fetches the requested data object from the simulation. More... | |
| virtual int | AddGhostNodesArray (svtkDataObject *mesh, const std::string &meshName) |
| Adds ghost nodes on the specified mesh. More... | |
| virtual int | AddGhostCellsArray (svtkDataObject *mesh, const std::string &meshName) |
| Adds ghost cells on the specified mesh. More... | |
| virtual int | AddArray (svtkDataObject *mesh, const std::string &meshName, int association, const std::string &arrayName)=0 |
| Fetches the named array from the simulation and adds it to the passed mesh. More... | |
| virtual int | AddArrays (svtkDataObject *mesh, const std::string &meshName, int association, const std::vector< std::string > &arrayNames) |
| Fetches multiple arrays from the simulation and adds them to the mesh. More... | |
| virtual int | ReleaseData () |
| Release data allocated for the current timestep. More... | |
| virtual double | GetDataTime () |
| Get the current simulated time. More... | |
| virtual void | SetDataTime (double time) |
| Set the current simulated time. More... | |
| virtual long | GetDataTimeStep () |
| Get the current time step. More... | |
| virtual void | SetDataTimeStep (long index) |
| Set the current simulated time step. More... | |
Protected Member Functions | |
| InTransitDataAdaptor (const InTransitDataAdaptor &)=delete | |
| void | operator= (const InTransitDataAdaptor &)=delete |
Protected Member Functions inherited from sensei::DataAdaptor | |
| DataAdaptor (const DataAdaptor &)=delete | |
| void | operator= (const DataAdaptor &)=delete |
Protected Attributes | |
| InternalsType * | Internals |
Protected Attributes inherited from sensei::DataAdaptor | |
| InternalsType * | Internals |
| MPI_Comm | Comm |
Defines the control API for in transit data movement.
The InTransitDataAdaptor layers a control API onto the sensei::DataAdaptor API. In what follows the simulation is the sender of data and the end point and or sensei::AnalysisAdaptor is the receiver of data. The InTransitDataAdaptor control API gives end point control over how data lands. A data receiver may epxlicitly specifiy how data lands (see SetReceiverMeshMetadata) or use one of a number of common paritioning strategies (see sensei::Partitioner and derived classes). Typically by an AnalysisAdaptor which needs explicit control over how data is partitioned will use SetReceiverMeshMetadata. When no receiver MeshMetadata has been provided a sensei::Partitioner is used. The partioner may be specified in XML, and if it is not, then the default is sensei::BlockPartitioner.
|
pure virtual |
Signals the that we are finished with this time step.
Implemented in sensei::ConfigurableInTransitDataAdaptor, sensei::HDF5DataAdaptor, and sensei::ADIOS2DataAdaptor.
|
pure virtual |
Closes a stream and disconnects from the simulation.
Implemented in sensei::ConfigurableInTransitDataAdaptor, sensei::HDF5DataAdaptor, and sensei::ADIOS2DataAdaptor.
|
pure virtual |
Called before the application is brought down. It is safe to use MPI here.
Implemented in sensei::ConfigurableInTransitDataAdaptor, sensei::HDF5DataAdaptor, and sensei::ADIOS2DataAdaptor.
|
virtual |
Return the current connection info.
Reimplemented in sensei::ConfigurableInTransitDataAdaptor.
|
virtual |
Return the current partitioner.
Reimplemented in sensei::ConfigurableInTransitDataAdaptor.
|
virtual |
Returns the current receiver mesh metadata.
Reimplemented in sensei::ConfigurableInTransitDataAdaptor.
|
pure virtual |
Get metadta object describing the data that is available in the simulation.
Implemented in sensei::HDF5DataAdaptor, sensei::ConfigurableInTransitDataAdaptor, and sensei::ADIOS2DataAdaptor.
|
virtual |
Initialize the adaptor from an XML node.
The default implementation handles initializing a sensei::ConfigurablePartitioner. If the ConfigurablePartitioner fails to initialize, then a we fall back to a default initialized sensei::BlockPartitioner.
Reimplemented in sensei::HDF5DataAdaptor, sensei::ConfigurableInTransitDataAdaptor, and sensei::ADIOS2DataAdaptor.
|
pure virtual |
Opens a stream and connects to the simulation.
Implemented in sensei::ConfigurableInTransitDataAdaptor, sensei::HDF5DataAdaptor, and sensei::ADIOS2DataAdaptor.
|
virtual |
Pass in a string containing transport specific connection information.
This is optional, as XML may be used to specify connection as well. When used the details will be specific to the transport, for instance ADIOS uses a file to negotiate the connection, hence for ADIOS connection info will be a path to that file.
Reimplemented in sensei::ConfigurableInTransitDataAdaptor.
|
virtual |
Set/get the partitioner.
The partitioner is used when no receiver mesh metadata has been set. The Initialize method will initialize an instance of a ConfigurablePartitioner using user provided XML, if that fails will fall back to a default initialized instance of BlockPartitioner.
Reimplemented in sensei::ConfigurableInTransitDataAdaptor.
|
virtual |
This API that enables one to specify how the data is partitioned on the analysis/local side.
Analyses that need control over how data lands can use this to say where data lands. The metadata object passed here will be returned to the Analysis, and the transport layer will use it to move blocks onto the correct ranks. Care, should be taken as there will be variablility in terms of what various transport layers support. The requirement for SENSEI 3.0 is that blocks are elemental. In other words given M ranks and P blocks on the sender/simulation side, a partitioning with N ranks and P blocks on the receiver/analysis side is supported. A transport may support more sophistocated partitioning, but it's not required. An analysis need not use this API, in that case the default is handled by the transport layer. See comments in InTransitDataAdaptor::Initialize for the universal partioning options as well as comments in the specific transport's implementation.
The default implementation manages the metadata objects, derived classes must handle the details of initiallizing these objects. Get calls will return -1 if no object has been set for a given id.
Reimplemented in sensei::ConfigurableInTransitDataAdaptor.
|
pure virtual |
Returns true while there is more data to process.
Implemented in sensei::ConfigurableInTransitDataAdaptor, sensei::HDF5DataAdaptor, and sensei::ADIOS2DataAdaptor.