14 #ifndef SST_CORE_MODEL_JSON_JSONMODEL_H
15 #define SST_CORE_MODEL_JSON_JSONMODEL_H
17 #include "sst/core/component.h"
18 #include "sst/core/config.h"
19 #include "sst/core/configGraph.h"
20 #include "sst/core/cputimer.h"
21 #include "sst/core/factory.h"
22 #include "sst/core/memuse.h"
23 #include "sst/core/model/sstmodel.h"
24 #include "sst/core/output.h"
25 #include "sst/core/rankInfo.h"
26 #include "sst/core/simulation.h"
27 #include "sst/core/sst_types.h"
28 #include "sst/core/warnmacros.h"
30 #include "nlohmann/json.hpp"
38 using json = nlohmann::json;
46 SST_ELI_REGISTER_MODEL_DESCRIPTION(
50 SST_ELI_ELEMENT_VERSION(1,0,0),
51 "JSON model for building SST simulation graphs",
54 SST_ELI_DOCUMENT_MODEL_SUPPORTED_EXTENSIONS(
".json")
62 std::string scriptName;
66 ComponentId_t nextComponentId;
70 #define SST_MODEL_JSON_NAME_IDX 0
71 #define SST_MODEL_JSON_COMPONENTID_IDX 1
72 #define SST_MODEL_JSON_CONFIGCOMPONENT_IDX 2
74 typedef std::vector<std::tuple<std::string, ComponentId_t, ConfigComponent*>> CompTuple;
75 CompTuple configGraphTuple;
77 void recursiveSubcomponent(
ConfigComponent* Parent,
const nlohmann::basic_json<>& compArray);
78 void discoverProgramOptions(
const json& jFile);
79 void discoverComponents(
const json& jFile);
80 void discoverLinks(
const json& jFile);
81 void discoverGlobalParams(
const json& jFile);
82 ComponentId_t findComponentIdByName(
const std::string& Name);
88 #endif // SST_CORE_MODEL_JSON_JSONMODEL_H
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file...
Definition: output.h:51
Class to contain SST Simulation Configuration variables.
Definition: config.h:29
Represents the configuration of a generic component.
Definition: configGraph.h:217
A Configuration Graph A graph representing Components and Links.
Definition: configGraph.h:389
Definition: jsonmodel.h:43
Base class for Model Generation.
Definition: sstmodel.h:25