SENSEI
A frame work for generic in situ analytics
InTransitAdaptorFactory.h
Go to the documentation of this file.
1 #ifndef InTransitAdaptorFactory_h
2 #define InTransitAdaptorFactory_h
3 
4 #include "InTransitDataAdaptor.h"
5 #include "AnalysisAdaptor.h"
6 
7 #include <svtkSmartPointer.h>
8 
9 /// @file
10 
11 namespace sensei
12 {
13 
14 using InTransitDataAdaptorPtr = svtkSmartPointer<sensei::InTransitDataAdaptor>;
15 using AnalysisAdaptorPtr = svtkSmartPointer<sensei::AnalysisAdaptor>;
16 
17 /// Factory methods for creating in transit adaptors from XML.
18 namespace InTransitAdaptorFactory
19 {
20 /** Creates a sensei::ConfigurableAnalysis adaptor and
21  * sensei::InTransitDataAdaptor based on a SENSEI XML config file. The factory
22  * will be used in in transit end-points.
23  *
24  * The factory uses the 'type' attribute to construct the appropriate
25  * InTransitDataAdaptor instance and initializes it with the data_adaptor
26  * element. See InTranistDataAdaptor::Initialize for details.
27  *
28  * The factory forwards analysis XML to the configurable analysis instance.
29  *
30  * The supported transport types are:
31  *
32  * adios1
33  * adios2
34  * hdf5
35  * libis
36  *
37  * Illustrative example of the XML:
38  *
39  * ```xml
40  * <sensei>
41  * <data_adaptor transport="adios2" partitioner="block" ... >
42  * ...
43  * </data_adaptor>
44  *
45  * <analysis type="histogram" ... >
46  * ...
47  * </analysis>
48  *
49  * ...
50  * <sensei>
51  * ```
52  */
53 int Initialize(MPI_Comm comm, const std::string &fileName, InTransitDataAdaptor *&dataAdaptor);
54 
55 /** Creates a sensei::ConfigurableAnalysis adaptor and
56  * sensei::InTransitDataAdaptor based on a SENSEI XML config file. The factory
57  * will be used in in transit end-points.
58  *
59  * The factory uses the 'type' attribute to construct the appropriate
60  * InTransitDataAdaptor instance and initializes it with the data_adaptor
61  * element. See InTranistDataAdaptor::Initialize for details.
62  *
63  * The factory forwards analysis XML to the configurable analysis instance.
64  *
65  * The supported transport types are:
66  *
67  * adios_1
68  * adios_2
69  * data_elevators
70  * libis
71  *
72  * Illustrative example of the XML:
73  *
74  * ```xml
75  * <sensei>
76  * <data_adaptor transport="adios_2" partitioner="block" ... >
77  * ...
78  * </data_adaptor>
79  *
80  * <analysis type="histogram" ... >
81  * ...
82  * </analysis>
83  *
84  * ...
85  * <sensei>
86  * ```
87  */
88 int Initialize(MPI_Comm comm, const pugi::xml_node &root, InTransitDataAdaptor *&dataAdaptor);
89 }
90 
91 }
92 
93 #endif
int Initialize(MPI_Comm comm, const std::string &fileName, InTransitDataAdaptor *&dataAdaptor)
Creates a sensei::ConfigurableAnalysis adaptor and sensei::InTransitDataAdaptor based on a SENSEI XML...
Defines the control API for in transit data movement.
Definition: InTransitDataAdaptor.h:27
SENSEI.
Definition: ADIOS2AnalysisAdaptor.h:27