Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics: whitespace cleanup (codefactor.io).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 5 Jun 2023 13:45:33 +0000 (15:45 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 5 Jun 2023 14:03:33 +0000 (16:03 +0200)
examples/cpp/exec-dependent/s4u-exec-dependent.cpp
examples/python/task-io/task-io.py
examples/python/task-simple/task-simple.py
examples/python/task-switch-host/task-switch-host.py
examples/python/task-variable-load/task-variable-load.py
include/simgrid/s4u/Activity.hpp
src/kernel/xml/platf_sax_cb.cpp

index 23e67b7..f473664 100644 (file)
@@ -55,7 +55,6 @@ int main(int argc, char* argv[])
   sg4::Actor::create("worker", e.host_by_name("Fafard"), worker);
 
   sg4::Exec::on_veto_cb([&e](sg4::Exec& exec) {
-
     // First display the situation
     XBT_INFO("Activity '%s' vetoed. Dependencies: %s; Ressources: %s", exec.get_cname(),
              (exec.dependencies_solved() ? "solved" : "NOT solved"),
index 18a4cb2..b74c411 100644 (file)
@@ -17,8 +17,8 @@ def parse():
     )
     return parser.parse_args()
 
-def callback( t):
-    print(f'[{Engine.clock}] { t} finished ({ t.count})')
+def callback(t):
+    print(f'[{Engine.clock}] {t} finished ({t.count})')
 
 if __name__ == '__main__':
     args = parse()
@@ -48,4 +48,4 @@ if __name__ == '__main__':
     exec1.enqueue_execs(2)
 
     # runs the simulation
-    e.run()
\ No newline at end of file
+    e.run()
index 29a24b7..1219906 100644 (file)
@@ -27,8 +27,8 @@ def parse():
     )
     return parser.parse_args()
 
-def callback( t):
-    print(f'[{Engine.clock}] { t} finished ({ t.count})')
+def callback(t):
+    print(f'[{Engine.clock}] {t} finished ({t.count})')
 
 if __name__ == '__main__':
     args = parse()
index f8d8dfa..3bd21e6 100644 (file)
@@ -43,13 +43,13 @@ def parse():
     )
     return parser.parse_args()
 
-def callback( t):
-    print(f'[{Engine.clock}] { t} finished ({ t.count})')
+def callback(t):
+    print(f'[{Engine.clock}] {t} finished ({t.count})')
 
-def switch( t, hosts, execs):
-    comm0.destination = hosts[ t.count % 2]
-    comm0.remove_successor(execs[ t.count % 2 - 1])
-    comm0.add_successor(execs[ t.count % 2])
+def switch(t, hosts, execs):
+    comm0.destination = hosts[t.count % 2]
+    comm0.remove_successor(execs[t.count % 2 - 1])
+    comm0.add_successor(execs[t.count % 2])
 
 if __name__ == '__main__':
     args = parse()
@@ -81,7 +81,7 @@ if __name__ == '__main__':
     # Add a function to be called before each executions of comm0
     # This function modifies the graph of tasks by adding or removing
     # successors to comm0
-    comm0.on_this_start(lambda  t: switch( t, [jupiter, fafard], [exec1,exec2]))
+    comm0.on_this_start(lambda t: switch(t, [jupiter, fafard], [exec1,exec2]))
 
     # Enqueue two executions for task exec1
     comm0.enqueue_execs(4)
index a8c9cc0..7310584 100644 (file)
@@ -27,10 +27,10 @@ def parse():
     )
     return parser.parse_args()
 
-def callback( t):
-    print(f'[{Engine.clock}] { t} finished ({ t.count})')
+def callback(t):
+    print(f'[{Engine.clock}] {t} finished ({t.count})')
 
-def variable_load( t):
+def variable_load(t):
     print('--- Small load ---')
     for _ in range(3):
         t.enqueue_execs(1)
index 2b8175c..3c6a4eb 100644 (file)
@@ -272,7 +272,6 @@ public:
   XBT_ATTRIB_DEPRECATED_v337("Please use on_resume_cb() instead") static void on_resumed_cb(
       const std::function<void(Activity const&)>& cb) { on_resume.connect(cb);  }
 
-
   AnyActivity* add_successor(ActivityPtr a)
   {
     Activity::add_successor(a);
index 2a2abe8..340b47a 100644 (file)
@@ -310,7 +310,6 @@ void ETag_simgrid_parse_platform()
   simgrid::s4u::Engine::on_simulation_end_cb(&remove_remote_disks);
   if (fire_on_platform_created_callback)
     simgrid::s4u::Engine::on_platform_created();
-
 }
 
 void STag_simgrid_parse_prop()