Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix MC. Host names always bite me
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 12 Dec 2017 10:16:14 +0000 (11:16 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 12 Dec 2017 10:16:14 +0000 (11:16 +0100)
examples/s4u/cloud-simple/s4u-cloud-simple.cpp

index 6675519..9de94b4 100644 (file)
@@ -14,7 +14,7 @@ static void computation_fun()
   double clock_end = simgrid::s4u::Engine::getClock();
 
   XBT_INFO("%s:%s task executed %g", simgrid::s4u::this_actor::getHost()->getCname(),
-           simgrid::s4u::this_actor::getName().c_str(), clock_end - clock_sta);
+           simgrid::s4u::this_actor::getCname(), clock_end - clock_sta);
 }
 
 static void launch_computation_worker(s4u_Host* host)
@@ -56,7 +56,7 @@ static void communication_rx_fun(std::vector<std::string> args)
 
 static void launch_communication_worker(s4u_Host* tx_host, s4u_Host* rx_host)
 {
-  std::string mbox_name = std::string("MBOX:") + tx_host->getName() + "-" + rx_host->getName();
+  std::string mbox_name = std::string("MBOX:") + tx_host->getCname() + "-" + rx_host->getCname();
   std::vector<std::string> args;
   args.push_back(mbox_name);