Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 25 Jan 2018 12:18:42 +0000 (13:18 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 25 Jan 2018 12:18:42 +0000 (13:18 +0100)
src/simix/ActorImpl.cpp
src/simix/ActorImpl.hpp
src/simix/smx_host.cpp
src/smpi/internals/smpi_process.cpp
teshsuite/s4u/cloud-interrupt-migration/cloud-interrupt-migration.cpp
teshsuite/smpi/macro-sample/macro-sample.c

index 1fd6dc3..935ca1b 100644 (file)
@@ -348,7 +348,6 @@ smx_actor_t SIMIX_process_create(const char* name, std::function<void()> code, v
   XBT_DEBUG("Inserting %s(%s) in the to_run list", process->getCname(), host->getCname());
   simix_global->process_to_run.push_back(process);
   intrusive_ptr_add_ref(process);
-
   /* Tracing the process creation */
   TRACE_msg_process_create(process->getName(), process->pid, process->host);
 
index 28409f3..ecc4156 100644 (file)
@@ -130,8 +130,6 @@ typedef boost::intrusive::list<ActorImpl, boost::intrusive::member_hook<ActorImp
 }
 }
 
-typedef simgrid::simix::ProcessArg *smx_process_arg_t;
-
 typedef simgrid::simix::ActorImpl* smx_actor_t;
 
 extern "C" {
index da84fe5..1dea2c9 100644 (file)
@@ -120,6 +120,7 @@ void SIMIX_host_add_auto_restart_process(sg_host_t host, const char* name, std::
     watched_hosts.insert(host->getCname());
     XBT_DEBUG("Push host %s to watched_hosts because state == SURF_RESOURCE_OFF", host->getCname());
   }
+  XBT_DEBUG("Adding Process %s to the auto-restart list of Host %s", arg->name.c_str(), arg->host->getCname());
   host->extension<simgrid::simix::Host>()->auto_restart_processes.push_back(arg);
 }
 
index 29ac6f4..90a265e 100644 (file)
@@ -23,10 +23,11 @@ using simgrid::s4u::Actor;
 using simgrid::s4u::ActorPtr;
 
 Process::Process(ActorPtr actor, msg_bar_t finalization_barrier)
-  : finalization_barrier_(finalization_barrier)
+    : finalization_barrier_(finalization_barrier), process_(actor)
 {
-  std::stringstream mailboxname, mailboxname_small;
-  process_              = actor;
+  std::stringstream mailboxname;
+  std::stringstream mailboxname_small;
+
   mailboxname           << std::string("SMPI-")  << process_->getPid();
   mailboxname_small     << std::string("small-") << process_->getPid();
   mailbox_              = simgrid::s4u::Mailbox::byName(mailboxname.str());
index afb79fb..df7d015 100644 (file)
@@ -35,7 +35,7 @@ static void master_main()
   vm0->start();
 
   XBT_INFO("Start the migration of %s from %s to %s", vm0->getCname(), pm0->getCname(), pm1->getCname());
-  simgrid::s4u::ActorPtr migration = vm_migrate_async(vm0, pm1);
+  vm_migrate_async(vm0, pm1);
 
   simgrid::s4u::this_actor::sleep_for(2);
   XBT_INFO("Wait! change my mind, shutdown %s. This ends the migration", vm0->getCname());
index 8e10034..627067e 100644 (file)
@@ -25,7 +25,8 @@ static double compute(double d0)
 
 int main(int argc, char *argv[])
 {
-  int n, rank;
+  int n;
+  int rank;
   MPI_Init(&argc, &argv);
   int verbose = argc <= 1;
   MPI_Comm_size(MPI_COMM_WORLD, &n);