FIXME: NetZoneImpl::on_route_creation is not removed.
XBT_ATTRIB_NORETURN= \
XBT_ATTRIB_UNUSED= \
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cname,parent,desc)= \
- XBT_ATTRIB_DEPRECATED_v332(mesg)= \
XBT_ATTRIB_DEPRECATED_v333(mesg)= \
XBT_ATTRIB_DEPRECATED_v334(mesg)= \
XBT_ATTRIB_DEPRECATED_v335(mesg)=
/*! Same as wait_all, but with a timeout. Return the number of terminated comm (less than comms.size() if the timeout
* occurs). */
static size_t wait_all_for(const std::vector<CommPtr>& comms, double timeout);
-
-#ifndef DOXYGEN
- XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for parameter") static int wait_any(
- const std::vector<CommPtr>* comms)
- {
- return static_cast<int>(wait_any_for(*comms, -1));
- }
- XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for first parameter") static int wait_any_for(
- const std::vector<CommPtr>* comms, double timeout)
- {
- return static_cast<int>(wait_any_for(*comms, timeout));
- }
- XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for parameter") static void wait_all(
- const std::vector<CommPtr>* comms)
- {
- wait_all(*comms);
- }
- XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for parameter") static int test_any(
- const std::vector<CommPtr>* comms)
- {
- return static_cast<int>(test_any(*comms));
- }
-#endif
};
} // namespace s4u
} // namespace simgrid
/*! Same as wait_any, but with a timeout. If the timeout occurs, parameter last is returned.*/
static ssize_t wait_any_for(const std::vector<ExecPtr>& execs, double timeout);
-#ifndef DOXYGEN
- XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for parameter")
- static int wait_any(std::vector<ExecPtr>* execs) { return static_cast<int>(wait_any_for(*execs, -1)); }
- XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for first parameter")
- static int wait_any_for(std::vector<ExecPtr>* execs, double timeout) { return static_cast<int>(wait_any_for(*execs, timeout)); }
-#endif
-
/** @brief On sequential executions, returns the amount of flops that remain to be done; This cannot be used on
* parallel executions. */
double get_remaining() const override;
/** @brief Get the netpoint associated to this netzone */
kernel::routing::NetPoint* get_netpoint();
-#ifndef DOXYGEN
- XBT_ATTRIB_DEPRECATED_v332("Please use set_parent() to manage NetZone's relationship") NetZone* add_child(
- NetZone* new_zone);
-#endif
-
void extract_xbt_graph(const s_xbt_graph_t* graph, std::map<std::string, xbt_node_t, std::less<>>* nodes,
std::map<std::string, xbt_edge_t, std::less<>>* edges);
void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
kernel::routing::NetPoint* gw_dst, const std::vector<LinkInRoute>& link_list, bool symmetrical = true);
-#ifndef DOXYGEN
- XBT_ATTRIB_DEPRECATED_v332(
- "Please use add_route() method which uses s4u::LinkInRoute instead of "
- "LinkImpl") void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
- kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
- const std::vector<kernel::resource::StandardLinkImpl*>& link_list, bool symmetrical);
-
- XBT_ATTRIB_DEPRECATED_v332(
- "Please use add_bypass_route() method which uses s4u::LinkInRoute instead of "
- "LinkImpl") void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
- kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
- const std::vector<kernel::resource::StandardLinkImpl*>& link_list,
- bool /*symmetrical*/);
-#endif
-
void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
const std::vector<LinkInRoute>& link_list);
-#ifndef DOXYGEN
- /*** Called on each newly created regular route (not on bypass routes) */
- static xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
- kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
- std::vector<kernel::resource::StandardLinkImpl*> const& link_list)>
- on_route_creation; // XBT_ATTRIB_DEPRECATED_v332 : should not be used by users, used by ns3.. if necessary,
- // signal shouldn't use LinkImpl*
-
private:
+#ifndef DOXYGEN
static xbt::signal<void(NetZone const&)> on_creation;
static xbt::signal<void(NetZone const&)> on_seal;
#endif
/** @brief Seal this netzone configuration */
NetZone* seal();
-
-private:
-#ifndef DOXYGEN
- /** @brief XBT_ATTRIB_DEPRECATED_v332 Auxiliary function to convert types */
- static std::vector<LinkInRoute>
- convert_to_linkInRoute(const std::vector<kernel::resource::StandardLinkImpl*>& link_list);
-#endif
};
// External constructors so that the types (and the types of their content) remain hidden
SUSPENDED, /**< Suspend/resume does not involve disk I/O, so we assume there is no transition states. */
DESTROYED
);
-#ifndef DOXYGEN
- using state XBT_ATTRIB_DEPRECATED_v332("Please use VirtualMachine::State") = State;
-#endif
kernel::resource::VirtualMachineImpl* get_vm_impl() const { return pimpl_vm_; }
void start();
XBT_ATTRIB_DEPRECATED_v333("Please use simgrid_set_maestro()") XBT_PUBLIC
void SIMIX_set_maestro(void (*code)(void*), void* data);
-/* Simulation execution */
-XBT_ATTRIB_DEPRECATED_v332("Please use EngineImpl:run()") XBT_PUBLIC void SIMIX_run();
-XBT_ATTRIB_DEPRECATED_v332("Please use simgrid_get_clock() or Engine::get_clock()") XBT_PUBLIC double SIMIX_get_clock();
-
SG_END_DECL
/********************************* Process ************************************/
#define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg)))
#endif
-#define XBT_ATTRIB_DEPRECATED_v332(mesg) \
- XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.31)")
#define XBT_ATTRIB_DEPRECATED_v333(mesg) \
XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.32)")
#define XBT_ATTRIB_DEPRECATED_v334(mesg) \
py::return_value_policy::reference_internal,
py::call_guard<py::gil_scoped_release>(),
"Start the comm, and ignore its result. It can be completely forgotten after that.")
- // use py::overload_cast for wait_all/wait_any, until the overload marked XBT_ATTRIB_DEPRECATED_v332 is removed
.def_static(
- "wait_all", py::overload_cast<const std::vector<simgrid::s4u::CommPtr>&>(&simgrid::s4u::Comm::wait_all),
+ "wait_all", &simgrid::s4u::Comm::wait_all,
py::arg("comms"),
py::call_guard<py::gil_scoped_release>(),
"Block until the completion of all communications in the list.")
"Block until the completion of all communications in the list, or raises TimeoutException after "
"the specified timeout.")
.def_static(
- "wait_any", py::overload_cast<const std::vector<simgrid::s4u::CommPtr>&>(&simgrid::s4u::Comm::wait_any),
+ "wait_any", &simgrid::s4u::Comm::wait_any,
py::arg("comms"),
py::call_guard<py::gil_scoped_release>(),
"Block until the completion of any communication in the list and return the index of the terminated one.")
.def_static(
"wait_any_for",
- py::overload_cast<const std::vector<simgrid::s4u::CommPtr>&, double>(&simgrid::s4u::Comm::wait_any_for),
+ &simgrid::s4u::Comm::wait_any_for,
py::arg("comms"), py::arg("timeout"),
py::call_guard<py::gil_scoped_release>(),
"Block until the completion of any communication in the list and return the index of the terminated "
#include <simgrid/s4u/Host.hpp>
#include <simgrid/sg_config.hpp>
-#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v332)
-#include <simgrid/simix.h>
-
#include "mc/mc.h"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/resource/StandardLinkImpl.hpp"
}
} // namespace kernel
} // namespace simgrid
-
-void SIMIX_run() // XBT_ATTRIB_DEPRECATED_v332
-{
- simgrid::kernel::EngineImpl::get_instance()->run(-1);
-}
xbt_assert(not dst->is_netzone(),
"When defining a route, dst cannot be a netzone such as '%s'. Did you meant to have a NetzoneRoute?",
dstName);
- s4u::NetZone::on_route_creation(symmetrical, src, dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
NetZoneImpl::on_route_creation(symmetrical, src, dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
} else {
XBT_DEBUG("Load NetzoneRoute from %s@%s to %s@%s", srcName, gw_src->get_cname(), dstName, gw_dst->get_cname());
"Invalid NetzoneRoute from %s@%s to %s@%s: gw_dst %s belongs to %s, not to %s.", srcName,
gw_src->get_cname(), dstName, gw_dst->get_cname(), gw_dst->get_cname(),
gw_dst->get_englobing_zone()->get_cname(), dst->get_cname());
- s4u::NetZone::on_route_creation(symmetrical, gw_src, gw_dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
NetZoneImpl::on_route_creation(symmetrical, gw_src, gw_dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
}
}
} // namespace s4u
} // namespace simgrid
-double SIMIX_get_clock() // XBT_ATTRIB_DEPRECATED_v332
-{
- return simgrid::s4u::Engine::get_clock();
-}
-
/* **************************** Public C interface *************************** */
void simgrid_init(int* argc, char** argv)
{
namespace simgrid {
namespace s4u {
-xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
- kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
- std::vector<kernel::resource::StandardLinkImpl*> const& link_list)>
- NetZone::on_route_creation;
xbt::signal<void(NetZone const&)> NetZone::on_creation;
xbt::signal<void(NetZone const&)> NetZone::on_seal;
return res;
}
-NetZone* NetZone::add_child(NetZone* new_zone) // XBT_ATTRIB_DEPRECATED_v332
-{
- new_zone->set_parent(this);
- return this;
-}
-
const std::string& NetZone::get_name() const
{
return pimpl_->get_name();
return pimpl_->add_component(elm);
}
-// XBT_ATTRIB_DEPRECATED_v332
-std::vector<LinkInRoute>
-NetZone::convert_to_linkInRoute(const std::vector<kernel::resource::StandardLinkImpl*>& link_list)
-{
- std::vector<LinkInRoute> links;
- for (const auto* link : link_list) {
- links.emplace_back(LinkInRoute(link->get_iface()));
- }
- return links;
-}
-
void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
const std::vector<LinkInRoute>& link_list, bool symmetrical)
pimpl_->add_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
}
-// XBT_ATTRIB_DEPRECATED_v332
-void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
- kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
- const std::vector<kernel::resource::StandardLinkImpl*>& link_list, bool symmetrical)
-{
- pimpl_->add_route(src, dst, gw_src, gw_dst, convert_to_linkInRoute(link_list), symmetrical);
-}
-
-// XBT_ATTRIB_DEPRECATED_v332
-void NetZone::add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
- kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
- const std::vector<kernel::resource::StandardLinkImpl*>& link_list, bool /*symmetrical*/)
-{
- pimpl_->add_bypass_route(src, dst, gw_src, gw_dst, convert_to_linkInRoute(link_list));
-}
-
void NetZone::add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
const std::vector<LinkInRoute>& link_list)