void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data, double rate);
XBT_PUBLIC(smx_activity_t)
-simcall_comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag,
- int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), void* data);
+simcall_comm_iprobe(smx_mailbox_t mbox, int type, int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
+ void* data);
XBT_PUBLIC(void) simcall_comm_cancel(smx_activity_t comm);
/* FIXME: waitany is going to be a vararg function, and should take a timeout */
void Container::createHierarchy(sg_netzone_t from_as)
{
- if (from_as->children()->empty()) {
+ if (from_as->getChildren()->empty()) {
// I am no AS
// add hosts to jedule platform
std::vector<sg_host_t> table;
- from_as->hosts(&table);
+ from_as->getHosts(&table);
this->addResources(table);
} else {
- for (auto nz : *from_as->children()) {
- jed_container_t child_container = new simgrid::jedule::Container(std::string(nz->name()));
+ for (auto nz : *from_as->getChildren()) {
+ jed_container_t child_container = new simgrid::jedule::Container(std::string(nz->getCname()));
this->addChild(child_container);
child_container->createHierarchy(nz);
}
void jedule_sd_init()
{
- sg_netzone_t root_comp = simgrid::s4u::Engine::instance()->netRoot();
- XBT_DEBUG("root name %s\n", root_comp->name());
+ sg_netzone_t root_comp = simgrid::s4u::Engine::getInstance()->getNetRoot();
+ XBT_DEBUG("root name %s\n", root_comp->getCname());
my_jedule = new simgrid::jedule::Jedule();
- jed_container_t root_container = new simgrid::jedule::Container(std::string(root_comp->name()));
+ jed_container_t root_container = new simgrid::jedule::Container(std::string(root_comp->getCname()));
root_container->createHierarchy(root_comp);
my_jedule->root_container = root_container;
}
/**
* \ingroup simix_comm_management
*/
-smx_activity_t simcall_comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag,
+smx_activity_t simcall_comm_iprobe(smx_mailbox_t mbox, int type,
int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), void* data)
{
xbt_assert(mbox, "No rendez-vous point defined for iprobe");
- return simcall_BODY_comm_iprobe(mbox, type, src, tag, match_fun, data);
+ return simcall_BODY_comm_iprobe(mbox, type, match_fun, data);
}
/**
{
simgrid::simix::marshal<int>(simcall->args[1], arg);
}
-static inline int simcall_comm_iprobe__get__src(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<int>(simcall->args[2]);
-}
-static inline int simcall_comm_iprobe__getraw__src(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<int>(simcall->args[2]);
-}
-static inline void simcall_comm_iprobe__set__src(smx_simcall_t simcall, int arg)
-{
- simgrid::simix::marshal<int>(simcall->args[2], arg);
-}
-static inline int simcall_comm_iprobe__get__tag(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<int>(simcall->args[3]);
-}
-static inline int simcall_comm_iprobe__getraw__tag(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<int>(simcall->args[3]);
-}
-static inline void simcall_comm_iprobe__set__tag(smx_simcall_t simcall, int arg)
-{
- simgrid::simix::marshal<int>(simcall->args[3], arg);
-}
static inline simix_match_func_t simcall_comm_iprobe__get__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]);
+ return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[2]);
}
static inline simix_match_func_t simcall_comm_iprobe__getraw__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args[4]);
+ return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args[2]);
}
static inline void simcall_comm_iprobe__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg)
{
- simgrid::simix::marshal<simix_match_func_t>(simcall->args[4], arg);
+ simgrid::simix::marshal<simix_match_func_t>(simcall->args[2], arg);
}
static inline void* simcall_comm_iprobe__get__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<void*>(simcall->args[5]);
+ return simgrid::simix::unmarshal<void*>(simcall->args[3]);
}
static inline void* simcall_comm_iprobe__getraw__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<void*>(simcall->args[5]);
+ return simgrid::simix::unmarshal_raw<void*>(simcall->args[3]);
}
static inline void simcall_comm_iprobe__set__data(smx_simcall_t simcall, void* arg)
{
- simgrid::simix::marshal<void*>(simcall->args[5], arg);
+ simgrid::simix::marshal<void*>(simcall->args[3], arg);
}
static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
simcall_comm_iprobe__get__result(smx_simcall_t simcall)
boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution);
XBT_PRIVATE smx_actor_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_actor_t process);
XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, int src, int tag,
- simix_match_func_t match_fun, void* data);
+simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, simix_match_func_t match_fun,
+ void* data);
XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout);
XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate,
}
inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
- simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data)
+ simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, simix_match_func_t match_fun, void* data)
{
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_iprobe(&SIMIX_process_self()->simcall, mbox, type, src, tag, match_fun, data);
- return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_mailbox_t, int, int, int,
- simix_match_func_t, void*>(SIMCALL_COMM_IPROBE, mbox, type, src, tag, match_fun, data);
+ if (0)
+ simcall_HANDLER_comm_iprobe(&SIMIX_process_self()->simcall, mbox, type, match_fun, data);
+ return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_mailbox_t, int,
+ simix_match_func_t, void*>(SIMCALL_COMM_IPROBE, mbox, type, match_fun, data);
}
inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(
simcall->result, simcall_HANDLER_comm_iprobe(simcall, simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[0]),
simgrid::simix::unmarshal<int>(simcall->args[1]),
- simgrid::simix::unmarshal<int>(simcall->args[2]),
- simgrid::simix::unmarshal<int>(simcall->args[3]),
- simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]),
- simgrid::simix::unmarshal<void*>(simcall->args[5])));
+ simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[2]),
+ simgrid::simix::unmarshal<void*>(simcall->args[3])));
SIMIX_simcall_answer(simcall);
break;
void process_auto_restart_set(smx_actor_t process, int auto_restart) [[nohandler]];
smx_actor_t process_restart(smx_actor_t process);
-boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data);
+boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_iprobe(smx_mailbox_t mbox, int type, simix_match_func_t match_fun, void* data);
void comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) [[block]];
boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached);
void comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) [[block]];
return other_comm;
}
-smx_activity_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, int src, int tag,
+smx_activity_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type,
simix_match_func_t match_fun, void* data)
{
- return SIMIX_comm_iprobe(simcall->issuer, mbox, type, src, tag, match_fun, data);
+ return SIMIX_comm_iprobe(simcall->issuer, mbox, type, match_fun, data);
}
-smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int type, int src, int tag,
- simix_match_func_t match_fun, void* data)
+smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int type, simix_match_func_t match_fun,
+ void* data)
{
XBT_DEBUG("iprobe from %p %p", mbox, &mbox->comm_queue);
simgrid::kernel::activity::CommImplPtr this_comm;
int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data,
double rate);
-XBT_PRIVATE smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int type, int src, int tag,
+XBT_PRIVATE smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int type,
simix_match_func_t match_fun, void* data);
#endif
//begin with the more appropriate one : the small one.
mailbox = process->mailbox_small();
XBT_DEBUG("Is there a corresponding send already posted in the small mailbox %p (in case of SSEND)?", mailbox);
- smx_activity_t action = simcall_comm_iprobe(mailbox, 0, src_,tag_, &match_recv,
- static_cast<void*>(this));
+ smx_activity_t action = simcall_comm_iprobe(mailbox, 0, &match_recv, static_cast<void*>(this));
if (action == nullptr) {
mailbox = process->mailbox();
XBT_DEBUG("No, nothing in the small mailbox test the other one : %p", mailbox);
- action = simcall_comm_iprobe(mailbox, 0, src_,tag_, &match_recv, static_cast<void*>(this));
+ action = simcall_comm_iprobe(mailbox, 0, &match_recv, static_cast<void*>(this));
if (action == nullptr) {
XBT_DEBUG("Still nothing, switch back to the small mailbox : %p", mailbox);
mailbox = process->mailbox_small();
} else {
mailbox = process->mailbox_small();
XBT_DEBUG("Is there a corresponding send already posted the small mailbox?");
- smx_activity_t action = simcall_comm_iprobe(mailbox, 0, src_,tag_, &match_recv, static_cast<void*>(this));
+ smx_activity_t action = simcall_comm_iprobe(mailbox, 0, &match_recv, static_cast<void*>(this));
if (action == nullptr) {
XBT_DEBUG("No, nothing in the permanent receive mailbox");
} else if (((flags_ & RMA) != 0) || static_cast<int>(size_) < async_small_thresh) { // eager mode
mailbox = process->mailbox();
XBT_DEBUG("Is there a corresponding recv already posted in the large mailbox %p?", mailbox);
- smx_activity_t action = simcall_comm_iprobe(mailbox, 1,dst_, tag_, &match_send,
- static_cast<void*>(this));
+ smx_activity_t action = simcall_comm_iprobe(mailbox, 1, &match_send, static_cast<void*>(this));
if (action == nullptr) {
if ((flags_ & SSEND) == 0){
mailbox = process->mailbox_small();
} else {
mailbox = process->mailbox_small();
XBT_DEBUG("SSEND : Is there a corresponding recv already posted in the small mailbox %p?", mailbox);
- action = simcall_comm_iprobe(mailbox, 1,dst_, tag_, &match_send, static_cast<void*>(this));
+ action = simcall_comm_iprobe(mailbox, 1, &match_send, static_cast<void*>(this));
if (action == nullptr) {
XBT_DEBUG("No, we are first, send to large mailbox");
mailbox = process->mailbox();
if (xbt_cfg_get_int("smpi/async-small-thresh") > 0){
mailbox = smpi_process()->mailbox_small();
XBT_DEBUG("Trying to probe the perm recv mailbox");
- request->action_ = simcall_comm_iprobe(mailbox, 0, request->src_, request->tag_, &match_recv,
- static_cast<void*>(request));
+ request->action_ = simcall_comm_iprobe(mailbox, 0, &match_recv, static_cast<void*>(request));
}
if (request->action_ == nullptr){
mailbox = smpi_process()->mailbox();
XBT_DEBUG("trying to probe the other mailbox");
- request->action_ = simcall_comm_iprobe(mailbox, 0, request->src_,request->tag_, &match_recv,
- static_cast<void*>(request));
+ request->action_ = simcall_comm_iprobe(mailbox, 0, &match_recv, static_cast<void*>(request));
}
if (request->action_ != nullptr){