static void smpi_replay_process(Job* job, simgrid::s4u::BarrierPtr barrier, int rank)
{
XBT_INFO("Replaying rank %d of job %d (smpi_app '%s')", rank, job->unique_job_number, job->smpi_app_name.c_str());
static void smpi_replay_process(Job* job, simgrid::s4u::BarrierPtr barrier, int rank)
{
XBT_INFO("Replaying rank %d of job %d (smpi_app '%s')", rank, job->unique_job_number, job->smpi_app_name.c_str());
-static int workload_executor_process(const std::vector<std::unique_ptr<Job>>& workload)
+static int workload_executor_process(const std::vector<simgrid::s4u::Host*>& hosts,
+ const std::vector<std::unique_ptr<Job>>& workload, int noise_between_jobs)
// Let's finally run the job executor
char* str_pname = bprintf("job_%04d", job->unique_job_number);
XBT_INFO("Launching the job executor of job %d (app '%s')", job->unique_job_number, job->smpi_app_name.c_str());
// Let's finally run the job executor
char* str_pname = bprintf("job_%04d", job->unique_job_number);
XBT_INFO("Launching the job executor of job %d (app '%s')", job->unique_job_number, job->smpi_app_name.c_str());
- simgrid::s4u::Actor::create(str_pname, hosts[job->allocation[0]], job_executor_process, job.get());
+ simgrid::s4u::Actor::create(str_pname, hosts[job->allocation[0]], job_executor_process, std::cref(hosts),
+ job.get());
// Simulation setting
simgrid::s4u::Engine e(&argc, argv);
e.load_platform(argv[1]);
// Simulation setting
simgrid::s4u::Engine e(&argc, argv);
e.load_platform(argv[1]);
xbt_assert(hosts.size() >= 4, "The given platform should contain at least 4 hosts (found %zu).", hosts.size());
// Let's retrieve all SMPI jobs
xbt_assert(hosts.size() >= 4, "The given platform should contain at least 4 hosts (found %zu).", hosts.size());
// Let's retrieve all SMPI jobs
int initial_noise = std::stoi(argv[3]);
xbt_assert(initial_noise >= 0, "Invalid initial_noise argument");
int initial_noise = std::stoi(argv[3]);
xbt_assert(initial_noise >= 0, "Invalid initial_noise argument");
- simgrid::s4u::Actor::create("workload", hosts[0], workload_executor_process, std::cref(jobs));
+ simgrid::s4u::Actor::create("workload", hosts[0], workload_executor_process, std::cref(hosts), std::cref(jobs),
+ noise_between_jobs);