Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[smpi] kill an unused method
[simgrid.git] / src / s4u / s4u_Host.cpp
index 906f7a03658f7aac2953dbaac7d128a8bca12bae..97dd8ba2a16dac6bc0abf0ac89f87c386b4717ec 100644 (file)
@@ -190,8 +190,7 @@ void Host::getProcesses(std::vector<ActorPtr>* list)
   }
 }
 
-/** @brief Returns how many actors have been launched on this host */
-// FIXME: Specify whether the user should expect only non-daemon actors here!
+/** @brief Returns how many actors (daemonized or not) have been launched on this host */
 int Host::get_actor_count()
 {
   return this->extension<simgrid::simix::Host>()->process_list.size();
@@ -258,10 +257,11 @@ std::unordered_map<std::string, Storage*> const& Host::getMountedStorages()
 
 void Host::execute(double flops)
 {
-  Host* host_list[1]   = {this};
-  double flops_list[1] = {flops};
-  smx_activity_t s     = simcall_execution_parallel_start(nullptr /*name*/, 1, host_list, flops_list,
-                                                      nullptr /*comm_sizes */, -1.0, -1 /*timeout*/);
+  execute(flops, 1.0 /* priority */);
+}
+void Host::execute(double flops, double priority)
+{
+  smx_activity_t s = simcall_execution_start(nullptr, flops, 1 / priority /*priority*/, 0. /*bound*/, this);
   simcall_execution_wait(s);
 }