Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use kernelImmediate for simcalls execution_{,parallel_}start.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 3 May 2018 14:54:56 +0000 (16:54 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 3 May 2018 18:53:51 +0000 (20:53 +0200)
src/simix/libsmx.cpp
src/simix/popping_accessors.hpp
src/simix/popping_bodies.cpp
src/simix/popping_enum.h
src/simix/popping_generated.cpp
src/simix/simcalls.in

index 25aaed1..ca9ebb7 100644 (file)
@@ -65,7 +65,9 @@ smx_activity_t simcall_execution_start(const char* name, double flops_amount, do
   xbt_assert(std::isfinite(flops_amount), "flops_amount is not finite!");
   xbt_assert(std::isfinite(priority), "priority is not finite!");
 
-  return simcall_BODY_execution_start(name, flops_amount, priority, bound, host);
+  return simgrid::simix::kernelImmediate([name, flops_amount, priority, bound, host] {
+    return SIMIX_execution_start(name, flops_amount, priority, bound, host);
+  });
 }
 
 /**
@@ -99,7 +101,9 @@ smx_activity_t simcall_execution_parallel_start(const char* name, int host_nb, s
 
   xbt_assert(std::isfinite(rate), "rate is not finite!");
 
-  return simcall_BODY_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout);
+  return simgrid::simix::kernelImmediate([name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout] {
+    return SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout);
+  });
 }
 
 /**
index 272bbd0..8ee64da 100644 (file)
@@ -90,176 +90,6 @@ static inline void simcall_process_sleep__set__result(smx_simcall_t simcall, int
   simgrid::simix::marshal<int>(simcall->result, result);
 }
 
-static inline const char* simcall_execution_start__get__name(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<const char*>(simcall->args[0]);
-}
-static inline const char* simcall_execution_start__getraw__name(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<const char*>(simcall->args[0]);
-}
-static inline void simcall_execution_start__set__name(smx_simcall_t simcall, const char* arg)
-{
-  simgrid::simix::marshal<const char*>(simcall->args[0], arg);
-}
-static inline double simcall_execution_start__get__flops_amount(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<double>(simcall->args[1]);
-}
-static inline double simcall_execution_start__getraw__flops_amount(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<double>(simcall->args[1]);
-}
-static inline void simcall_execution_start__set__flops_amount(smx_simcall_t simcall, double arg)
-{
-  simgrid::simix::marshal<double>(simcall->args[1], arg);
-}
-static inline double simcall_execution_start__get__priority(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<double>(simcall->args[2]);
-}
-static inline double simcall_execution_start__getraw__priority(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<double>(simcall->args[2]);
-}
-static inline void simcall_execution_start__set__priority(smx_simcall_t simcall, double arg)
-{
-  simgrid::simix::marshal<double>(simcall->args[2], arg);
-}
-static inline double simcall_execution_start__get__bound(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<double>(simcall->args[3]);
-}
-static inline double simcall_execution_start__getraw__bound(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<double>(simcall->args[3]);
-}
-static inline void simcall_execution_start__set__bound(smx_simcall_t simcall, double arg)
-{
-  simgrid::simix::marshal<double>(simcall->args[3], arg);
-}
-static inline sg_host_t simcall_execution_start__get__host(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<sg_host_t>(simcall->args[4]);
-}
-static inline sg_host_t simcall_execution_start__getraw__host(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<sg_host_t>(simcall->args[4]);
-}
-static inline void simcall_execution_start__set__host(smx_simcall_t simcall, sg_host_t arg)
-{
-  simgrid::simix::marshal<sg_host_t>(simcall->args[4], arg);
-}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> simcall_execution_start__get__result(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result);
-}
-static inline simgrid::kernel::activity::ExecImpl* simcall_execution_start__getraw__result(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl*>(simcall->result);
-}
-static inline void simcall_execution_start__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> result)
-{
-  simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result, result);
-}
-
-static inline const char* simcall_execution_parallel_start__get__name(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<const char*>(simcall->args[0]);
-}
-static inline const char* simcall_execution_parallel_start__getraw__name(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<const char*>(simcall->args[0]);
-}
-static inline void simcall_execution_parallel_start__set__name(smx_simcall_t simcall, const char* arg)
-{
-  simgrid::simix::marshal<const char*>(simcall->args[0], arg);
-}
-static inline int simcall_execution_parallel_start__get__host_nb(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<int>(simcall->args[1]);
-}
-static inline int simcall_execution_parallel_start__getraw__host_nb(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<int>(simcall->args[1]);
-}
-static inline void simcall_execution_parallel_start__set__host_nb(smx_simcall_t simcall, int arg)
-{
-  simgrid::simix::marshal<int>(simcall->args[1], arg);
-}
-static inline sg_host_t* simcall_execution_parallel_start__get__host_list(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<sg_host_t*>(simcall->args[2]);
-}
-static inline sg_host_t* simcall_execution_parallel_start__getraw__host_list(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<sg_host_t*>(simcall->args[2]);
-}
-static inline void simcall_execution_parallel_start__set__host_list(smx_simcall_t simcall, sg_host_t* arg)
-{
-  simgrid::simix::marshal<sg_host_t*>(simcall->args[2], arg);
-}
-static inline double* simcall_execution_parallel_start__get__flops_amount(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<double*>(simcall->args[3]);
-}
-static inline double* simcall_execution_parallel_start__getraw__flops_amount(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<double*>(simcall->args[3]);
-}
-static inline void simcall_execution_parallel_start__set__flops_amount(smx_simcall_t simcall, double* arg)
-{
-  simgrid::simix::marshal<double*>(simcall->args[3], arg);
-}
-static inline double* simcall_execution_parallel_start__get__bytes_amount(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<double*>(simcall->args[4]);
-}
-static inline double* simcall_execution_parallel_start__getraw__bytes_amount(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<double*>(simcall->args[4]);
-}
-static inline void simcall_execution_parallel_start__set__bytes_amount(smx_simcall_t simcall, double* arg)
-{
-  simgrid::simix::marshal<double*>(simcall->args[4], arg);
-}
-static inline double simcall_execution_parallel_start__get__rate(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<double>(simcall->args[5]);
-}
-static inline double simcall_execution_parallel_start__getraw__rate(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<double>(simcall->args[5]);
-}
-static inline void simcall_execution_parallel_start__set__rate(smx_simcall_t simcall, double arg)
-{
-  simgrid::simix::marshal<double>(simcall->args[5], arg);
-}
-static inline double simcall_execution_parallel_start__get__timeout(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<double>(simcall->args[6]);
-}
-static inline double simcall_execution_parallel_start__getraw__timeout(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<double>(simcall->args[6]);
-}
-static inline void simcall_execution_parallel_start__set__timeout(smx_simcall_t simcall, double arg)
-{
-  simgrid::simix::marshal<double>(simcall->args[6], arg);
-}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> simcall_execution_parallel_start__get__result(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result);
-}
-static inline simgrid::kernel::activity::ExecImpl* simcall_execution_parallel_start__getraw__result(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl*>(simcall->result);
-}
-static inline void simcall_execution_parallel_start__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> result)
-{
-  simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result, result);
-}
-
 static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_execution_wait__get__execution(smx_simcall_t simcall)
 {
   return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]);
index 8625328..bc4c487 100644 (file)
@@ -58,22 +58,6 @@ inline static int simcall_BODY_process_sleep(double duration)
   return simcall<int, double>(SIMCALL_PROCESS_SLEEP, duration);
 }
 
-inline static boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
-simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound, sg_host_t host)
-{
-  if (0) /* Go to that function to follow the code flow through the simcall barrier */
-    SIMIX_execution_start(name, flops_amount, priority, bound, host);
-  return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>, const char*, double, double, double,
-                 sg_host_t>(SIMCALL_EXECUTION_START, name, flops_amount, priority, bound, host);
-}
-
-inline static boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double rate, double timeout)
-{
-  if (0) /* Go to that function to follow the code flow through the simcall barrier */
-    SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout);
-  return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>, const char*, int, sg_host_t*, double*, double*, double, double>(SIMCALL_EXECUTION_PARALLEL_START, name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout);
-}
-
 inline static int simcall_BODY_execution_wait(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
index 00a2489..e47114f 100644 (file)
@@ -22,8 +22,6 @@ typedef enum {
   SIMCALL_PROCESS_SUSPEND,
   SIMCALL_PROCESS_JOIN,
   SIMCALL_PROCESS_SLEEP,
-  SIMCALL_EXECUTION_START,
-  SIMCALL_EXECUTION_PARALLEL_START,
   SIMCALL_EXECUTION_WAIT,
   SIMCALL_EXECUTION_TEST,
   SIMCALL_COMM_IPROBE,
index cdbe9ad..6511ad6 100644 (file)
@@ -31,8 +31,6 @@ const char* simcall_names[] = {
     "SIMCALL_PROCESS_SUSPEND",
     "SIMCALL_PROCESS_JOIN",
     "SIMCALL_PROCESS_SLEEP",
-    "SIMCALL_EXECUTION_START",
-    "SIMCALL_EXECUTION_PARALLEL_START",
     "SIMCALL_EXECUTION_WAIT",
     "SIMCALL_EXECUTION_TEST",
     "SIMCALL_COMM_IPROBE",
@@ -82,21 +80,6 @@ case SIMCALL_PROCESS_SLEEP:
   simcall_HANDLER_process_sleep(simcall, simgrid::simix::unmarshal<double>(simcall->args[0]));
   break;
 
-case SIMCALL_EXECUTION_START:
-  simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(
-      simcall->result, SIMIX_execution_start(simgrid::simix::unmarshal<const char*>(simcall->args[0]),
-                                             simgrid::simix::unmarshal<double>(simcall->args[1]),
-                                             simgrid::simix::unmarshal<double>(simcall->args[2]),
-                                             simgrid::simix::unmarshal<double>(simcall->args[3]),
-                                             simgrid::simix::unmarshal<sg_host_t>(simcall->args[4])));
-  SIMIX_simcall_answer(simcall);
-  break;
-
-case SIMCALL_EXECUTION_PARALLEL_START:
-  simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result, SIMIX_execution_parallel_start(simgrid::simix::unmarshal<const char*>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1]), simgrid::simix::unmarshal<sg_host_t*>(simcall->args[2]), simgrid::simix::unmarshal<double*>(simcall->args[3]), simgrid::simix::unmarshal<double*>(simcall->args[4]), simgrid::simix::unmarshal<double>(simcall->args[5]), simgrid::simix::unmarshal<double>(simcall->args[6])));
-  SIMIX_simcall_answer(simcall);
-  break;
-
 case SIMCALL_EXECUTION_WAIT:
   simcall_HANDLER_execution_wait(simcall, simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]));
   break;
index d5f72d8..af411ef 100644 (file)
@@ -39,8 +39,6 @@ void process_suspend(smx_actor_t process) [[block]];
 int  process_join(smx_actor_t process, double timeout) [[block]];
 int  process_sleep(double duration) [[block]];
 
-boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> execution_start(const char* name, double flops_amount, double priority, double bound, sg_host_t host) [[nohandler]];
-boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double rate, double timeout) [[nohandler]];
 int           execution_wait(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution) [[block]];
 int           execution_test(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution) [[block]];