SENSEI
A frame work for generic in situ analytics
ConfigurablePartitioner.h
1 #ifndef sensei_ConfigurablePartitioner_h
2 #define sensei_ConfigurablePartitioner_h
3 
4 #include "Partitioner.h"
5 
6 namespace pugi { class xml_node; }
7 
8 namespace sensei
9 {
10 
11 class ConfigurablePartitioner;
12 using ConfigurablePartitionerPtr = std::shared_ptr<sensei::ConfigurablePartitioner>;
13 
14 /** An object the selects and configures a sensei::Partitioner from XML.
15  * API calls are forwarded to the active intance at run time.
16  */
17 class SENSEI_EXPORT ConfigurablePartitioner : public Partitioner
18 {
19 public:
21 
22  static sensei::ConfigurablePartitionerPtr New()
23  { return ConfigurablePartitionerPtr(new ConfigurablePartitioner); }
24 
25  const char *GetClassName() override { return "ConfigurablePartitioner"; }
26 
27  /** given an existing partitioning of data passed in the first MeshMetadata
28  * argument,return a new partitioning in the second MeshMetadata argument.
29  */
30  int GetPartition(MPI_Comm comm, const sensei::MeshMetadataPtr &in,
31  sensei::MeshMetadataPtr &out) override;
32 
33  /** initialize the partitioner from the XML node. recognizes the following
34  * Partitioner's: block, cyclic, planar, and mapped. The XML schema is as
35  * follows:
36  *
37  * ```xml
38  * <partitioner type="..." ... >
39  * ...
40  * </partitioner>
41  * ```
42  *
43  * where type is one of block, cyclic, planar, or mapped. See sensei::Parititioner
44  * sub-classes for documentation on the specific XML recognized by each.
45  */
46  virtual int Initialize(pugi::xml_node &) override;
47 
48 protected:
50 
51 private:
52  struct InternalsType;
53  InternalsType *Internals;
54 };
55 
56 }
57 
58 #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...
An object the selects and configures a sensei::Partitioner from XML.
Definition: ConfigurablePartitioner.h:17
represents the way data is partitioned for in-transit operation mode.
Definition: Partitioner.h:25
SENSEI.
Definition: ADIOS2AnalysisAdaptor.h:27
Definition: ADIOS2DataAdaptor.h:10