Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar: remove an unused parameters down below
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 6 Jul 2017 14:36:42 +0000 (16:36 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 6 Jul 2017 14:37:53 +0000 (16:37 +0200)
Also: fix jedule build (sorry for mixing)

include/simgrid/simix.h
src/instr/jedule/jedule_platform.cpp
src/instr/jedule/jedule_sd_binding.cpp
src/simix/libsmx.cpp
src/simix/popping_accessors.h
src/simix/popping_bodies.cpp
src/simix/popping_generated.cpp
src/simix/simcalls.in
src/simix/smx_network.cpp
src/simix/smx_network_private.h
src/smpi/smpi_request.cpp

index 9f51fd5..287817d 100644 (file)
@@ -250,8 +250,8 @@ simcall_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, siz
                    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 */
index c5e6b32..5109fd7 100644 (file)
@@ -59,15 +59,15 @@ void Container::addResources(std::vector<sg_host_t> hosts)
 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);
     }
index 7bd6543..c157f2b 100644 (file)
@@ -28,12 +28,12 @@ void jedule_log_sd_event(SD_task_t task)
 
 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;
 }
index fa7ef5b..c05655a 100644 (file)
@@ -391,12 +391,12 @@ smx_activity_t simcall_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void
 /**
  * \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);
 }
 
 /**
index 76cf97b..541c471 100644 (file)
@@ -516,53 +516,29 @@ static inline void simcall_comm_iprobe__set__type(smx_simcall_t simcall, int arg
 {
   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)
@@ -1765,8 +1741,8 @@ simcall_HANDLER_execution_wait(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,
index e1fb759..fb5b80d 100644 (file)
@@ -148,12 +148,13 @@ inline static smx_actor_t simcall_BODY_process_restart(smx_actor_t process) {
   }
 
   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) {
index 654a8c4..da1b8b4 100644 (file)
@@ -178,10 +178,8 @@ case SIMCALL_COMM_IPROBE:
   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;
 
index cdf2d15..f015038 100644 (file)
@@ -53,7 +53,7 @@ void          process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void
 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]];
index 2d5a76a..7975425 100644 (file)
@@ -247,14 +247,14 @@ SIMIX_comm_irecv(smx_actor_t dst_proc, smx_mailbox_t mbox, void* dst_buff, size_
   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;
index 80924c3..0ed901f 100644 (file)
@@ -15,7 +15,7 @@ XBT_PRIVATE smx_activity_t SIMIX_comm_irecv(smx_actor_t dst_proc, smx_mailbox_t
                                             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
index 41fe4bd..e3d477b 100644 (file)
@@ -347,13 +347,12 @@ void Request::start()
       //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();
@@ -364,7 +363,7 @@ void Request::start()
     } 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");
@@ -440,8 +439,7 @@ void Request::start()
     } 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();
@@ -449,7 +447,7 @@ void Request::start()
         } 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();
@@ -642,15 +640,13 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
   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){