Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cleanup work to make is_race_reversible() a method of Transition
[simgrid.git] / examples / cpp / dag-io / s4u-dag-io.cpp
index 7ac9b55c63242a2a51eae3ac5fed703b08d0453f..738f35682c0eb6c4e334d84de3048ae1378e5f65 100644 (file)
@@ -13,16 +13,19 @@ namespace sg4 = simgrid::s4u;
 int main(int argc, char* argv[])
 {
   sg4::Engine e(&argc, argv);
-  sg_storage_file_system_init();
   e.load_platform(argv[1]);
 
-  auto bob  = e.host_by_name("bob");
-  auto carl = e.host_by_name("carl");
+  auto* bob  = e.host_by_name("bob");
+  auto* carl = e.host_by_name("carl");
 
   // Display the details on vetoed activities
-  sg4::Activity::on_veto_cb([](const sg4::Activity& a) {
-    XBT_INFO("Activity '%s' vetoed. Dependencies: %s; Ressources: %s", a.get_cname(),
-             (a.dependencies_solved() ? "solved" : "NOT solved"), (a.is_assigned() ? "assigned" : "NOT assigned"));
+  sg4::Exec::on_veto_cb([](sg4::Exec const& exec) {
+    XBT_INFO("Exec '%s' vetoed. Dependencies: %s; Ressources: %s", exec.get_cname(),
+             (exec.dependencies_solved() ? "solved" : "NOT solved"), (exec.is_assigned() ? "assigned" : "NOT assigned"));
+  });
+  sg4::Io::on_veto_cb([](sg4::Io const& io) {
+    XBT_INFO("Io '%s' vetoed. Dependencies: %s; Ressources: %s", io.get_cname(),
+             (io.dependencies_solved() ? "solved" : "NOT solved"), (io.is_assigned() ? "assigned" : "NOT assigned"));
   });
 
   sg4::Exec::on_completion_cb([](sg4::Exec const& exec) {