"name": "simple_json",
"schemaVersion": "1.0",
"workflow": {
- "makespan": 0,
+ "makespanInSeconds": 0,
"executedAt": "2023-03-09T00:00:00-00:00",
"tasks": [
{
"name": "c1",
"type": "compute",
"parents": [],
- "runtime": 1e9,
+ "runtimeInSeconds": 1e9,
"machine": "Tremblay"
},
{
"name": "t1",
"type": "transfer",
"parents": ["c1"],
- "bytesWritten": 5e8,
+ "writtenBytes": 5e8,
"machine": "Jupiter"
},
{
"name": "c2",
"type": "compute",
"parents": [],
- "runtime": 5e9,
+ "runtimeInSeconds": 5e9,
"machine": "Jupiter"
},
{
"name": "c3",
"type": "compute",
"parents": ["t1","c2"],
- "runtime": 2e9,
+ "runtimeInSeconds": 2e9,
"machine": "Jupiter"
}
],
void set_load(const std::string& name, double power_w);
void set_load(const std::string& name, bool active);
void connect_host(s4u::Host* host, bool active = true);
+ std::string get_name() {return name_;}
double get_state_of_charge();
double get_state_of_health();
double get_capacity();
for (auto const& task: data["workflow"]["tasks"]) {
if (task["type"] == "compute") {
current =
- Exec::init()->set_name(task["name"].get<std::string>())->set_flops_amount(task["runtime"].get<double>());
+ Exec::init()->set_name(task["name"].get<std::string>())->set_flops_amount(task["runtimeInSeconds"].get<double>());
if (task.contains("machine"))
dynamic_cast<Exec*>(current.get())
->set_host(simgrid::s4u::Engine::get_instance()->host_by_name(task["machine"].get<std::string>()));
else if (task["type"] == "transfer"){
current = Comm::sendto_init()
->set_name(task["name"].get<std::string>())
- ->set_payload_size(task["bytesWritten"].get<double>());
+ ->set_payload_size(task["writtenBytes"].get<double>());
if (task.contains("machine"))
comms_destinations[current] =
simgrid::s4u::Engine::get_instance()->host_by_name(task["machine"].get<std::string>());