}
};
-/** 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)
* 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.
* 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).
*/
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 */
*
* 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.
* 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);
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;
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);
- /** 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();
/** 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);
-/** 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);
/* 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
}, "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");
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(),
- "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());
: 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());
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.
*/
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);
/** @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
/**
* @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 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);
}
}
-/** @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
/**
* @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.
/** 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()
{
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;
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),
- "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);