Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a host and not an host
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 27 Dec 2018 08:46:28 +0000 (09:46 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 27 Dec 2018 08:46:28 +0000 (09:46 +0100)
16 files changed:
include/simgrid/Exception.hpp
include/simgrid/kernel/routing/ClusterZone.hpp
include/simgrid/kernel/routing/NetZoneImpl.hpp
include/simgrid/kernel/routing/VivaldiZone.hpp
include/simgrid/s4u/Actor.hpp
include/simgrid/s4u/Host.hpp
src/bindings/java/jxbt_utilities.hpp
src/bindings/lua/lua_host.cpp
src/bindings/python/simgrid_python.cpp
src/kernel/routing/RoutedZone.cpp
src/plugins/vm/s4u_VirtualMachine.cpp
src/s4u/s4u_Engine.cpp
src/s4u/s4u_Host.cpp
src/simix/libsmx.cpp
src/surf/HostImpl.cpp
src/surf/sg_platf.cpp

index a259e2b..ff59edf 100644 (file)
@@ -115,7 +115,7 @@ public:
   }
 };
 
   }
 };
 
-/** Exception raised when an host fails */
+/** Exception raised when a host fails */
 class HostFailureException : public xbt_ex {
 public:
   HostFailureException(simgrid::xbt::ThrowPoint throwpoint, std::string message) : xbt_ex(throwpoint, message)
 class HostFailureException : public xbt_ex {
 public:
   HostFailureException(simgrid::xbt::ThrowPoint throwpoint, std::string message) : xbt_ex(throwpoint, message)
index 167b2c1..4f6878e 100644 (file)
@@ -52,7 +52,7 @@ namespace routing {
  * host0 host1 host2
  * \endverbatim
 
  * host0 host1 host2
  * \endverbatim
 
- *  So, a communication from an host A to an host B goes through the following links (if they exist):
+ *  So, a communication from a host A to a host B goes through the following links (if they exist):
  *   <tt>limiter(A)_UP, private(A)_UP, backbone, private(B)_DOWN, limiter(B)_DOWN.</tt>
  *  link_UP and link_DOWN usually share the exact same characteristics, but their
  *  performance are not shared, to model the fact that TCP links are full-duplex.
  *   <tt>limiter(A)_UP, private(A)_UP, backbone, private(B)_DOWN, limiter(B)_DOWN.</tt>
  *  link_UP and link_DOWN usually share the exact same characteristics, but their
  *  performance are not shared, to model the fact that TCP links are full-duplex.
@@ -60,7 +60,7 @@ namespace routing {
  *  A cluster is connected to the outer world through a router that is connected
  *  directly to the cluster's backbone (no private link).
  *
  *  A cluster is connected to the outer world through a router that is connected
  *  directly to the cluster's backbone (no private link).
  *
- *  A communication from an host A to the outer world goes through the following links:
+ *  A communication from a host A to the outer world goes through the following links:
  *   <tt>limiter(A)_UP, private(A)_UP, backbone</tt>
  *  (because the private router is directly connected to the cluster core).
  */
  *   <tt>limiter(A)_UP, private(A)_UP, backbone</tt>
  *  (because the private router is directly connected to the cluster core).
  */
index 260661c..8b24af2 100644 (file)
@@ -57,7 +57,7 @@ protected:
 public:
   s4u::NetZone* get_iface() { return &piface_; }
 
 public:
   s4u::NetZone* get_iface() { return &piface_; }
 
-  /** @brief Make an host within that NetZone */
+  /** @brief Make a host within that NetZone */
   simgrid::s4u::Host* create_host(const char* name, std::vector<double>* speed_per_pstate, int core_count,
                                   std::map<std::string, std::string>* props);
   /** @brief Creates a new route in this NetZone */
   simgrid::s4u::Host* create_host(const char* name, std::vector<double>* speed_per_pstate, int core_count,
                                   std::map<std::string, std::string>* props);
   /** @brief Creates a new route in this NetZone */
index 820ff10..ecbe718 100644 (file)
@@ -29,7 +29,7 @@ namespace routing {
  *
  *  The resulting value is assumed to be in milliseconds.
  *
  *
  *  The resulting value is assumed to be in milliseconds.
  *
- *  So, to go from an host A to an host B, the following links would be used:
+ *  So, to go from a host A to a host B, the following links would be used:
  *  <tt>private(A)_UP, private(B)_DOWN</tt>, with the additional latency computed above.
  *  The bandwidth of the UP and DOWN links is not symmetric (in contrary to usual SimGrid
  *  links), but naturally correspond to the values provided when the peer was created.
  *  <tt>private(A)_UP, private(B)_DOWN</tt>, with the additional latency computed above.
  *  The bandwidth of the UP and DOWN links is not symmetric (in contrary to usual SimGrid
  *  links), but naturally correspond to the values provided when the peer was created.
index 04b8d76..3167cfd 100644 (file)
@@ -229,7 +229,7 @@ public:
    * executed when your actor is killed. You should use them to free the data used by your actor.
    *
    * Please note that functions registered in this signal cannot do any simcall themselves. It means that they cannot
    * executed when your actor is killed. You should use them to free the data used by your actor.
    *
    * Please note that functions registered in this signal cannot do any simcall themselves. It means that they cannot
-   * send or receive messages, acquire or release mutexes, nor even modify an host property or something. Not only are
+   * send or receive messages, acquire or release mutexes, nor even modify a host property or something. Not only are
    * blocking functions forbidden in this setting, but also modifications to the global state.
    */
   void on_exit(std::function<void(int, void*)> fun, void* data);
    * blocking functions forbidden in this setting, but also modifications to the global state.
    */
   void on_exit(std::function<void(int, void*)> fun, void* data);
index 83e7025..332ae45 100644 (file)
@@ -52,7 +52,7 @@ private:
 public:
   /*** Called on each newly created host */
   static simgrid::xbt::signal<void(Host&)> on_creation;
 public:
   /*** Called on each newly created host */
   static simgrid::xbt::signal<void(Host&)> on_creation;
-  /*** Called just before destructing an host */
+  /*** Called just before destructing a host */
   static simgrid::xbt::signal<void(Host&)> on_destruction;
   /*** Called when the machine is turned on or off (called AFTER the change) */
   static simgrid::xbt::signal<void(Host&)> on_state_change;
   static simgrid::xbt::signal<void(Host&)> on_destruction;
   /*** Called when the machine is turned on or off (called AFTER the change) */
   static simgrid::xbt::signal<void(Host&)> on_state_change;
@@ -65,9 +65,9 @@ public:
   Host(Host const&) = delete;
   Host& operator=(Host const&) = delete;
 
   Host(Host const&) = delete;
   Host& operator=(Host const&) = delete;
 
-  /** Retrieve an host from its name, or return nullptr */
+  /** Retrieve a host from its name, or return nullptr */
   static Host* by_name_or_null(std::string name);
   static Host* by_name_or_null(std::string name);
-  /** Retrieve an host from its name, or die */
+  /** Retrieve a host from its name, or die */
   static s4u::Host* by_name(std::string name);
   /** Retrieve the host on which the current actor is running */
   static s4u::Host* current();
   static s4u::Host* by_name(std::string name);
   /** Retrieve the host on which the current actor is running */
   static s4u::Host* current();
index 3a9a64c..164131c 100644 (file)
@@ -59,9 +59,9 @@ void jxbt_throw_null(JNIEnv* env, std::string msg);
 
 /** Thrown on illegal arguments */
 void jxbt_throw_illegal(JNIEnv* env, std::string msg);
 
 /** Thrown on illegal arguments */
 void jxbt_throw_illegal(JNIEnv* env, std::string msg);
-/** Thrown when looking for an host from name does not lead to anything */
+/** Thrown when looking for a host from name does not lead to anything */
 void jxbt_throw_host_not_found(JNIEnv* env, std::string invalid_name);
 void jxbt_throw_host_not_found(JNIEnv* env, std::string invalid_name);
-/** Thrown when looking for an host from name does not lead to anything */
+/** Thrown when looking for a host from name does not lead to anything */
 void jxbt_throw_process_not_found(JNIEnv* env, std::string invalid_name);
 /** Thrown when a transfer failure accure while Sending task */
 void jxbt_throw_transfer_failure(JNIEnv* env, std::string detail);
 void jxbt_throw_process_not_found(JNIEnv* env, std::string invalid_name);
 /** Thrown when a transfer failure accure while Sending task */
 void jxbt_throw_transfer_failure(JNIEnv* env, std::string detail);
index 02b5583..3943a70 100644 (file)
@@ -17,7 +17,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(lua_host, "Lua Host module");
 /*                                simgrid.host API                                   */
 /* ********************************************************************************* */
 
 /*                                simgrid.host API                                   */
 /* ********************************************************************************* */
 
-/** @brief Ensures that the pointed stack value is an host userdatum and returns it.
+/** @brief Ensures that the pointed stack value is a host userdatum and returns it.
  *
  * @param L a Lua state
  * @param index an index in the Lua stack
  *
  * @param L a Lua state
  * @param index an index in the Lua stack
index 4a9fd87..b7ddd8f 100644 (file)
@@ -79,8 +79,8 @@ PYBIND11_MODULE(simgrid, m)
       }, "Registers the main function of an actor that will be launched from the deployment file");
 
   // Currently, Host lead to segfault:
       }, "Registers the main function of an actor that will be launched from the deployment file");
 
   // Currently, Host lead to segfault:
-  py::class_<simgrid::s4u::Host, std::unique_ptr<Host, py::nodelete>>(m, "Host")
-      .def("by_name", &Host::by_name, "Retrieve an host from its name, or die");
+  py::class_<simgrid::s4u::Host, std::unique_ptr<Host, py::nodelete>>(m, "Host").def(
+      "by_name", &Host::by_name, "Retrieve a host from its name, or die");
 
   py::class_<simgrid::s4u::Actor, ActorPtr>(m, "Actor", "An actor is an independent stream of execution in your distributed application");
 
 
   py::class_<simgrid::s4u::Actor, ActorPtr>(m, "Actor", "An actor is an independent stream of execution in your distributed application");
 
index 9ff4572..461ebb7 100644 (file)
@@ -188,9 +188,9 @@ void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint*
     xbt_assert(dst->is_netzone(), "When defining a NetzoneRoute, dst must be a netzone but '%s' is not", dstName);
 
     xbt_assert(gw_src->is_host() || gw_src->is_router(),
     xbt_assert(dst->is_netzone(), "When defining a NetzoneRoute, dst must be a netzone but '%s' is not", dstName);
 
     xbt_assert(gw_src->is_host() || gw_src->is_router(),
-               "When defining a NetzoneRoute, gw_src must be an host or a router but '%s' is not.", srcName);
+               "When defining a NetzoneRoute, gw_src must be a host or a router but '%s' is not.", srcName);
     xbt_assert(gw_dst->is_host() || gw_dst->is_router(),
     xbt_assert(gw_dst->is_host() || gw_dst->is_router(),
-               "When defining a NetzoneRoute, gw_dst must be an host or a router but '%s' is not.", dstName);
+               "When defining a NetzoneRoute, gw_dst must be a host or a router but '%s' is not.", dstName);
 
     xbt_assert(gw_src != gw_dst, "Cannot define an NetzoneRoute from '%s' to itself", gw_src->get_cname());
 
 
     xbt_assert(gw_src != gw_dst, "Cannot define an NetzoneRoute from '%s' to itself", gw_src->get_cname());
 
index 2e3a673..b8f09e6 100644 (file)
@@ -33,7 +33,7 @@ VirtualMachine::VirtualMachine(std::string name, s4u::Host* physical_host, int c
     : Host(name), pimpl_vm_(new vm::VirtualMachineImpl(this, physical_host, core_amount, ramsize))
 {
   // xbt_assert(s4u::Host::by_name(name) == nullptr,
     : Host(name), pimpl_vm_(new vm::VirtualMachineImpl(this, physical_host, core_amount, ramsize))
 {
   // xbt_assert(s4u::Host::by_name(name) == nullptr,
-  //           "Cannot create a VM named %s: this name is already used by an host or a VM", name.c_str());
+  //           "Cannot create a VM named %s: this name is already used by a host or a VM", name.c_str());
 
   XBT_DEBUG("Create VM %s", name.c_str());
 
 
   XBT_DEBUG("Create VM %s", name.c_str());
 
index 5cb1a98..eb3ff86 100644 (file)
@@ -127,7 +127,7 @@ void Engine::host_unregister(std::string name)
   pimpl->hosts_.erase(name);
 }
 
   pimpl->hosts_.erase(name);
 }
 
-/** @brief Find an host from its name.
+/** @brief Find a host from its name.
  *
  *  @throw std::invalid_argument if the searched host does not exist.
  */
  *
  *  @throw std::invalid_argument if the searched host does not exist.
  */
@@ -138,7 +138,7 @@ simgrid::s4u::Host* Engine::host_by_name(std::string name)
   return pimpl->hosts_.at(name);
 }
 
   return pimpl->hosts_.at(name);
 }
 
-/** @brief Find an host from its name (or nullptr if that host does not exist) */
+/** @brief Find a host from its name (or nullptr if that host does not exist) */
 simgrid::s4u::Host* Engine::host_by_name_or_null(std::string name)
 {
   auto host = pimpl->hosts_.find(name);
 simgrid::s4u::Host* Engine::host_by_name_or_null(std::string name)
 {
   auto host = pimpl->hosts_.find(name);
index b44b000..6c27ca3 100644 (file)
@@ -49,7 +49,7 @@ Host::~Host()
 
 /** @brief Fire the required callbacks and destroy the object
  *
 
 /** @brief Fire the required callbacks and destroy the object
  *
- * Don't delete directly an Host, call h->destroy() instead.
+ * Don't delete directly a host, call h->destroy() instead.
  *
  * This is cumbersome but this is the simplest solution to ensure that the
  * onDestruction() callback receives a valid object (because of the destructor
  *
  * This is cumbersome but this is the simplest solution to ensure that the
  * onDestruction() callback receives a valid object (because of the destructor
@@ -259,7 +259,7 @@ int Host::get_pstate() const
 
 /**
  * @ingroup simix_storage_management
 
 /**
  * @ingroup simix_storage_management
- * @brief Returns the list of storages attached to an host.
+ * @brief Returns the list of storages attached to a host.
  * @return a vector containing all storages attached to the host
  */
 std::vector<const char*> Host::get_attached_storages() const
  * @return a vector containing all storages attached to the host
  */
 std::vector<const char*> Host::get_attached_storages() const
@@ -518,7 +518,7 @@ int sg_host_is_off(sg_host_t host)
   return host->is_off();
 }
 
   return host->is_off();
 }
 
-/** @brief Get the properties of an host */
+/** @brief Get the properties of a host */
 xbt_dict_t sg_host_get_properties(sg_host_t host)
 {
   xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f);
 xbt_dict_t sg_host_get_properties(sg_host_t host)
 {
   xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f);
@@ -611,7 +611,7 @@ void sg_host_dump(sg_host_t host)
   }
 }
 
   }
 }
 
-/** @brief Return the list of actors attached to an host.
+/** @brief Return the list of actors attached to a host.
  *
  * @param host a host
  * @param whereto a dynar in which we should push actors living on that host
  *
  * @param host a host
  * @param whereto a dynar in which we should push actors living on that host
index 850f15d..7bf0ed3 100644 (file)
@@ -28,7 +28,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
 /**
  * @ingroup simix_process_management
 
 /**
  * @ingroup simix_process_management
- * @brief Creates a synchro that executes some computation of an host.
+ * @brief Creates a synchro that executes some computation of a host.
  *
  * This function creates a SURF action and allocates the data necessary
  * to create the SIMIX synchro. It can raise a HostFailureException exception if the host crashed.
  *
  * This function creates a SURF action and allocates the data necessary
  * to create the SIMIX synchro. It can raise a HostFailureException exception if the host crashed.
index ff6f193..8cf43e0 100644 (file)
@@ -97,7 +97,7 @@ HostImpl::~HostImpl()
 
 /** Re-starts all the actors that are marked as restartable.
  *
 
 /** Re-starts all the actors that are marked as restartable.
  *
- * Weird things will happen if you turn on an host that is already on. S4U is fool-proof, not this.
+ * Weird things will happen if you turn on a host that is already on. S4U is fool-proof, not this.
  */
 void HostImpl::turn_on()
 {
  */
 void HostImpl::turn_on()
 {
index aaf5bfa..b3eaf61 100644 (file)
@@ -63,7 +63,7 @@ void sg_platf_exit() {
   surf_parse_lex_destroy();
 }
 
   surf_parse_lex_destroy();
 }
 
-/** @brief Add an host to the current AS */
+/** @brief Add a host to the current AS */
 void sg_platf_new_host(simgrid::kernel::routing::HostCreationArgs* args)
 {
   std::map<std::string, std::string> props;
 void sg_platf_new_host(simgrid::kernel::routing::HostCreationArgs* args)
 {
   std::map<std::string, std::string> props;
@@ -633,13 +633,13 @@ void sg_platf_new_Zone_seal()
   current_routing = static_cast<simgrid::kernel::routing::NetZoneImpl*>(current_routing->get_father());
 }
 
   current_routing = static_cast<simgrid::kernel::routing::NetZoneImpl*>(current_routing->get_father());
 }
 
-/** @brief Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi) */
+/** @brief Add a link connecting a host to the rest of its AS (which must be cluster or vivaldi) */
 void sg_platf_new_hostlink(simgrid::kernel::routing::HostLinkCreationArgs* hostlink)
 {
   simgrid::kernel::routing::NetPoint* netpoint = sg_host_by_name(hostlink->id.c_str())->pimpl_netpoint;
   xbt_assert(netpoint, "Host '%s' not found!", hostlink->id.c_str());
   xbt_assert(dynamic_cast<simgrid::kernel::routing::ClusterZone*>(current_routing),
 void sg_platf_new_hostlink(simgrid::kernel::routing::HostLinkCreationArgs* hostlink)
 {
   simgrid::kernel::routing::NetPoint* netpoint = sg_host_by_name(hostlink->id.c_str())->pimpl_netpoint;
   xbt_assert(netpoint, "Host '%s' not found!", hostlink->id.c_str());
   xbt_assert(dynamic_cast<simgrid::kernel::routing::ClusterZone*>(current_routing),
-             "Only hosts from Cluster and Vivaldi ASes can get an host_link.");
+             "Only hosts from Cluster and Vivaldi ASes can get a host_link.");
 
   simgrid::s4u::Link* linkUp   = simgrid::s4u::Link::by_name_or_null(hostlink->link_up);
   simgrid::s4u::Link* linkDown = simgrid::s4u::Link::by_name_or_null(hostlink->link_down);
 
   simgrid::s4u::Link* linkUp   = simgrid::s4u::Link::by_name_or_null(hostlink->link_up);
   simgrid::s4u::Link* linkDown = simgrid::s4u::Link::by_name_or_null(hostlink->link_down);