Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[examples] smpi-replay-mmd: static + cleanup
authorMillian Poquet <millian.poquet@inria.fr>
Tue, 16 Oct 2018 16:34:16 +0000 (18:34 +0200)
committerMillian Poquet <millian.poquet@inria.fr>
Tue, 16 Oct 2018 16:34:16 +0000 (18:34 +0200)
examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual.cpp

index a6d10c1..59aeb70 100644 (file)
@@ -44,8 +44,8 @@ struct Job {
 };
 
 // ugly globals to avoid creating structures for giving args to processes
 };
 
 // ugly globals to avoid creating structures for giving args to processes
-std::vector<simgrid::s4u::Host*> hosts;
-int noise_between_jobs;
+static std::vector<simgrid::s4u::Host*> hosts;
+static int noise_between_jobs;
 
 static bool job_comparator(const Job* j1, const Job* j2)
 {
 
 static bool job_comparator(const Job* j1, const Job* j2)
 {
@@ -54,13 +54,7 @@ static bool job_comparator(const Job* j1, const Job* j2)
   return j1->starting_time < j2->starting_time;
 }
 
   return j1->starting_time < j2->starting_time;
 }
 
-struct s_smpi_replay_process_args {
-  Job* job;
-  simgrid::s4u::BarrierPtr barrier;
-  int rank;
-};
-
-void smpi_replay_process(Job* job, simgrid::s4u::BarrierPtr barrier, int rank)
+static void smpi_replay_process(Job* job, simgrid::s4u::BarrierPtr barrier, int rank)
 {
   // Prepare data for smpi_replay_run
   int argc    = 5;
 {
   // Prepare data for smpi_replay_run
   int argc    = 5;